PageSourceSearch

https://kinnpimg1.bluestone.com/resources/themes/bluestone/generated/main.js?version=146237844370

js bluestone.com collected 2026-09-25 02:41:02 UTC 1,264,284 bytes, 64 lines download raw bytes

vendor: 4,257 bytes, lines 1-2
1/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
2!function(t,o){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?o(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return o(t)}:o(t)}("undefined"!=typeof window?window:this,function(t,o){var a=[],u=a.slice,l=a.concat,p=a.push,v=a.indexOf,m={},y=m.toString,w=m.hasOwnProperty,T={},C=t.document,k="2.1.4",n=function(t,o){return new n.fn.init(t,o)},N=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,E=/^-ms-/,A=/-([\da-z])/gi,r=function(t,o){return o.toUpperCase()};function s(t){var o="length"in t&&t.length,a=n.type(t);return"function"!==a&&!n.isWindow(t)&&(!(1!==t.nodeType||!o)||("array"===a||0===o||"number"==typeof o&&o>0&&o-1 in t))}n.fn=n.prototype={jquery:k,constructor:n,selector:"",length:0,toArray:function(){return u.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:u.call(this)},pushStack:function(t){var o=n.merge(this.constructor(),t);return o.prevObject=this,o.context=this.context,o},each:function(t,o){return n.each(this,t,o)},map:function(t){return this.pushStack(n.map(this,function(o,a){return t.call(o,a,o)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var o=this.length,a=+t+(0>t?o:0);return this.pushStack(a>=0&&o>a?[this[a]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:p,sort:a.sort,splice:a.splice},n.extend=n.fn.extend=function(){var t,o,a,u,l,p,v=arguments[0]||{},m=1,y=arguments.length,w=!1;for("boolean"==typeof v&&(w=v,v=arguments[m]||{},m++),"object"==typeof v||n.isFunction(v)||(v={}),m===y&&(v=this,m--);y>m;m++)if(null!=(t=arguments[m]))for(o in t)a=v[o],v!==(u=t[o])&&(w&&u&&(n.isPlainObject(u)||(l=n.isArray(u)))?(l?(l=!1,p=a&&n.isArray(a)?a:[]):p=a&&n.isPlainObject(a)?a:{},v[o]=n.extend(w,p,u)):void 0!==u&&(v[o]=u));return v},n.extend({expando:"jQuery"+(k+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===n.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){return!n.isArray(t)&&t-parseFloat(t)+1>=0},isPlainObject:function(t){return"object"===n.type(t)&&!t.nodeType&&!n.isWindow(t)&&!(t.constructor&&!w.call(t.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(t){var o;for(o in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?m[y.call(t)]||"object":typeof t},globalEval:function(t){var o,a=eval;(t=n.trim(t))&&(1===t.indexOf("use strict")?((o=C.createElement("script")).text=t,C.head.appendChild(o).parentNode.removeChild(o)):a(t))},camelCase:function(t){return t.replace(E,"ms-").replace(A,r)},nodeName:function(t,o){return t.nodeName&&t.nodeName.toLowerCase()===o.toLowerCase()},each:function(t,o,a){var u=0,l=t.length,p=s(t);if(a){if(p)for(;l>u&&!1!==o.apply(t[u],a);u++);else for(u in t)if(!1===o.apply(t[u],a))break}else if(p)for(;l>u&&!1!==o.call(t[u],u,t[u]);u++);else for(u in t)if(!1===o.call(t[u],u,t[u]))break;return t},trim:function(t){return null==t?"":(t+"").replace(N,"")},makeArray:function(t,o){var a=o||[];return null!=t&&(s(Object(t))?n.merge(a,"string"==typeof t?[t]:t):p.call(a,t)),a},inArray:function(t,o,a){return null==o?-1:v.call(o,t,a)},merge:function(t,o){for(var a=+o.length,u=0,l=t.length;a>u;u++)t[l++]=o[u];return t.length=l,t},grep:function(t,o,a){for(var u=[],l=0,p=t.length,v=!a;p>l;l++)!o(t[l],l)!==v&&u.push(t[l]);return u},map:function(t,o,a){var u,p=0,v=t.length,m=[];if(s(t))for(;v>p;p++)null!=(u=o(t[p],p,a))&&m.push(u);else for(p in t)null!=(u=o(t[p],p,a))&&m.push(u);return l.apply([],m)},guid:1,proxy:function(t,o){var a,l,p;return"string"==typeof o&&(a=t[o],o=t,t=a),n.isFunction(t)?(l=u.call(arguments,2),p=function(){return t.apply(o||this,l.concat(u.call(arguments)))},p.guid=t.guid=t.guid||n.guid++,p):void 0},now:Date.now,support:T}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,o){m["[object "+o+"]"]=o.toLowerCase()});var q=function(t){var o,a,u,l,p,v,m,y,w,T,C,k,N,E,A,q,L,H,F,O="sizzle"+1*ne
vendor: 8,391 bytes, line 2
2w Date,R=t.document,M=0,W=0,X=ha(),z=ha(),U=ha(),B=function(t,o){return t===o&&(C=!0),0},V=1<<31,Y={}.hasOwnProperty,Q=[],ee=Q.pop,te=Q.push,ne=Q.push,re=Q.slice,J=function(t,o){for(var a=0,u=t.length;u>a;a++)if(t[a]===o)return a;return-1},ie="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",oe="[\\x20\\t\\r\\n\\f]",ae="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",se=ae.replace("w","w#"),ue="\\["+oe+"*("+ae+")(?:"+oe+"*([*^$|!~]?=)"+oe+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+se+"))|)"+oe+"*\\]",le=":("+ae+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ue+")*)|.*)\\)|)",ce=new RegExp(oe+"+","g"),fe=new RegExp("^"+oe+"+|((?:^|[^\\\\])(?:\\\\.)*)"+oe+"+$","g"),pe=new RegExp("^"+oe+"*,"+oe+"*"),de=new RegExp("^"+oe+"*([>+~]|"+oe+")"+oe+"*"),he=new RegExp("="+oe+"*([^\\]'\"]*?)"+oe+"*\\]","g"),ge=new RegExp(le),ve=new RegExp("^"+se+"$"),me={ID:new RegExp("^#("+ae+")"),CLASS:new RegExp("^\\.("+ae+")"),TAG:new RegExp("^("+ae.replace("w","w*")+")"),ATTR:new RegExp("^"+ue),PSEUDO:new RegExp("^"+le),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+oe+"*(even|odd|(([+-]|)(\\d*)n|)"+oe+"*(?:([+-]|)"+oe+"*(\\d+)|))"+oe+"*\\)|)","i"),bool:new RegExp("^(?:"+ie+")$","i"),needsContext:new RegExp("^"+oe+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+oe+"*((?:-\\d)?\\d*)"+oe+"*\\)|)(?=[^-]|$)","i")},ye=/^(?:input|select|textarea|button)$/i,xe=/^h\d$/i,be=/^[^{]+\{\s*\[native \w/,we=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Te=/[+~]/,Ce=/'|\\/g,ke=new RegExp("\\\\([\\da-f]{1,6}"+oe+"?|("+oe+")|.)","ig"),da=function(t,o,a){var u="0x"+o-65536;return u!=u||a?o:0>u?String.fromCharCode(u+65536):String.fromCharCode(u>>10|55296,1023&u|56320)},ea=function(){k()};try{ne.apply(Q=re.call(R.childNodes),R.childNodes),Q[R.childNodes.length].nodeType}catch(t){ne={apply:Q.length?function(t,o){te.apply(t,re.call(o))}:function(t,o){for(var a=t.length,u=0;t[a++]=o[u++];);t.length=a-1}}}function ga(t,o,u,l){var p,m,w,T,C,E,L,H,M,W;if((o?o.ownerDocument||o:R)!==N&&k(o),u=u||[],T=(o=o||N).nodeType,"string"!=typeof t||!t||1!==T&&9!==T&&11!==T)return u;if(!l&&A){if(11!==T&&(p=we.exec(t)))if(w=p[1]){if(9===T){if(!(m=o.getElementById(w))||!m.parentNode)return u;if(m.id===w)return u.push(m),u}else if(o.ownerDocument&&(m=o.ownerDocument.getElementById(w))&&F(o,m)&&m.id===w)return u.push(m),u}else{if(p[2])return ne.apply(u,o.getElementsByTagName(t)),u;if((w=p[3])&&a.getElementsByClassName)return ne.apply(u,o.getElementsByClassName(w)),u}if(a.qsa&&(!q||!q.test(t))){if(H=L=O,M=o,W=1!==T&&t,1===T&&"object"!==o.nodeName.toLowerCase()){for(E=v(t),(L=o.getAttribute("id"))?H=L.replace(Ce,"\\$&"):o.setAttribute("id",H),H="[id='"+H+"'] ",C=E.length;C--;)E[C]=H+ra(E[C]);M=Te.test(t)&&pa(o.parentNode)||o,W=E.join(",")}if(W)try{return ne.apply(u,M.querySelectorAll(W)),u}catch(t){}finally{L||o.removeAttribute("id")}}}return y(t.replace(fe,"$1"),o,u,l)}function ha(){var t=[];return function b(o,a){return t.push(o+" ")>u.cacheLength&&delete b[t.shift()],b[o+" "]=a}}function ia(t){return t[O]=!0,t}function ja(t){var o=N.createElement("div");try{return!!t(o)}catch(t){return!1}finally{o.parentNode&&o.parentNode.removeChild(o),o=null}}function ka(t,o){for(var a=t.split("|"),l=t.length;l--;)u.attrHandle[a[l]]=o}function la(t,o){var a=o&&t,u=a&&1===t.nodeType&&1===o.nodeType&&(~o.sourceIndex||V)-(~t.sourceIndex||V);if(u)return u;if(a)for(;a=a.nextSibling;)if(a===o)return-1;return t?1:-1}function ma(t){return function(o){return"input"===o.nodeName.toLowerCase()&&o.type===t}}function na(t){return function(o){var a=o.nodeName.toLowerCase();return("input"===a||"button"===a)&&o.type===t}}function oa(t){return ia(function(o){return o=+o,ia(function(a,u){for(var l,p=t([],a.length,o),v=p.length;v--;)a[l=p[v]]&&(a[l]=!(u[l]=a[l]))})})}function pa(t){return t&&void 0!==t.getElementsByTagName&&t}for(o in a=ga.support={},p=ga.isXML=function(t){var o=t&&(t.ownerDocument||t).documentElement;return!!o&&"HTML"!==o.nodeName},k=ga.setDocument=function(t){var o,l,v=t?t.ownerDocument||t:R;return v!==N&&9===v.nodeType&&v.documentElement?(N=v,E=v.documentElement,(l=v.defaultView)&&l!==l.top&&(l.addEventListener?l.addEventListener("unload",ea,!1):l.attachEvent&&l.attachEvent("onunload",ea)),A=!p(v),a.attributes=ja(function(t){return t.className="i",!t.getAttribute("className")}),a.getElementsByTagName=ja(function(t){return t.appendChild(v.createComment("")),!t.getElementsByTagName("*").length}),a.getElementsByClassName=be.test(v.getElementsByClassName),a.getById=ja(function(t){return E.appendChild(t).id=O,!v.getElementsByName||!v.getElementsByName(O).length}),a.getById?(u.find.ID=function(t,o){if(void 0!==o.getElementById&&A){var a=o.getElementById(t);return a&&a.parentNode?[a]:[]}},u.filter.ID=function(t){var o=t.replace(ke,da);return function(t){return t.getAttribute("id")===o}}):(delete u.find.ID,u.filter.ID=function(t){var o=t.replace(ke,da);return function(t){var a=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return a&&a.value===o}}),u.find.TAG=a.getElementsByTagName?function(t,o){return void 0!==o.getElementsByTagName?o.getElementsByTagName(t):a.qsa?o.querySelectorAll(t):void 0}:function(t,o){var a,u=[],l=0,p=o.getElementsByTagName(t);if("*"===t){for(;a=p[l++];)1===a.nodeType&&u.push(a);return u}return p},u.find.CLASS=a.getElementsByClassName&&function(t,o){return A?o.getElementsByClassName(t):void 0},L=[],q=[],(a.qsa=be.test(v.querySelectorAll))&&(ja(function(t){E.appendChild(t).innerHTML="<a id='"+O+"'></a><select id='"+O+"-\f]' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+oe+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||q.push("\\["+oe+"*(?:value|"+ie+")"),t.querySelectorAll("[id~="+O+"-]").length||q.push("~="),t.querySelectorAll(":checked").length||q.push(":checked"),t.querySelectorAll("a#"+O+"+*").length||q.push(".#.+[+~]")}),ja(function(t){var o=v.createElement("input");o.setAttribute("type","hidden"),t.appendChild(o).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&q.push("name"+oe+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),q.push(",.*:")})),(a.matchesSelector=be.test(H=E.matches||E.webkitMatchesSelector||E.mozMatchesSelector||E.oMatchesSelector||E.msMatchesSelector))&&ja(function(t){a.disconnectedMatch=H.call(t,"div"),H.call(t,"[s!='']:x"),L.push("!=",le)}),q=q.length&&new RegExp(q.join("|")),L=L.length&&new RegExp(L.join("|")),o=be.test(E.compareDocumentPosition),F=o||be.test(E.contains)?function(t,o){var a=9===t.nodeType?t.documentElement:t,u=o&&o.parentNode;return t===u||!(!u||1!==u.nodeType||!(a.contains?a.contains(u):t.compareDocumentPosition&&16&t.compareDocumentPosition(u)))}:function(t,o){if(o)for(;o=o.parentNode;)if(o===t)return!0;return!1},B=o?function(t,o){if(t===o)return C=!0,0;var u=!t.compareDocumentPosition-!o.compareDocumentPosition;return u||(1&(u=(t.ownerDocument||t)===(o.ownerDocument||o)?t.compareDocumentPosition(o):1)||!a.sortDetached&&o.compareDocumentPosition(t)===u?t===v||t.ownerDocument===R&&F(R,t)?-1:o===v||o.ownerDocument===R&&F(R,o)?1:T?J(T,t)-J(T,o):0:4&u?-1:1)}:function(t,o){if(t===o)return C=!0,0;var a,u=0,l=t.parentNode,p=o.parentNode,m=[t],y=[o];if(!l||!p)return t===v?-1:o===v?1:l?-1:p?1:T?J(T,t)-J(T,o):0;if(l===p)return la(t,o);for(a=t;a=a.parentNode;)m.unshift(a);for(a=o;a=a.parentNode;)y.unshift(a);for(;m[u]===y[u];)u++;return u?la(m[u],y[u]):m[u]===R?-1:y[u]===R?1:0},v):N},ga.matches=function(t,o){return ga(t,null,null,o)},ga.matchesSelector=function(t,o){if((t.ownerDocument||t)!==N&&k(t),o=o.replace(he,"='$1']"),!(!a.matchesSelector||!A||L&&L.test(o)||q&&q.test(o)))try{var u=H.call(t,o);if(u||a.disconnectedMatch||t.document&&11!==t.document.nodeType)return u}catch(t){}return ga(o,N,null,[t]).length>0},ga.contains=function(t,o){return(t.ownerDocument||t)!==N&&k(t),F(t,o)},ga.attr=function(t,o){(t.ownerDocument||t)!==N&&k(t);var l=u.attrHandle[o.toLowerCase()],p=l&&Y.call(u.attrHandle,o.toLowerCase())?l(t,o,!A):void 0;return void 0!==p?p:a.attributes||!A?t.getAttribute(o):(p=t.getAttributeNode(o))&&p.specified?p.value:null},ga.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},ga.uniqueSort=function(t){var o,u=[],l=0,p=0;
vendor: 4,429 bytes, line 2
2if(C=!a.detectDuplicates,T=!a.sortStable&&t.slice(0),t.sort(B),C){for(;o=t[p++];)o===t[p]&&(l=u.push(p));for(;l--;)t.splice(u[l],1)}return T=null,t},l=ga.getText=function(t){var o,a="",u=0,p=t.nodeType;if(p){if(1===p||9===p||11===p){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)a+=l(t)}else if(3===p||4===p)return t.nodeValue}else for(;o=t[u++];)a+=l(o);return a},u=ga.selectors={cacheLength:50,createPseudo:ia,match:me,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(ke,da),t[3]=(t[3]||t[4]||t[5]||"").replace(ke,da),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||ga.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&ga.error(t[0]),t},PSEUDO:function(t){var o,a=!t[6]&&t[2];return me.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":a&&ge.test(a)&&(o=v(a,!0))&&(o=a.indexOf(")",a.length-o)-a.length)&&(t[0]=t[0].slice(0,o),t[2]=a.slice(0,o)),t.slice(0,3))}},filter:{TAG:function(t){var o=t.replace(ke,da).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===o}},CLASS:function(t){var o=X[t+" "];return o||(o=new RegExp("(^|"+oe+")"+t+"("+oe+"|$)"))&&X(t,function(t){return o.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,o,a){return function(u){var l=ga.attr(u,t);return null==l?"!="===o:!o||(l+="","="===o?l===a:"!="===o?l!==a:"^="===o?a&&0===l.indexOf(a):"*="===o?a&&l.indexOf(a)>-1:"$="===o?a&&l.slice(-a.length)===a:"~="===o?(" "+l.replace(ce," ")+" ").indexOf(a)>-1:"|="===o&&(l===a||l.slice(0,a.length+1)===a+"-"))}},CHILD:function(t,o,a,u,l){var p="nth"!==t.slice(0,3),v="last"!==t.slice(-4),m="of-type"===o;return 1===u&&0===l?function(t){return!!t.parentNode}:function(o,a,y){var w,T,C,k,N,E,A=p!==v?"nextSibling":"previousSibling",q=o.parentNode,L=m&&o.nodeName.toLowerCase(),H=!y&&!m;if(q){if(p){for(;A;){for(C=o;C=C[A];)if(m?C.nodeName.toLowerCase()===L:1===C.nodeType)return!1;E=A="only"===t&&!E&&"nextSibling"}return!0}if(E=[v?q.firstChild:q.lastChild],v&&H){for(N=(w=(T=q[O]||(q[O]={}))[t]||[])[0]===M&&w[1],k=w[0]===M&&w[2],C=N&&q.childNodes[N];C=++N&&C&&C[A]||(k=N=0)||E.pop();)if(1===C.nodeType&&++k&&C===o){T[t]=[M,N,k];break}}else if(H&&(w=(o[O]||(o[O]={}))[t])&&w[0]===M)k=w[1];else for(;(C=++N&&C&&C[A]||(k=N=0)||E.pop())&&((m?C.nodeName.toLowerCase()!==L:1!==C.nodeType)||!++k||(H&&((C[O]||(C[O]={}))[t]=[M,k]),C!==o)););return(k-=l)===u||k%u===0&&k/u>=0}}},PSEUDO:function(t,o){var a,l=u.pseudos[t]||u.setFilters[t.toLowerCase()]||ga.error("unsupported pseudo: "+t);return l[O]?l(o):l.length>1?(a=[t,t,"",o],u.setFilters.hasOwnProperty(t.toLowerCase())?ia(function(t,a){for(var u,p=l(t,o),v=p.length;v--;)t[u=J(t,p[v])]=!(a[u]=p[v])}):function(t){return l(t,0,a)}):l}},pseudos:{not:ia(function(t){var o=[],a=[],u=m(t.replace(fe,"$1"));return u[O]?ia(function(t,o,a,l){for(var p,v=u(t,null,l,[]),m=t.length;m--;)(p=v[m])&&(t[m]=!(o[m]=p))}):function(t,l,p){return o[0]=t,u(o,null,p,a),o[0]=null,!a.pop()}}),has:ia(function(t){return function(o){return ga(t,o).length>0}}),contains:ia(function(t){return t=t.replace(ke,da),function(o){return(o.textContent||o.innerText||l(o)).indexOf(t)>-1}}),lang:ia(function(t){return ve.test(t||"")||ga.error("unsupported lang: "+t),t=t.replace(ke,da).toLowerCase(),function(o){var a;do{if(a=A?o.lang:o.getAttribute("xml:lang")||o.getAttribute("lang"))return(a=a.toLowerCase())===t||0===a.indexOf(t+"-")}while((o=o.parentNode)&&1===o.nodeType);return!1}}),target:function(o){var a=t.location&&t.location.hash;return a&&a.slice(1)===o.id},root:function(t){return t===E},focus:function(t){return t===N.activeElement&&(!N.hasFocus||N.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var o=t.nodeName.toLowerCase();return"input"===o&&!!t.checked||"option"===o&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!u.pseudos.empty(t)}
vendor: 60,519 bytes, line 2
2,header:function(t){return xe.test(t.nodeName)},input:function(t){return ye.test(t.nodeName)},button:function(t){var o=t.nodeName.toLowerCase();return"input"===o&&"button"===t.type||"button"===o},text:function(t){var o;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(o=t.getAttribute("type"))||"text"===o.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(t,o){return[o-1]}),eq:oa(function(t,o,a){return[0>a?a+o:a]}),even:oa(function(t,o){for(var a=0;o>a;a+=2)t.push(a);return t}),odd:oa(function(t,o){for(var a=1;o>a;a+=2)t.push(a);return t}),lt:oa(function(t,o,a){for(var u=0>a?a+o:a;--u>=0;)t.push(u);return t}),gt:oa(function(t,o,a){for(var u=0>a?a+o:a;++u<o;)t.push(u);return t})}},u.pseudos.nth=u.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})u.pseudos[o]=ma(o);for(o in{submit:!0,reset:!0})u.pseudos[o]=na(o);function qa(){}function ra(t){for(var o=0,a=t.length,u="";a>o;o++)u+=t[o].value;return u}function sa(t,o,a){var u=o.dir,l=a&&"parentNode"===u,p=W++;return o.first?function(o,a,p){for(;o=o[u];)if(1===o.nodeType||l)return t(o,a,p)}:function(o,a,v){var m,y,w=[M,p];if(v){for(;o=o[u];)if((1===o.nodeType||l)&&t(o,a,v))return!0}else for(;o=o[u];)if(1===o.nodeType||l){if((m=(y=o[O]||(o[O]={}))[u])&&m[0]===M&&m[1]===p)return w[2]=m[2];if(y[u]=w,w[2]=t(o,a,v))return!0}}}function ta(t){return t.length>1?function(o,a,u){for(var l=t.length;l--;)if(!t[l](o,a,u))return!1;return!0}:t[0]}function va(t,o,a,u,l){for(var p,v=[],m=0,y=t.length,w=null!=o;y>m;m++)(p=t[m])&&(!a||a(p,u,l))&&(v.push(p),w&&o.push(m));return v}function wa(t,o,a,u,l,p){return u&&!u[O]&&(u=wa(u)),l&&!l[O]&&(l=wa(l,p)),ia(function(p,v,m,y){var w,T,C,k=[],N=[],E=v.length,A=p||function ua(t,o,a){for(var u=0,l=o.length;l>u;u++)ga(t,o[u],a);return a}(o||"*",m.nodeType?[m]:m,[]),q=!t||!p&&o?A:va(A,k,t,m,y),L=a?l||(p?t:E||u)?[]:v:q;if(a&&a(q,L,m,y),u)for(w=va(L,N),u(w,[],m,y),T=w.length;T--;)(C=w[T])&&(L[N[T]]=!(q[N[T]]=C));if(p){if(l||t){if(l){for(w=[],T=L.length;T--;)(C=L[T])&&w.push(q[T]=C);l(null,L=[],w,y)}for(T=L.length;T--;)(C=L[T])&&(w=l?J(p,C):k[T])>-1&&(p[w]=!(v[w]=C))}}else L=va(L===v?L.splice(E,L.length):L),l?l(null,v,L,y):ne.apply(v,L)})}function xa(t){for(var o,a,l,p=t.length,v=u.relative[t[0].type],m=v||u.relative[" "],y=v?1:0,T=sa(function(t){return t===o},m,!0),C=sa(function(t){return J(o,t)>-1},m,!0),k=[function(t,a,u){var l=!v&&(u||a!==w)||((o=a).nodeType?T(t,a,u):C(t,a,u));return o=null,l}];p>y;y++)if(a=u.relative[t[y].type])k=[sa(ta(k),a)];else{if((a=u.filter[t[y].type].apply(null,t[y].matches))[O]){for(l=++y;p>l&&!u.relative[t[l].type];l++);return wa(y>1&&ta(k),y>1&&ra(t.slice(0,y-1).concat({value:" "===t[y-2].type?"*":""})).replace(fe,"$1"),a,l>y&&xa(t.slice(y,l)),p>l&&xa(t=t.slice(l)),p>l&&ra(t))}k.push(a)}return ta(k)}function ya(t,o){var a=o.length>0,l=t.length>0,f=function(p,v,m,y,T){var C,k,E,A=0,q="0",L=p&&[],H=[],F=w,O=p||l&&u.find.TAG("*",T),R=M+=null==F?1:Math.random()||.1,W=O.length;for(T&&(w=v!==N&&v);q!==W&&null!=(C=O[q]);q++){if(l&&C){for(k=0;E=t[k++];)if(E(C,v,m)){y.push(C);break}T&&(M=R)}a&&((C=!E&&C)&&A--,p&&L.push(C))}if(A+=q,a&&q!==A){for(k=0;E=o[k++];)E(L,H,v,m);if(p){if(A>0)for(;q--;)L[q]||H[q]||(H[q]=ee.call(y));H=va(H)}ne.apply(y,H),T&&!p&&H.length>0&&A+o.length>1&&ga.uniqueSort(y)}return T&&(M=R,w=F),L};return a?ia(f):f}return qa.prototype=u.filters=u.pseudos,u.setFilters=new qa,v=ga.tokenize=function(t,o){var a,l,p,v,m,y,w,T=z[t+" "];if(T)return o?0:T.slice(0);for(m=t,y=[],w=u.preFilter;m;){for(v in(!a||(l=pe.exec(m)))&&(l&&(m=m.slice(l[0].length)||m),y.push(p=[])),a=!1,(l=de.exec(m))&&(a=l.shift(),p.push({value:a,type:l[0].replace(fe," ")}),m=m.slice(a.length)),u.filter)!(l=me[v].exec(m))||w[v]&&!(l=w[v](l))||(a=l.shift(),p.push({value:a,type:v,matches:l}),m=m.slice(a.length));if(!a)break}return o?m.length:m?ga.error(t):z(t,y).slice(0)},m=ga.compile=function(t,o){var a,u=[],l=[],p=U[t+" "];if(!p){for(o||(o=v(t)),a=o.length;a--;)(p=xa(o[a]))[O]?u.push(p):l.push(p);(p=U(t,ya(l,u))).selector=t}return p},y=ga.select=function(t,o,l,p){var y,w,T,C,k,N="function"==typeof t&&t,E=!p&&v(t=N.selector||t);if(l=l||[],1===E.length){if((w=E[0]=E[0].slice(0)).length>2&&"ID"===(T=w[0]).type&&a.getById&&9===o.nodeType&&A&&u.relative[w[1].type]){if(!(o=(u.find.ID(T.matches[0].replace(ke,da),o)||[])[0]))return l;N&&(o=o.parentNode),t=t.slice(w.shift().value.length)}for(y=me.needsContext.test(t)?0:w.length;y--&&(T=w[y],!u.relative[C=T.type]);)if((k=u.find[C])&&(p=k(T.matches[0].replace(ke,da),Te.test(w[0].type)&&pa(o.parentNode)||o))){if(w.splice(y,1),!(t=p.length&&ra(w)))return ne.apply(l,p),l;break}}return(N||m(t,E))(p,o,!A,l,Te.test(t)&&pa(o.parentNode)||o),l},a.sortStable=O.split("").sort(B).join("")===O,a.detectDuplicates=!!C,k(),a.sortDetached=ja(function(t){return 1&t.compareDocumentPosition(N.createElement("div"))}),ja(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||ka("type|href|height|width",function(t,o,a){return a?void 0:t.getAttribute(o,"type"===o.toLowerCase()?1:2)}),a.attributes&&ja(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ka("value",function(t,o,a){return a||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),ja(function(t){return null==t.getAttribute("disabled")})||ka(ie,function(t,o,a){var u;return a?void 0:!0===t[o]?o.toLowerCase():(u=t.getAttributeNode(o))&&u.specified?u.value:null}),ga}(t);n.find=q,n.expr=q.selectors,n.expr[":"]=n.expr.pseudos,n.unique=q.uniqueSort,n.text=q.getText,n.isXMLDoc=q.isXML,n.contains=q.contains;var L=n.expr.match.needsContext,H=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,F=/^.[^:#\[\.,]*$/;function x(t,o,a){if(n.isFunction(o))return n.grep(t,function(t,u){return!!o.call(t,u,t)!==a});if(o.nodeType)return n.grep(t,function(t){return t===o!==a});if("string"==typeof o){if(F.test(o))return n.filter(o,t,a);o=n.filter(o,t)}return n.grep(t,function(t){return v.call(o,t)>=0!==a})}n.filter=function(t,o,a){var u=o[0];return a&&(t=":not("+t+")"),1===o.length&&1===u.nodeType?n.find.matchesSelector(u,t)?[u]:[]:n.find.matches(t,n.grep(o,function(t){return 1===t.nodeType}))},n.fn.extend({find:function(t){var o,a=this.length,u=[],l=this;if("string"!=typeof t)return this.pushStack(n(t).filter(function(){for(o=0;a>o;o++)if(n.contains(l[o],this))return!0}));for(o=0;a>o;o++)n.find(t,l[o],u);return(u=this.pushStack(a>1?n.unique(u):u)).selector=this.selector?this.selector+" "+t:t,u},filter:function(t){return this.pushStack(x(this,t||[],!1))},not:function(t){return this.pushStack(x(this,t||[],!0))},is:function(t){return!!x(this,"string"==typeof t&&L.test(t)?n(t):t||[],!1).length}});var O,R=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,M=n.fn.init=function(t,o){var a,u;if(!t)return this;if("string"==typeof t){if(!(a="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:R.exec(t))||!a[1]&&o)return!o||o.jquery?(o||O).find(t):this.constructor(o).find(t);if(a[1]){if(o=o instanceof n?o[0]:o,n.merge(this,n.parseHTML(a[1],o&&o.nodeType?o.ownerDocument||o:C,!0)),H.test(a[1])&&n.isPlainObject(o))for(a in o)n.isFunction(this[a])?this[a](o[a]):this.attr(a,o[a]);return this}return(u=C.getElementById(a[2]))&&u.parentNode&&(this.length=1,this[0]=u),this.context=C,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):n.isFunction(t)?void 0!==O.ready?O.ready(t):t(n):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),n.makeArray(t,this))};M.prototype=n.fn,O=n(C);var W=/^(?:parents|prev(?:Until|All))/,X={children:!0,contents:!0,next:!0,prev:!0};function D(t,o){for(;(t=t[o])&&1!==t.nodeType;);return t}n.extend({dir:function(t,o,a){for(var u=[],l=void 0!==a;(t=t[o])&&9!==t.nodeType;)if(1===t.nodeType){if(l&&n(t).is(a))break;u.push(t)}return u},sibling:function(t,o){for(var a=[];t;t=t.nextSibling)1===t.nodeType&&t!==o&&a.push(t);return a}}),n.fn.extend({has:function(t){var o=n(t,this),a=o.length;return this.filter(function(){for(var t=0;a>t;t++)if(n.contains(this,o[t]))return!0})},closest:function(t,o){for(var a,u=0,l=this.length,p=[],v=L.test(t)||"string"!=typeof t?n(t,o||this.context):0;l>u;u++)for(a=this[u];a&&a!==o;a=a.parentNode)if(a.nodeType<11&&(v?v.index(a)>-1:1===a.nodeType&&n.find.matchesSelector(a,t))){p.push(a);break}return this.pushStack(p.length>1?n.unique(p):p)},index:function(t){return t?"string"==typeof t?v.call(n(t),this[0]):v.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,o){return this.pushStack(n.unique(n.merge(this.get(),n(t,o))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),n.each({parent:function(t){var o=t.parentNode;return o&&11!==o.nodeType?o:null},parents:function(t){return n.dir(t,"parentNode")},parentsUntil:function(t,o,a){return n.dir(t,"parentNode",a)},next:function(t){return D(t,"nextSibling")},prev:function(t){return D(t,"previousSibling")},nextAll:function(t){return n.dir(t,"nextSibling")},prevAll:function(t){return n.dir(t,"previousSibling")},nextUntil:function(t,o,a){return n.dir(t,"nextSibling",a)},prevUntil:function(t,o,a){return n.dir(t,"previousSibling",a)},siblings:function(t){return n.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return n.sibling(t.firstChild)},contents:function(t){return t.contentDocument||n.merge([],t.childNodes)}},function(t,o){n.fn[t]=function(a,u){var l=n.map(this,o,a);return"Until"!==t.slice(-5)&&(u=a),u&&"string"==typeof u&&(l=n.filter(u,l)),this.length>1&&(X[t]||n.unique(l),W.test(t)&&l.reverse()),this.pushStack(l)}});var z,U=/\S+/g,V={};function I(){C.removeEventListener("DOMContentLoaded",I,!1),t.removeEventListener("load",I,!1),n.ready()}n.Callbacks=function(t){t="string"==typeof t?V[t]||function G(t){var o=V[t]={};return n.each(t.match(U)||[],function(t,a){o[a]=!0}),o}(t):n.extend({},t);var o,a,u,l,p,v,m=[],y=!t.once&&[],j=function(T){for(o=t.memory&&T,a=!0,v=l||0,l=0,p=m.length,u=!0;m&&p>v;v++)if(!1===m[v].apply(T[0],T[1])&&t.stopOnFalse){o=!1;break}u=!1,m&&(y?y.length&&j(y.shift()):o?m=[]:w.disable())},w={add:function(){if(m){var a=m.length;!function g(o){n.each(o,function(o,a){var u=n.type(a);"function"===u?t.unique&&w.has(a)||m.push(a):a&&a.length&&"string"!==u&&g(a)})}(arguments),u?p=m.length:o&&(l=a,j(o))}return this},remove:function(){return m&&n.each(arguments,function(t,o){for(var a;(a=n.inArray(o,m,a))>-1;)m.splice(a,1),u&&(p>=a&&p--,v>=a&&v--)}),this},has:function(t){return t?n.inArray(t,m)>-1:!(!m||!m.length)},empty:function(){return m=[],p=0,this},disable:function(){return m=y=o=void 0,this},disabled:function(){return!m},lock:function(){return y=void 0,o||w.disable(),this},locked:function(){return!y},fireWith:function(t,o){return!m||a&&!y||(o=[t,(o=o||[]).slice?o.slice():o],u?y.push(o):j(o)),this},fire:function(){return w.fireWith(this,arguments),this},fired:function(){return!!a}};return w},n.extend({Deferred:function(t){var o=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],a="pending",u={state:function(){return a},always:function(){return l.done(arguments).fail(arguments),this},then:function(){var t=arguments;return n.Deferred(function(a){n.each(o,function(o,p){var v=n.isFunction(t[o])&&t[o];l[p[1]](function(){var t=v&&v.apply(this,arguments);t&&n.isFunction(t.promise)?t.promise().done(a.resolve).fail(a.reject).progress(a.notify):a[p[0]+"With"](this===u?a.promise():this,v?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?n.extend(t,u):u}},l={};return u.pipe=u.then,n.each(o,function(t,p){var v=p[2],m=p[3];u[p[1]]=v.add,m&&v.add(function(){a=m},o[1^t][2].disable,o[2][2].lock),l[p[0]]=function(){return l[p[0]+"With"](this===l?u:this,arguments),this},l[p[0]+"With"]=v.fireWith}),u.promise(l),t&&t.call(l,l),l},when:function(t){var o,a,l,p=0,v=u.call(arguments),m=v.length,y=1!==m||t&&n.isFunction(t.promise)?m:0,w=1===y?t:n.Deferred(),h=function(t,a,l){return function(p){a[t]=this,l[t]=arguments.length>1?u.call(arguments):p,l===o?w.notifyWith(a,l):--y||w.resolveWith(a,l)}};if(m>1)for(o=new Array(m),a=new Array(m),l=new Array(m);m>p;p++)v[p]&&n.isFunction(v[p].promise)?v[p].promise().done(h(p,l,v)).fail(w.reject).progress(h(p,a,o)):--y;return y||w.resolveWith(l,v),w.promise()}}),n.fn.ready=function(t){return n.ready.promise().done(t),this},n.extend({isReady:!1,readyWait:1,holdReady:function(t){t?n.readyWait++:n.ready(!0)},ready:function(t){(!0===t?--n.readyWait:n.isReady)||(n.isReady=!0,!0!==t&&--n.readyWait>0||(z.resolveWith(C,[n]),n.fn.triggerHandler&&(n(C).triggerHandler("ready"),n(C).off("ready"))))}}),n.ready.promise=function(o){return z||(z=n.Deferred(),"complete"===C.readyState?setTimeout(n.ready):(C.addEventListener("DOMContentLoaded",I,!1),t.addEventListener("load",I,!1))),z.promise(o)},n.ready.promise();var Y=n.access=function(t,o,a,u,l,p,v){var m=0,y=t.length,w=null==a;if("object"===n.type(a))for(m in l=!0,a)n.access(t,o,m,a[m],!0,p,v);else if(void 0!==u&&(l=!0,n.isFunction(u)||(v=!0),w&&(v?(o.call(t,u),o=null):(w=o,o=function(t,o,a){return w.call(n(t),a)})),o))for(;y>m;m++)o(t[m],a,v?u:u.call(t[m],m,o(t[m],a)));return l?t:w?o.call(t):y?o(t[0],a):p};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}n.acceptData=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType},K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(t){if(!K.accepts(t))return 0;var o={},a=t[this.expando];if(!a){a=K.uid++;try{o[this.expando]={value:a},Object.defineProperties(t,o)}catch(u){o[this.expando]=a,n.extend(t,o)}}return this.cache[a]||(this.cache[a]={}),a},set:function(t,o,a){var u,l=this.key(t),p=this.cache[l];if("string"==typeof o)p[o]=a;else if(n.isEmptyObject(p))n.extend(this.cache[l],o);else for(u in o)p[u]=o[u];return p},get:function(t,o){var a=this.cache[this.key(t)];return void 0===o?a:a[o]},access:function(t,o,a){var u;return void 0===o||o&&"string"==typeof o&&void 0===a?void 0!==(u=this.get(t,o))?u:this.get(t,n.camelCase(o)):(this.set(t,o,a),void 0!==a?a:o)},remove:function(t,o){var a,u,l,p=this.key(t),v=this.cache[p];if(void 0===o)this.cache[p]={};else{n.isArray(o)?u=o.concat(o.map(n.camelCase)):(l=n.camelCase(o),o in v?u=[o,l]:u=(u=l)in v?[u]:u.match(U)||[]),a=u.length;for(;a--;)delete v[u[a]]}},hasData:function(t){return!n.isEmptyObject(this.cache[t[this.expando]]||{})},discard:function(t){t[this.expando]&&delete this.cache[t[this.expando]]}};var Q=new K,ee=new K,te=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ne=/([A-Z])/g;function P(t,o,a){var u;if(void 0===a&&1===t.nodeType)if(u="data-"+o.replace(ne,"-$1").toLowerCase(),"string"==typeof(a=t.getAttribute(u))){try{a="true"===a||"false"!==a&&("null"===a?null:+a+""===a?+a:te.test(a)?n.parseJSON(a):a)}catch(t){}ee.set(t,o,a)}else a=void 0;return a}n.extend({hasData:function(t){return ee.hasData(t)||Q.hasData(t)},data:function(t,o,a){return ee.access(t,o,a)},removeData:function(t,o){ee.remove(t,o)},_data:function(t,o,a){return Q.access(t,o,a)},_removeData:function(t,o){Q.remove(t,o)}}),n.fn.extend({data:function(t,o){var a,u,l,p=this[0],v=p&&p.attributes;if(void 0===t){if(this.length&&(l=ee.get(p),1===p.nodeType&&!Q.get(p,"hasDataAttrs"))){for(a=v.length;a--;)v[a]&&(0===(u=v[a].name).indexOf("data-")&&(u=n.camelCase(u.slice(5)),P(p,u,l[u])));Q.set(p,"hasDataAttrs",!0)}return l}return"object"==typeof t?this.each(function(){ee.set(this,t)}):Y(this,function(o){var a,u=n.camelCase(t);if(p&&void 0===o){if(void 0!==(a=ee.get(p,t)))return a;if(void 0!==(a=ee.get(p,u)))return a;if(void 0!==(a=P(p,u,void 0)))return a}else this.each(function(){var a=ee.get(this,u);ee.set(this,u,o),-1!==t.indexOf("-")&&void 0!==a&&ee.set(this,t,o)})},null,o,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){ee.remove(this,t)})}}),n.extend({queue:function(t,o,a){var u;return t?(o=(o||"fx")+"queue",u=Q.get(t,o),a&&(!u||n.isArray(a)?u=Q.access(t,o,n.makeArray(a)):u.push(a)),u||[]):void 0},dequeue:function(t,o){o=o||"fx";var a=n.queue(t,o),u=a.length,l=a.shift(),p=n._queueHooks(t,o);"inprogress"===l&&(l=a.shift(),u--),l&&("fx"===o&&a.unshift("inprogress"),delete p.stop,l.call(t,function(){n.dequeue(t,o)},p)),!u&&p&&p.empty.fire()},_queueHooks:function(t,o){var a=o+"queueHooks";return Q.get(t,a)||Q.access(t,a,{empty:n.Callbacks("once memory").add(function(){Q.remove(t,[o+"queue",a])})})}}),n.fn.extend({queue:function(t,o){var a=2;return"string"!=typeof t&&(o=t,t="fx",a--),arguments.length<a?n.queue(this[0],t):void 0===o?this:this.each(function(){var a=n.queue(this,t,o);n._queueHooks(this,t),"fx"===t&&"inprogress"!==a[0]&&n.dequeue(this,t)})},dequeue:function(t){return this.each(function(){n.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,o){var a,u=1,l=n.Deferred(),p=this,v=this.length,h=function(){--u||l.resolveWith(p,[p])};for("string"!=typeof t&&(o=t,t=void 0),t=t||"fx";v--;)(a=Q.get(p[v],t+"queueHooks"))&&a.empty&&(u++,a.empty.add(h));return h(),l.promise(o)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=["Top","Right","Bottom","Left"],S=function(t,o){return t=o||t,"none"===n.css(t,"display")||!n.contains(t.ownerDocument,t)},oe=/^(?:checkbox|radio)$/i;!function(){var t=C.createDocumentFragment().appendChild(C.createElement("div")),o=C.createElement("input");o.setAttribute("type","radio"),o.setAttribute("checked","checked"),o.setAttribute("name","t"),t.appendChild(o),T.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",T.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var ae="undefined";T.focusinBubbles="onfocusin"in t;var se=/^key/,ue=/^(?:mouse|pointer|contextmenu)|click/,le=/^(?:focusinfocus|focusoutblur)$/,ce=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return C.activeElement}catch(t){}}n.event={global:{},add:function(t,o,a,u,l){var p,v,m,y,w,T,C,k,N,E,A,q=Q.get(t);if(q)for(a.handler&&(a=(p=a).handler,l=p.selector),a.guid||(a.guid=n.guid++),(y=q.events)||(y=q.events={}),(v=q.handle)||(v=q.handle=function(o){return typeof n!==ae&&n.event.triggered!==o.type?n.event.dispatch.apply(t,arguments):void 0}),w=(o=(o||"").match(U)||[""]).length;w--;)N=A=(m=ce.exec(o[w])||[])[1],E=(m[2]||"").split(".").sort(),N&&(C=n.event.special[N]||{},N=(l?C.delegateType:C.bindType)||N,C=n.event.special[N]||{},T=n.extend({type:N,origType:A,data:u,handler:a,guid:a.guid,selector:l,needsContext:l&&n.expr.match.needsContext.test(l),namespace:E.join(".")},p),(k=y[N])||((k=y[N]=[]).delegateCount=0,C.setup&&!1!==C.setup.call(t,u,E,v)||t.addEventListener&&t.addEventListener(N,v,!1)),C.add&&(C.add.call(t,T),T.handler.guid||(T.handler.guid=a.guid)),l?k.splice(k.delegateCount++,0,T):k.push(T),n.event.global[N]=!0)},remove:function(t,o,a,u,l){var p,v,m,y,w,T,C,k,N,E,A,q=Q.hasData(t)&&Q.get(t);if(q&&(y=q.events)){for(w=(o=(o||"").match(U)||[""]).length;w--;)if(N=A=(m=ce.exec(o[w])||[])[1],E=(m[2]||"").split(".").sort(),N){for(C=n.event.special[N]||{},k=y[N=(u?C.delegateType:C.bindType)||N]||[],m=m[2]&&new RegExp("(^|\\.)"+E.join("\\.(?:.*\\.|)")+"(\\.|$)"),v=p=k.length;p--;)T=k[p],!l&&A!==T.origType||a&&a.guid!==T.guid||m&&!m.test(T.namespace)||u&&u!==T.selector&&("**"!==u||!T.selector)||(k.splice(p,1),T.selector&&k.delegateCount--,C.remove&&C.remove.call(t,T));v&&!k.length&&(C.teardown&&!1!==C.teardown.call(t,E,q.handle)||n.removeEvent(t,N,q.handle),delete y[N])}else for(N in y)n.event.remove(t,N+o[w],a,u,!0);n.isEmptyObject(y)&&(delete q.handle,Q.remove(t,"events"))}},trigger:function(o,a,u,l){var p,v,m,y,T,k,N,E=[u||C],A=w.call(o,"type")?o.type:o,q=w.call(o,"namespace")?o.namespace.split("."):[];if(v=m=u=u||C,3!==u.nodeType&&8!==u.nodeType&&!le.test(A+n.event.triggered)&&(A.indexOf(".")>=0&&(q=A.split("."),A=q.shift(),q.sort()),T=A.indexOf(":")<0&&"on"+A,(o=o[n.expando]?o:new n.Event(A,"object"==typeof o&&o)).isTrigger=l?2:3,o.namespace=q.join("."),o.namespace_re=o.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,o.result=void 0,o.target||(o.target=u),a=null==a?[o]:n.makeArray(a,[o]),N=n.event.special[A]||{},l||!N.trigger||!1!==N.trigger.apply(u,a))){if(!l&&!N.noBubble&&!n.isWindow(u)){for(y=N.delegateType||A,le.test(y+A)||(v=v.parentNode);v;v=v.parentNode)E.push(v),m=v;m===(u.ownerDocument||C)&&E.push(m.defaultView||m.parentWindow||t)}for(p=0;(v=E[p++])&&!o.isPropagationStopped();)o.type=p>1?y:N.bindType||A,(k=(Q.get(v,"events")||{})[o.type]&&Q.get(v,"handle"))&&k.apply(v,a),(k=T&&v[T])&&k.apply&&n.acceptData(v)&&(o.result=k.apply(v,a),!1===o.result&&o.preventDefault());return o.type=A,l||o.isDefaultPrevented()||N._default&&!1!==N._default.apply(E.pop(),a)||!n.acceptData(u)||T&&n.isFunction(u[A])&&!n.isWindow(u)&&((m=u[T])&&(u[T]=null),n.event.triggered=A,u[A](),n.event.triggered=void 0,m&&(u[T]=m)),o.result}},dispatch:function(t){t=n.event.fix(t);var o,a,l,p,v,m=[],y=u.call(arguments),w=(Q.get(this,"events")||{})[t.type]||[],T=n.event.special[t.type]||{};if(y[0]=t,t.delegateTarget=this,!T.preDispatch||!1!==T.preDispatch.call(this,t)){for(m=n.event.handlers.call(this,t,w),o=0;(p=m[o++])&&!t.isPropagationStopped();)for(t.currentTarget=p.elem,a=0;(v=p.handlers[a++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(v.namespace))&&(t.handleObj=v,t.data=v.data,void 0!==(l=((n.event.special[v.origType]||{}).handle||v.handler).apply(p.elem,y))&&!1===(t.result=l)&&(t.preventDefault(),t.stopPropagation()));return T.postDispatch&&T.postDispatch.call(this,t),t.result}},handlers:function(t,o){var a,u,l,p,v=[],m=o.delegateCount,y=t.target;if(m&&y.nodeType&&(!t.button||"click"!==t.type))for(;y!==this;y=y.parentNode||this)if(!0!==y.disabled||"click"!==t.type){for(u=[],a=0;m>a;a++)void 0===u[l=(p=o[a]).selector+" "]&&(u[l]=p.needsContext?n(l,this).index(y)>=0:n.find(l,this,null,[y]).length),u[l]&&u.push(p);u.length&&v.push({elem:y,handlers:u})}return m<o.length&&v.push({elem:this,handlers:o.slice(m)}),v},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,o){return null==t.which&&(t.which=null!=o.charCode?o.charCode:o.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,o){var a,u,l,p=o.button;return null==t.pageX&&null!=o.clientX&&(u=(a=t.target.ownerDocument||C).documentElement,l=a.body,t.pageX=o.clientX+(u&&u.scrollLeft||l&&l.scrollLeft||0)-(u&&u.clientLeft||l&&l.clientLeft||0),t.pageY=o.clientY+(u&&u.scrollTop||l&&l.scrollTop||0)-(u&&u.clientTop||l&&l.clientTop||0)),t.which||void 0===p||(t.which=1&p?1:2&p?3:4&p?2:0),t}},fix:function(t){if(t[n.expando])return t;var o,a,u,l=t.type,p=t,v=this.fixHooks[l];for(v||(this.fixHooks[l]=v=ue.test(l)?this.mouseHooks:se.test(l)?this.keyHooks:{}),u=v.props?this.props.concat(v.props):this.props,t=new n.Event(p),o=u.length;o--;)t[a=u[o]]=p[a];return t.target||(t.target=C),3===t.target.nodeType&&(t.target=t.target.parentNode),v.filter?v.filter(t,p):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(t){return n.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,o,a,u){var l=n.extend(new n.Event,a,{type:t,isSimulated:!0,originalEvent:{}});u?n.event.trigger(l,null,o):n.event.dispatch.call(o,l),l.isDefaultPrevented()&&a.preventDefault()}},n.removeEvent=function(t,o,a){t.removeEventListener&&t.removeEventListener(o,a,!1)},n.Event=function(t,o){return this instanceof n.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Z:$):this.type=t,o&&n.extend(this,o),this.timeStamp=t&&t.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(t,o)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Z,t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Z,t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Z,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,o){n.event.special[t]={delegateType:o,bindType:o,handle:function(t){var a,u=t.relatedTarget,l=t.handleObj;return(!u||u!==this&&!n.contains(this,u))&&(t.type=l.origType,a=l.handler.apply(this,arguments),t.type=o),a}}}),T.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(t,o){var c=function(t){n.event.simulate(o,t.target,n.event.fix(t),!0)};n.event.special[o]={setup:function(){var a=this.ownerDocument||this,u=Q.access(a,o);u||a.addEventListener(t,c,!0),Q.access(a,o,(u||0)+1)},teardown:function(){var a=this.ownerDocument||this,u=Q.access(a,o)-1;u?Q.access(a,o,u):(a.removeEventListener(t,c,!0),Q.remove(a,o))}}}),n.fn.extend({on:function(t,o,a,u,l){var p,v;if("object"==typeof t){for(v in"string"!=typeof o&&(a=a||o,o=void 0),t)this.on(v,o,a,t[v],l);return this}if(null==a&&null==u?(u=o,a=o=void 0):null==u&&("string"==typeof o?(u=a,a=void 0):(u=a,a=o,o=void 0)),!1===u)u=$;else if(!u)return this;return 1===l&&(p=u,u=function(t){return n().off(t),p.apply(this,arguments)},u.guid=p.guid||(p.guid=n.guid++)),this.each(function(){n.event.add(this,t,u,a,o)})},one:function(t,o,a,u){return this.on(t,o,a,u,1)},off:function(t,o,a){var u,l;if(t&&t.preventDefault&&t.handleObj)return u=t.handleObj,n(t.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof t){for(l in t)this.off(l,o,t[l]);return this}return(!1===o||"function"==typeof o)&&(a=o,o=void 0),!1===a&&(a=$),this.each(function(){n.event.remove(this,t,a,o)})},trigger:function(t,o){return this.each(function(){n.event.trigger(t,o,this)})},triggerHandler:function(t,o){var a=this[0];return a?n.event.trigger(t,o,a,!0):void 0}});var fe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,pe=/<([\w:]+)/,de=/<|&#?\w+;/,he=/<(?:script|style|link)/i,ge=/checked\s*(?:[^=]|=\s*.checked.)/i,ve=/^$|\/(?:java|ecma)script/i,me=/^true\/(.*)/,ye=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,xe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ja(t,o){return n.nodeName(t,"table")&&n.nodeName(11!==o.nodeType?o:o.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function ka(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function la(t){var o=me.exec(t.type);return o?t.type=o[1]:t.removeAttribute("type"),t}function ma(t,o){for(var a=0,u=t.length;u>a;a++)Q.set(t[a],"globalEval",!o||Q.get(o[a],"globalEval"))}function na(t,o){var a,u,l,p,v,m,y,w;if(1===o.nodeType){if(Q.hasData(t)&&(p=Q.access(t),v=Q.set(o,p),w=p.events))for(l in delete v.handle,v.events={},w)for(a=0,u=w[l].length;u>a;a++)n.event.add(o,l,w[l][a]);ee.hasData(t)&&(m=ee.access(t),y=n.extend({},m),ee.set(o,y))}}function oa(t,o){var a=t.getElementsByTagName?t.getElementsByTagName(o||"*"):t.querySelectorAll?t.querySelectorAll(o||"*"):[];return void 0===o||o&&n.nodeName(t,o)?n.merge([t],a):a}function pa(t,o){var a=o.nodeName.toLowerCase();"input"===a&&oe.test(t.type)?o.checked=t.checked:("input"===a||"textarea"===a)&&(o.defaultValue=t.defaultValue)}xe.optgroup=xe.option,xe.tbody=xe.tfoot=xe.colgroup=xe.caption=xe.thead,xe.th=xe.td,n.extend({clone:function(t,o,a){var u,l,p,v,m=t.cloneNode(!0),y=n.contains(t.ownerDocument,t);if(!(T.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||n.isXMLDoc(t)))for(v=oa(m),u=0,l=(p=oa(t)).length;l>u;u++)pa(p[u],v[u]);if(o)if(a)for(p=p||oa(t),v=v||oa(m),u=0,l=p.length;l>u;u++)na(p[u],v[u]);else na(t,m);return(v=oa(m,"script")).length>0&&ma(v,!y&&oa(t,"script")),m},buildFragment:function(t,o,a,u){for(var l,p,v,m,y,w,T=o.createDocumentFragment(),C=[],k=0,N=t.length;N>k;k++)if((l=t[k])||0===l)if("object"===n.type(l))n.merge(C,l.nodeType?[l]:l);else if(de.test(l)){for(p=p||T.appendChild(o.createElement("div")),v=(pe.exec(l)||["",""])[1].toLowerCase(),m=xe[v]||xe._default,p.innerHTML=m[1]+l.replace(fe,"<$1></$2>")+m[2],w=m[0];w--;)p=p.lastChild;n.merge(C,p.childNodes),(p=T.firstChild).textContent=""}else C.push(o.createTextNode(l));for(T.textContent="",k=0;l=C[k++];)if((!u||-1===n.inArray(l,u))&&(y=n.contains(l.ownerDocument,l),p=oa(T.appendChild(l),"script"),y&&ma(p),a))for(w=0;l=p[w++];)ve.test(l.type||"")&&a.push(l);return T},cleanData:function(t){for(var o,a,u,l,p=n.event.special,v=0;void 0!==(a=t[v]);v++){if(n.acceptData(a)&&((l=a[Q.expando])&&(o=Q.cache[l]))){if(o.events)for(u in o.events)p[u]?n.event.remove(a,u):n.removeEvent(a,u,o.handle);Q.cache[l]&&delete Q.cache[l]}delete ee.cache[a[ee.expando]]}}}),n.fn.extend({text:function(t){return Y(this,function(t){return void 0===t?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=t)})},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ja(this,t).appendChild(t)})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var o=ja(this,t);o.insertBefore(t,o.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,o){for(var a,u=t?n.filter(t,this):this,l=0;null!=(a=u[l]);l++)o||1!==a.nodeType||n.cleanData(oa(a)),a.parentNode&&(o&&n.contains(a.ownerDocument,a)&&ma(oa(a,"script")),a.parentNode.removeChild(a));return this},empty:function(){for(var t,o=0;null!=(t=this[o]);o++)1===t.nodeType&&(n.cleanData(oa(t,!1)),t.textContent="");return this},clone:function(t,o){return t=null!=t&&t,o=null==o?t:o,this.map(function(){return n.clone(this,t,o)})},html:function(t){return Y(this,function(t){var o=this[0]||{},a=0,u=this.length;if(void 0===t&&1===o.nodeType)return o.innerHTML;if("string"==typeof t&&!he.test(t)&&!xe[(pe.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(fe,"<$1></$2>");try{for(;u>a;a++)1===(o=this[a]||{}).nodeType&&(n.cleanData(oa(o,!1)),o.innerHTML=t);o=0}catch(t){}}o&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=arguments[0];return this.domManip(arguments,function(o){t=this.parentNode,n.cleanData(oa(this)),t&&t.replaceChild(o,this)}),t&&(t.length||t.nodeType)?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,o){t=l.apply([],t);var a,u,p,v,m,y,w=0,C=this.length,k=this,N=C-1,E=t[0],A=n.isFunction(E);if(A||C>1&&"string"==typeof E&&!T.checkClone&&ge.test(E))return this.each(function(a){var u=k.eq(a);A&&(t[0]=E.call(this,a,u.html())),u.domManip(t,o)});if(C&&(u=(a=n.buildFragment(t,this[0].ownerDocument,!1,this)).firstChild,1===a.childNodes.length&&(a=u),u)){for(v=(p=n.map(oa(a,"script"),ka)).length;C>w;w++)m=a,w!==N&&(m=n.clone(m,!0,!0),v&&n.merge(p,oa(m,"script"))),o.call(this[w],m,w);if(v)for(y=p[p.length-1].ownerDocument,n.map(p,la),w=0;v>w;w++)m=p[w],ve.test(m.type||"")&&!Q.access(m,"globalEval")&&n.contains(y,m)&&(m.src?n._evalUrl&&n._evalUrl(m.src):n.globalEval(m.textContent.replace(ye,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,o){n.fn[t]=function(t){for(var a,u=[],l=n(t),v=l.length-1,m=0;v>=m;m++)a=m===v?this:this.clone(!0),n(l[m])[o](a),p.apply(u,a.get());return this.pushStack(u)}});var be,we={};function sa(o,a){var u,l=n(a.createElement(o)).appendTo(a.body),p=t.getDefaultComputedStyle&&(u=t.getDefaultComputedStyle(l[0]))?u.display:n.css(l[0],"display");return l.detach(),p}function ta(t){var o=C,a=we[t];return a||("none"!==(a=sa(t,o))&&a||((o=(be=(be||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(o.documentElement))[0].contentDocument).write(),o.close(),a=sa(t,o),be.detach()),we[t]=a),a}var Te=/^margin/,Ce=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),wa=function(o){return o.ownerDocument.defaultView.opener?o.ownerDocument.defaultView.getComputedStyle(o,null):t.getComputedStyle(o,null)};function xa(t,o,a){var u,l,p,v,m=t.style;return(a=a||wa(t))&&(v=a.getPropertyValue(o)||a[o]),a&&(""!==v||n.contains(t.ownerDocument,t)||(v=n.style(t,o)),Ce.test(v)&&Te.test(o)&&(u=m.width,l=m.minWidth,p=m.maxWidth,m.minWidth=m.maxWidth=m.width=v,v=a.width,m.width=u,m.minWidth=l,m.maxWidth=p)),void 0!==v?v+"":v}function ya(t,o){return{get:function(){return t()?void delete this.get:(this.get=o).apply(this,arguments)}}}!function(){var o,a,u=C.documentElement,l=C.createElement("div"),p=C.createElement("div");if(p.style){function g(){p.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",p.innerHTML="",u.appendChild(l);var v=t.getComputedStyle(p,null);o="1%"!==v.top,a="4px"===v.width,u.removeChild(l)}p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",T.clearCloneStyle="content-box"===p.style.backgroundClip,l.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",l.appendChild(p),t.getComputedStyle&&n.extend(T,{pixelPosition:function(){return g(),o},boxSizingReliable:function(){return null==a&&g(),a},reliableMarginRight:function(){var o,a=p.appendChild(C.createElement("div"));return a.style.cssText=p.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",a.style.marginRight=a.style.width="0",p.style.width="1px",u.appendChild(l),o=!parseFloat(t.getComputedStyle(a,null).marginRight),u.removeChild(l),p.removeChild(a),o}})}}(),n.swap=function(t,o,a,u){var l,p,v={};for(p in o)v[p]=t.style[p],t.style[p]=o[p];for(p in l=a.apply(t,u||[]),o)t.style[p]=v[p];return l};var ke=/^(none|table(?!-c[ea]).+)/,Ne=new RegExp("^("+re+")(.*)$","i"),Ee=new RegExp("^([+-])=("+re+")","i"),je={position:"absolute",visibility:"hidden",display:"block"},Se={letterSpacing:"0",fontWeight:"400"},De=["Webkit","O","Moz","ms"];function Fa(t,o){if(o in t)return o;for(var a=o[0].toUpperCase()+o.slice(1),u=o,l=De.length;l--;)if((o=De[l]+a)in t)return o;return u}function Ga(t,o,a){var u=Ne.exec(o);return u?Math.max(0,u[1]-(a||0))+(u[2]||"px"):o}function Ha(t,o,a,u,l){for(var p=a===(u?"border":"content")?4:"width"===o?1:0,v=0;4>p;p+=2)"margin"===a&&(v+=n.css(t,a+ie[p],!0,l)),u?("content"===a&&(v-=n.css(t,"padding"+ie[p],!0,l)),"margin"!==a&&(v-=n.css(t,"border"+ie[p]+"Width",!0,l))):(v+=n.css(t,"padding"+ie[p],!0,l),"padding"!==a&&(v+=n.css(t,"border"+ie[p]+"Width",!0,l)));return v}function Ia(t,o,a){var u=!0,l="width"===o?t.offsetWidth:t.offsetHeight,p=wa(t),v="border-box"===n.css(t,"boxSizing",!1,p);if(0>=l||null==l){if((0>(l=xa(t,o,p))||null==l)&&(l=t.style[o]),Ce.test(l))return l;u=v&&(T.boxSizingReliable()||l===t.style[o]),l=parseFloat(l)||0}return l+Ha(t,o,a||(v?"border":"content"),u,p)+"px"}function Ja(t,o){for(var a,u,l,p=[],v=0,m=t.length;m>v;v++)(u=t[v]).style&&(p[v]=Q.get(u,"olddisplay"),a=u.style.display,o?(p[v]||"none"!==a||(u.style.display=""),""===u.style.display&&S(u)&&(p[v]=Q.access(u,"olddisplay",ta(u.nodeName)))):(l=S(u),"none"===a&&l||Q.set(u,"olddisplay",l?a:n.css(u,"display"))));for(v=0;m>v;v++)(u=t[v]).style&&(o&&"none"!==u.style.display&&""!==u.style.display||(u.style.display=o?p[v]||"":"none"));return t}function Ka(t,o,a,u,l){return new Ka.prototype.init(t,o,a,u,l)}n.extend({cssHooks:{opacity:{get:function(t,o){if(o){var a=xa(t,"opacity");return""===a?"1":a}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,o,a,u){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var l,p,v,m=n.camelCase(o),y=t.style;return o=n.cssProps[m]||(n.cssProps[m]=Fa(y,m)),v=n.cssHooks[o]||n.cssHooks[m],void 0===a?v&&"get"in v&&void 0!==(l=v.get(t,!1,u))?l:y[o]:("string"===(p=typeof a)&&(l=Ee.exec(a))&&(a=(l[1]+1)*l[2]+parseFloat(n.css(t,o)),p="number"),void(null!=a&&a==a&&("number"!==p||n.cssNumber[m]||(a+="px"),T.clearCloneStyle||""!==a||0!==o.indexOf("background")||(y[o]="inherit"),v&&"set"in v&&void 0===(a=v.set(t,a,u))||(y[o]=a))))}},css:function(t,o,a,u){var l,p,v,m=n.camelCase(o);return o=n.cssProps[m]||(n.cssProps[m]=Fa(t.style,m)),(v=n.cssHooks[o]||n.cssHooks[m])&&"get"in v&&(l=v.get(t,!0,a)),void 0===l&&(l=xa(t,o,u)),"normal"===l&&o in Se&&(l=Se[o]),""===a||a?(p=parseFloat(l),!0===a||n.isNumeric(p)?p||0:l):l}}),n.each(["height","width"],function(t,o){n.cssHooks[o]={get:function(t,a,u){return a?ke.test(n.css(t,"display"))&&0===t.offsetWidth?n.swap(t,je,function(){return Ia(t,o,u)}):Ia(t,o,u):void 0},set:function(t,a,u){var l=u&&wa(t);return Ga(0,a,u?Ha(t,o,u,"border-box"===n.css(t,"boxSizing",!1,l),l):0)}}}),n.cssHooks.marginRight=ya(T.reliableMarginRight,function(t,o){return o?n.swap(t,{display:"inline-block"},xa,[t,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(t,o){n.cssHooks[t+o]={expand:function(a){for(var u=0,l={},p="string"==typeof a?a.split(" "):[a];4>u;u++)l[t+ie[u]+o]=p[u]||p[u-2]||p[0];return l}},Te.test(t)||(n.cssHooks[t+o].set=Ga)}),n.fn.extend({css:function(t,o){return Y(this,function(t,o,a){var u,l,p={},v=0;if(n.isArray(o)){for(u=wa(t),l=o.length;l>v;v++)p[o[v]]=n.css(t,o[v],!1,u);return p}return void 0!==a?n.style(t,o,a):n.css(t,o)},t,o,arguments.length>1)},show:function(){return Ja(this,!0)},hide:function(){return Ja(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}}),n.Tween=Ka,Ka.prototype={constructor:Ka,init:function(t,o,a,u,l,p){this.elem=t,this.prop=a,this.easing=l||"swing",this.options=o,this.start=this.now=this.cur(),this.end=u,this.unit=p||(n.cssNumber[a]?"":"px")},cur:function(){var t=Ka.propHooks[this.prop];return t&&t.get?t.get(this):Ka.propHooks._default.get(this)},run:function(t){var o,a=Ka.propHooks[this.prop];return this.options.duration?this.pos=o=n.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=o=t,this.now=(this.end-this.start)*o+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),a&&a.set?a.set(this):Ka.propHooks._default.set(this),this}},Ka.prototype.init.prototype=Ka.prototype,Ka.propHooks={_default:{get:function(t){var o;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(o=n.css(t.elem,t.prop,""))&&"auto"!==o?o:0:t.elem[t.prop]},set:function(t){n.fx.step[t.prop]?n.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[n.cssProps[t.prop]]||n.cssHooks[t.prop])?n.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},Ka.propHooks.scrollTop=Ka.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},n.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},n.fx=Ka.prototype.init,n.fx.step={};var Ae,qe,Le=/^(?:toggle|show|hide)$/,He=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),Fe=/queueHooks$/,Oe=[function Va(t,o,a){var u,l,p,v,m,y,w,T=this,C={},k=t.style,N=t.nodeType&&S(t),E=Q.get(t,"fxshow");for(u in a.queue||(null==(m=n._queueHooks(t,"fx")).unqueued&&(m.unqueued=0,y=m.empty.fire,m.empty.fire=function(){m.unqueued||y()}),m.unqueued++,T.always(function(){T.always(function(){m.unqueued--,n.queue(t,"fx").length||m.empty.fire()})})),1===t.nodeType&&("height"in o||"width"in o)&&(a.overflow=[k.overflow,k.overflowX,k.overflowY],w=n.css(t,"display"),"inline"===("none"===w?Q.get(t,"olddisplay")||ta(t.nodeName):w)&&"none"===n.css(t,"float")&&(k.display="inline-block")),a.overflow&&(k.overflow="hidden",T.always(function(){k.overflow=a.overflow[0],k.overflowX=a.overflow[1],k.overflowY=a.overflow[2]})),o)if(l=o[u],Le.exec(l)){if(delete o[u],p=p||"toggle"===l,l===(N?"hide":"show")){if("show"!==l||!E||void 0===E[u])continue;N=!0}C[u]=E&&E[u]||n.style(t,u)}else w=void 0;if(n.isEmptyObject(C))"inline"===("none"===w?ta(t.nodeName):w)&&(k.display=w);else for(u in E?"hidden"in E&&(N=E.hidden):E=Q.access(t,"fxshow",{}),p&&(E.hidden=!N),N?n(t).show():T.done(function(){n(t).hide()}),T.done(function(){var o;for(o in Q.remove(t,"fxshow"),C)n.style(t,o,C[o])}),C)v=Ua(N?E[u]:0,u,T),u in E||(E[u]=v.start,N&&(v.end=v.start,v.start="width"===u||"height"===u?1:0))}],Pe={"*":[function(t,o){var a=this.createTween(t,o),u=a.cur(),l=He.exec(o),p=l&&l[3]||(n.cssNumber[t]?"":"px"),v=(n.cssNumber[t]||"px"!==p&&+u)&&He.exec(n.css(a.elem,t)),m=1,y=20;if(v&&v[3]!==p){p=p||v[3],l=l||[],v=+u||1;do{v/=m=m||".5",n.style(a.elem,t,v+p)}while(m!==(m=a.cur()/u)&&1!==m&&--y)}return l&&(v=a.start=+v||+u||0,a.unit=p,a.end=l[1]?v+(l[1]+1)*l[2]:+l[2]),a}]};function Sa(){return setTimeout(function(){Ae=void 0}),Ae=n.now()}function Ta(t,o){var a,u=0,l={height:t};for(o=o?1:0;4>u;u+=2-o)l["margin"+(a=ie[u])]=l["padding"+a]=t;return o&&(l.opacity=l.width=t),l}function Ua(t,o,a){for(var u,l=(Pe[o]||[]).concat(Pe["*"]),p=0,v=l.length;v>p;p++)if(u=l[p].call(a,o,t))return u}function Xa(t,o,a){var u,l,p=0,v=Oe.length,m=n.Deferred().always(function(){delete i.elem}),i=function(){if(l)return!1;for(var o=Ae||Sa(),a=Math.max(0,y.startTime+y.duration-o),u=1-(a/y.duration||0),p=0,v=y.tweens.length;v>p;p++)y.tweens[p].run(u);return m.notifyWith(t,[y,u,a]),1>u&&v?a:(m.resolveWith(t,[y]),!1)},y=m.promise({elem:t,props:n.extend({},o),opts:n.extend(!0,{specialEasing:{}},a),originalProperties:o,originalOptions:a,startTime:Ae||Sa(),duration:a.duration,tweens:[],createTween:function(o,a){var u=n.Tween(t,y.opts,o,a,y.opts.specialEasing[o]||y.opts.easing);return y.tweens.push(u),u},stop:function(o){var a=0,u=o?y.tweens.length:0;if(l)return this;for(l=!0;u>a;a++)y.tweens[a].run(1);return o?m.resolveWith(t,[y,o]):m.rejectWith(t,[y,o]),this}}),w=y.props;for(function Wa(t,o){var a,u,l,p,v;for(a in t)if(l=o[u=n.camelCase(a)],p=t[a],n.isArray(p)&&(l=p[1],p=t[a]=p[0]),a!==u&&(t[u]=p,delete t[a]),(v=n.cssHooks[u])&&"expand"in v)for(a in p=v.expand(p),delete t[u],p)a in t||(t[a]=p[a],o[a]=l);else o[u]=l}(w,y.opts.specialEasing);v>p;p++)if(u=Oe[p].call(y,t,w,y.opts))return u;return n.map(w,Ua,y),n.isFunction(y.opts.start)&&y.opts.start.call(t,y),n.fx.timer(n.extend(i,{elem:t,anim:y,queue:y.opts.queue})),y.progress(y.opts.progress).done(y.opts.done,y.opts.complete).fail(y.opts.fail).always(y.opts.always)}n.Animation=n.extend(Xa,{tweener:function(t,o){n.isFunction(t)?(o=t,t=["*"]):t=t.split(" ");for(var a,u=0,l=t.length;l>u;u++)a=t[u],Pe[a]=Pe[a]||[],Pe[a].unshift(o)},prefilter:function(t,o){o?Oe.unshift(t):Oe.push(t)}}),n.speed=function(t,o,a){var u=t&&"object"==typeof t?n.extend({},t):{complete:a||!a&&o||n.isFunction(t)&&t,duration:t,easing:a&&o||o&&!n.isFunction(o)&&o};return u.duration=n.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in n.fx.speeds?n.fx.speeds[u.duration]:n.fx.speeds._default,(null==u.queue||!0===u.queue)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){n.isFunction(u.old)&&u.old.call(this),u.queue&&n.dequeue(this,u.queue)},u},n.fn.extend({fadeTo:function(t,o,a,u){return this.filter(S).css("opacity",0).show().end().animate({opacity:o},t,a,u)},animate:function(t,o,a,u){var l=n.isEmptyObject(t),p=n.speed(o,a,u),g=function(){var o=Xa(this,n.extend({},t),p);(l||Q.get(this,"finish"))&&o.stop(!0)};return g.finish=g,l||!1===p.queue?this.each(g):this.queue(p.queue,g)},stop:function(t,o,a){var d=function(t){var o=t.stop;delete t.stop,o(a)};return"string"!=typeof t&&(a=o,o=t,t=void 0),o&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var o=!0,u=null!=t&&t+"queueHooks",l=n.timers,p=Q.get(this);if(u)p[u]&&p[u].stop&&d(p[u]);else for(u in p)p[u]&&p[u].stop&&Fe.test(u)&&d(p[u]);for(u=l.length;u--;)l[u].elem!==this||null!=t&&l[u].queue!==t||(l[u].anim.stop(a),o=!1,l.splice(u,1));(o||!a)&&n.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var o,a=Q.get(this),u=a[t+"queue"],l=a[t+"queueHooks"],p=n.timers,v=u?u.length:0;for(a.finish=!0,n.queue(this,t,[]),l&&l.stop&&l.stop.call(this,!0),o=p.length;o--;)p[o].elem===this&&p[o].queue===t&&(p[o].anim.stop(!0),p.splice(o,1));for(o=0;v>o;o++)u[o]&&u[o].finish&&u[o].finish.call(this);delete a.finish})}}),n.each(["toggle","show","hide"],function(t,o){var a=n.fn[o];n.fn[o]=function(t,u,l){return null==t||"boolean"==typeof t?a.apply(this,arguments):this.animate(Ta(o,!0),t,u,l)}}),n.each({slideDown:Ta("show"),slideUp:Ta("hide"),slideToggle:Ta("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,o){n.fn[t]=function(t,a,u){return this.animate(o,t,a,u)}}),n.timers=[],n.fx.tick=function(){var t,o=0,a=n.timers;for(Ae=n.now();o<a.length;o++)(t=a[o])()||a[o]!==t||a.splice(o--,1);a.length||n.fx.stop(),Ae=void 0},n.fx.timer=function(t){n.timers.push(t),t()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){qe||(qe=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(qe),qe=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(t,o){return t=n.fx&&n.fx.speeds[t]||t,o=o||"fx",this.queue(o,function(o,a){var u=setTimeout(o,t);a.stop=function(){clearTimeout(u)}})},function(){var t=C.createElement("input"),o=C.createElement("select"),a=o.appendChild(C.createElement("option"));t.type="checkbox",T.checkOn=""!==t.value,T.optSelected=a.selected,o.disabled=!0,T.optDisabled=!a.disabled,(t=C.createElement("input")).value="t",t.type="radio",T.radioValue="t"===t.value}();var Re,Me=n.expr.attrHandle;n.fn.extend({attr:function(t,o){return Y(this,n.attr,t,o,arguments.length>1)},removeAttr:function(t){return this.each(function(){n.removeAttr(this,t)})}}),n.extend({attr:function(t,o,a){var u,l,p=t.nodeType;if(t&&3!==p&&8!==p&&2!==p)return typeof t.getAttribute===ae?n.prop(t,o,a):(1===p&&n.isXMLDoc(t)||(o=o.toLowerCase(),u=n.attrHooks[o]||(n.expr.match.bool.test(o)?Re:void 0)),void 0===a?u&&"get"in u&&null!==(l=u.get(t,o))?l:null==(l=n.find.attr(t,o))?void 0:l:null!==a?u&&"set"in u&&void 0!==(l=u.set(t,a,o))?l:(t.setAttribute(o,a+""),a):void n.removeAttr(t,o))},removeAttr:function(t,o){var a,u,l=0,p=o&&o.match(U);if(p&&1===t.nodeType)for(;a=p[l++];)u=n.propFix[a]||a,n.expr.match.bool.test(a)&&(t[u]=!1),t.removeAttribute(a)},attrHooks:{type:{set:function(t,o){if(!T.radioValue&&"radio"===o&&n.nodeName(t,"input")){var a=t.value;return t.setAttribute("type",o),a&&(t.value=a),o}}}}}),Re={set:function(t,o,a){return!1===o?n.removeAttr(t,a):t.setAttribute(a,a),a}},n.each(n.expr.match.bool.source.match(/\w+/g),function(t,o){var a=Me[o]||n.find.attr;Me[o]=function(t,o,u){var l,p;return u||(p=Me[o],Me[o]=l,l=null!=a(t,o,u)?o.toLowerCase():null,Me[o]=p),l}});var $e=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(t,o){return Y(this,n.prop,t,o,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[n.propFix[t]||t]})}}),n.extend({propFix:{for:"htmlFor",class:"className"},prop:function(t,o,a){var u,l,p=t.nodeType;if(t&&3!==p&&8!==p&&2!==p)return(1!==p||!n.isXMLDoc(t))&&(o=n.propFix[o]||o,l=n.propHooks[o]),void 0!==a?l&&"set"in l&&void 0!==(u=l.set(t,a,o))?u:t[o]=a:l&&"get"in l&&null!==(u=l.get(t,o))?u:t[o]},propHooks:{tabIndex:{get:function(t){return t.hasAttribute("tabindex")||$e.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),T.optSelected||(n.propHooks.selected={get:function(t){var o=t.parentNode;return o&&o.parentNode&&o.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var We=/[\t\r\n\f]/g;n.fn.extend({addClass:function(t){var o,a,u,l,p,v,m="string"==typeof t&&t,y=0,w=this.length;if(n.isFunction(t))return this.each(function(o){n(this).addClass(t.call(this,o,this.className))});if(m)for(o=(t||"").match(U)||[];w>y;y++)if(u=1===(a=this[y]).nodeType&&(a.className?(" "+a.className+" ").replace(We," "):" ")){for(p=0;l=o[p++];)u.indexOf(" "+l+" ")<0&&(u+=l+" ");v=n.trim(u),a.className!==v&&(a.className=v)}return this},removeClass:function(t){var o,a,u,l,p,v,m=0===arguments.length||"string"==typeof t&&t,y=0,w=this.length;if(n.isFunction(t))return this.each(function(o){n(this).removeClass(t.call(this,o,this.className))});if(m)for(o=(t||"").match(U)||[];w>y;y++)if(u=1===(a=this[y]).nodeType&&(a.className?(" "+a.className+" ").replace(We," "):"")){for(p=0;l=o[p++];)for(;u.indexOf(" "+l+" ")>=0;)u=u.replace(" "+l+" "," ");v=t?n.trim(u):"",a.className!==v&&(a.className=v)}return this},toggleClass:function(t,o){var a=typeof t;return"boolean"==typeof o&&"string"===a?o?this.addClass(t):this.removeClass(t):this.each(n.isFunction(t)?function(a){n(this).toggleClass(t.call(this,a,this.className,o),o)}:function(){if("string"===a)for(var o,u=0,l=n(this),p=t.match(U)||[];o=p[u++];)l.hasClass(o)?l.removeClass(o):l.addClass(o);else(a===ae||"boolean"===a)&&(this.className&&Q.set(this,"__className__",this.className),this.className=this.className||!1===t?"":Q.get(this,"__className__")||"")})},hasClass:function(t){for(var o=" "+t+" ",a=0,u=this.length;u>a;a++)if(1===this[a].nodeType&&(" "+this[a].className+" ").replace(We," ").indexOf(o)>=0)return!0;return!1}});var Ie=/\r/g;n.fn.extend({val:function(t){var o,a,u,l=this[0];return arguments.length?(u=n.isFunction(t),this.each(function(a){var l;1===this.nodeType&&(null==(l=u?t.call(this,a,n(this).val()):t)?l="":"number"==typeof l?l+="":n.isArray(l)&&(l=n.map(l,function(t){return null==t?"":t+""})),(o=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()])&&"set"in o&&void 0!==o.set(this,l,"value")||(this.value=l))})):l?(o=n.valHooks[l.type]||n.valHooks[l.nodeName.toLowerCase()])&&"get"in o&&void 0!==(a=o.get(l,"value"))?a:"string"==typeof(a=l.value)?a.replace(Ie,""):null==a?"":a:void 0}}),n.extend({valHooks:{option:{get:function(t){var o=n.find.attr(t,"value");return null!=o?o:n.trim(n.text(t))}},select:{get:function(t){for(var o,a,u=t.options,l=t.selectedIndex,p="select-one"===t.type||0>l,v=p?null:[],m=p?l+1:u.length,y=0>l?m:p?l:0;m>y;y++)if(!(!(a=u[y]).selected&&y!==l||(T.optDisabled?a.disabled:null!==a.getAttribute("disabled"))||a.parentNode.disabled&&n.nodeName(a.parentNode,"optgroup"))){if(o=n(a).val(),p)return o;v.push(o)}return v},set:function(t,o){for(var a,u,l=t.options,p=n.makeArray(o),v=l.length;v--;)((u=l[v]).selected=n.inArray(u.value,p)>=0)&&(a=!0);return a||(t.selectedIndex=-1),p}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(t,o){return n.isArray(o)?t.checked=n.inArray(n(t).val(),o)>=0:void 0}},T.checkOn||(n.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,o){n.fn[o]=function(t,a){return arguments.length>0?this.on(o,null,t,a):this.trigger(o)}}),n.fn.extend({hover:function(t,o){return this.mouseenter(t).mouseleave(o||t)},bind:function(t,o,a){return this.on(t,null,o,a)},unbind:function(t,o){return this.off(t,null,o)},delegate:function(t,o,a,u){return this.on(o,t,a,u)},undelegate:function(t,o,a){return 1===arguments.length?this.off(t,"**"):this.off(o,t||"**",a)}});var Be=n.now(),_e=/\?/;n.parseJSON=function(t){return JSON.parse(t+"")},n.parseXML=function(t){var o;if(!t||"string"!=typeof t)return null;try{o=(new DOMParser).parseFromString(t,"text/xml")}catch(t){o=void 0}return(!o||o.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+t),o};var Xe=/#.*$/,ze=/([?&])_=[^&]*/,Ke=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ue=/^(?:GET|HEAD)$/,Ve=/^\/\//,Ge=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Je={},Ye={},Qe="*/".concat("*"),Ze=t.location.href,et=Ge.exec(Ze.toLowerCase())||[];function qb(t){return function(o,a){"string"!=typeof o&&(a=o,o="*");var u,l=0,p=o.toLowerCase().match(U)||[];if(n.isFunction(a))for(;u=p[l++];)"+"===u[0]?(u=u.slice(1)||"*",(t[u]=t[u]||[]).unshift(a)):(t[u]=t[u]||[]).push(a)}}function rb(t,o,a,u){var l={},p=t===Ye;function g(v){var m;return l[v]=!0,n.each(t[v]||[],function(t,v){var y=v(o,a,u);return"string"!=typeof y||p||l[y]?p?!(m=y):void 0:(o.dataTypes.unshift(y),g(y),!1)}),m}return g(o.dataTypes[0])||!l["*"]&&g("*")}function sb(t,o){var a,u,l=n.ajaxSettings.flatOptions||{};for(a in o)void 0!==o[a]&&((l[a]?t:u||(u={}))[a]=o[a]);return u&&n.extend(!0,t,u),t}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ze,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(et[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,o){return o?sb(sb(t,n.ajaxSettings),o):sb(n.ajaxSettings,t)},ajaxPrefilter:qb(Je),ajaxTransport:qb(Ye),ajax:function(t,o){"object"==typeof t&&(o=t,t=void 0),o=o||{};var a,u,l,p,v,m,y,w,T=n.ajaxSetup({},o),C=T.context||T,k=T.context&&(C.nodeType||C.jquery)?n(C):n.event,N=n.Deferred(),E=n.Callbacks("once memory"),A=T.statusCode||{},q={},L={},H=0,F="canceled",O={readyState:0,getResponseHeader:function(t){var o;if(2===H){if(!p)for(p={};o=Ke.exec(l);)p[o[1].toLowerCase()]=o[2];o=p[t.toLowerCase()]}return null==o?null:o},getAllResponseHeaders:function(){return 2===H?l:null},setRequestHeader:function(t,o){var a=t.toLowerCase();return H||(t=L[a]=L[a]||t,q[t]=o),this},overrideMimeType:function(t){return H||(T.mimeType=t),this},statusCode:function(t){var o;if(t)if(2>H)for(o in t)A[o]=[A[o],t[o]];else O.always(t[O.status]);return this},abort:function(t){var o=t||F;return a&&a.abort(o),x(0,o),this}};if(N.promise(O).complete=E.add,O.success=O.done,O.error=O.fail,T.url=((t||T.url||Ze)+"").replace(Xe,"").replace(Ve,et[1]+"//"),T.type=o.method||o.type||T.method||T.type,T.dataTypes=n.trim(T.dataType||"*").toLowerCase().match(U)||[""],null==T.crossDomain&&(m=Ge.exec(T.url.toLowerCase()),T.crossDomain=!(!m||m[1]===et[1]&&m[2]===et[2]&&(m[3]||("http:"===m[1]?"80":"443"))===(et[3]||("http:"===et[1]?"80":"443")))),T.data&&T.processData&&"string"!=typeof T.data&&(T.data=n.param(T.data,T.traditional)),rb(Je,T,o,O),2===H)return O;for(w in(y=n.event&&T.global)&&0===n.active++&&n.event.trigger("ajaxStart"),T.type=T.type.toUpperCase(),T.hasContent=!Ue.test(T.type),u=T.url,T.hasContent||(T.data&&(u=T.url+=(_e.test(u)?"&":"?")+T.data,delete T.data),!1===T.cache&&(T.url=ze.test(u)?u.replace(ze,"$1_="+Be++):u+(_e.test(u)?"&":"?")+"_="+Be++)),T.ifModified&&(n.lastModified[u]&&O.setRequestHeader("If-Modified-Since",n.lastModified[u]),n.etag[u]&&O.setRequestHeader("If-None-Match",n.etag[u])),(T.data&&T.hasContent&&!1!==T.contentType||o.contentType)&&O.setRequestHeader("Content-Type",T.contentType),O.setRequestHeader("Accept",T.dataTypes[0]&&T.accepts[T.dataTypes[0]]?T.accepts[T.dataTypes[0]]+("*"!==T.dataTypes[0]?", "+Qe+"; q=0.01":""):T.accepts["*"]),T.headers)O.setRequestHeader(w,T.headers[w]);if(T.beforeSend&&(!1===T.beforeSend.call(C,O,T)||2===H))return O.abort();for(w in F="abort",{success:1,error:1,complete:1})O[w](T[w]);if(a=rb(Ye,T,o,O)){O.readyState=1,y&&k.trigger("ajaxSend",[O,T]),T.async&&T.timeout>0&&(v=setTimeout(function(){O.abort("timeout")},T.timeout));try{H=1,a.send(q,x)}catch(t){if(!(2>H))throw t;x(-1,t)}}else x(-1,"No Transport");function x(t,o,p,m){var w,q,L,F,R,M=o;2!==H&&(H=2,v&&clearTimeout(v),a=void 0,l=m||"",O.readyState=t>0?4:0,w=t>=200&&300>t||304===t,p&&(F=function tb(t,o,a){for(var u,l,p,v,m=t.contents,y=t.dataTypes;"*"===y[0];)y.shift(),void 0===u&&(u=t.mimeType||o.getResponseHeader("Content-Type"));if(u)for(l in m)if(m[l]&&m[l].test(u)){y.unshift(l);break}if(y[0]in a)p=y[0];else{for(l in a){if(!y[0]||t.converters[l+" "+y[0]]){p=l;break}v||(v=l)}p=p||v}return p?(p!==y[0]&&y.unshift(p),a[p]):void 0}(T,O,p)),F=function ub(t,o,a,u){var l,p,v,m,y,w={},T=t.dataTypes.slice();if(T[1])for(v in t.converters)w[v.toLowerCase()]=t.converters[v];for(p=T.shift();p;)if(t.responseFields[p]&&(a[t.responseFields[p]]=o),!y&&u&&t.dataFilter&&(o=t.dataFilter(o,t.dataType)),y=p,p=T.shift())if("*"===p)p=y;else if("*"!==y&&y!==p){if(!(v=w[y+" "+p]||w["* "+p]))for(l in w)if((m=l.split(" "))[1]===p&&(v=w[y+" "+m[0]]||w["* "+m[0]])){!0===v?v=w[l]:!0!==w[l]&&(p=m[0],T.unshift(m[1]));break}if(!0!==v)if(v&&t.throws)o=v(o);else try{o=v(o)}catch(t){return{state:"parsererror",error:v?t:"No conversion from "+y+" to "+p}}}return{state:"success",data:o}}(T,F,O,w),w?(T.ifModified&&((R=O.getResponseHeader("Last-Modified"))&&(n.lastModified[u]=R),(R=O.getResponseHeader("etag"))&&(n.etag[u]=R)),204===t||"HEAD"===T.type?M="nocontent":304===t?M="notmodified":(M=F.state,q=F.data,w=!(L=F.error))):(L=M,(t||!M)&&(M="error",0>t&&(t=0))),O.status=t,O.statusText=(o||M)+"",w?N.resolveWith(C,[q,M,O]):N.rejectWith(C,[O,M,L]),O.statusCode(A),A=void 0,y&&k.trigger(w?"ajaxSuccess":"ajaxError",[O,T,w?q:L]),E.fireWith(C,[O,M]),y&&(k.trigger("ajaxComplete",[O,T]),--n.active||n.event.trigger("ajaxStop")))}return O},getJSON:function(t,o,a){return n.get(t,o,a,"json")},getScript:function(t,o){return n.get(t,void 0,o,"script")}}),n.each(["get","post"],function(t,o){n[o]=function(t,a,u,l){return n.isFunction(a)&&(l=l||u,u=a,a=void 0),n.ajax({url:t,type:o,dataType:l,data:a,success:u})}}),n._evalUrl=function(t){return n.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},n.fn.extend({wrapAll:function(t){var o;return n.isFunction(t)?this.each(function(o){n(this).wrapAll(t.call(this,o))}):(this[0]&&(o=n(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&o.insertBefore(this[0]),o.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return this.each(n.isFunction(t)?function(o){n(this).wrapInner(t.call(this,o))}:function(){var o=n(this),a=o.contents();a.length?a.wrapAll(t):o.append(t)})},wrap:function(t){var o=n.isFunction(t);return this.each(function(a){n(this).wrapAll(o?t.call(this,a):t)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},n.expr.filters.visible=function(t){return!n.expr.filters.hidden(t)};var tt=/%20/g,nt=/\[\]$/,rt=/\r?\n/g,it=/^(?:submit|button|image|reset|file)$/i,ot=/^(?:input|select|textarea|keygen)/i;function Ab(t,o,a,u){var l;if(n.isArray(o))n.each(o,function(o,l){a||nt.test(t)?u(t,l):Ab(t+"["+("object"==typeof l?o:"")+"]",l,a,u)});else if(a||"object"!==n.type(o))u(t,o);else for(l in o)Ab(t+"["+l+"]",o[l],a,u)}n.param=function(t,o){var a,u=[],e=function(t,o){o=n.isFunction(o)?o():null==o?"":o,u[u.length]=encodeURIComponent(t)+"="+encodeURIComponent(o)};if(void 0===o&&(o=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(t)||t.jquery&&!n.isPlainObject(t))n.each(t,function(){e(this.name,this.value)});else for(a in t)Ab(a,t[a],o,e);return u.join("&").replace(tt,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=n.prop(this,"elements");return t?n.makeArray(t):this}
vendor: 4,999 bytes, line 2
2).filter(function(){var t=this.type;return this.name&&!n(this).is(":disabled")&&ot.test(this.nodeName)&&!it.test(t)&&(this.checked||!oe.test(t))}).map(function(t,o){var a=n(this).val();return null==a?null:n.isArray(a)?n.map(a,function(t){return{name:o.name,value:t.replace(rt,"\r\n")}}):{name:o.name,value:a.replace(rt,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(t){}};var at=0,st={},ut={0:200,1223:204},lt=n.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in st)st[t]()}),T.cors=!!lt&&"withCredentials"in lt,T.ajax=lt=!!lt,n.ajaxTransport(function(t){var o;return T.cors||lt&&!t.crossDomain?{send:function(a,u){var l,p=t.xhr(),v=++at;if(p.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(l in t.xhrFields)p[l]=t.xhrFields[l];for(l in t.mimeType&&p.overrideMimeType&&p.overrideMimeType(t.mimeType),t.crossDomain||a["X-Requested-With"]||(a["X-Requested-With"]="XMLHttpRequest"),a)p.setRequestHeader(l,a[l]);o=function(t){return function(){o&&(delete st[v],o=p.onload=p.onerror=null,"abort"===t?p.abort():"error"===t?u(p.status,p.statusText):u(ut[p.status]||p.status,p.statusText,"string"==typeof p.responseText?{text:p.responseText}:void 0,p.getAllResponseHeaders()))}},p.onload=o(),p.onerror=o("error"),o=st[v]=o("abort");try{p.send(t.hasContent&&t.data||null)}catch(t){if(o)throw t}},abort:function(){o&&o()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return n.globalEval(t),t}}}),n.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),n.ajaxTransport("script",function(t){var o,a;if(t.crossDomain)return{send:function(u,l){o=n("<script>").prop({async:!0,charset:t.scriptCharset,src:t.url}).on("load error",a=function(t){o.remove(),a=null,t&&l("error"===t.type?404:200,t.type)}),C.head.appendChild(o[0])},abort:function(){a&&a()}}});var ct=[],ft=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=ct.pop()||n.expando+"_"+Be++;return this[t]=!0,t}}),n.ajaxPrefilter("json jsonp",function(o,a,u){var l,p,v,m=!1!==o.jsonp&&(ft.test(o.url)?"url":"string"==typeof o.data&&!(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&ft.test(o.data)&&"data");return m||"jsonp"===o.dataTypes[0]?(l=o.jsonpCallback=n.isFunction(o.jsonpCallback)?o.jsonpCallback():o.jsonpCallback,m?o[m]=o[m].replace(ft,"$1"+l):!1!==o.jsonp&&(o.url+=(_e.test(o.url)?"&":"?")+o.jsonp+"="+l),o.converters["script json"]=function(){return v||n.error(l+" was not called"),v[0]},o.dataTypes[0]="json",p=t[l],t[l]=function(){v=arguments},u.always(function(){t[l]=p,o[l]&&(o.jsonpCallback=a.jsonpCallback,ct.push(l)),v&&n.isFunction(p)&&p(v[0]),v=p=void 0}),"script"):void 0}),n.parseHTML=function(t,o,a){if(!t||"string"!=typeof t)return null;"boolean"==typeof o&&(a=o,o=!1),o=o||C;var u=H.exec(t),l=!a&&[];return u?[o.createElement(u[1])]:(u=n.buildFragment([t],o,l),l&&l.length&&n(l).remove(),n.merge([],u.childNodes))};var pt=n.fn.load;n.fn.load=function(t,o,a){if("string"!=typeof t&&pt)return pt.apply(this,arguments);var u,l,p,v=this,m=t.indexOf(" ");return m>=0&&(u=n.trim(t.slice(m)),t=t.slice(0,m)),n.isFunction(o)?(a=o,o=void 0):o&&"object"==typeof o&&(l="POST"),v.length>0&&n.ajax({url:t,type:l,dataType:"html",data:o}).done(function(t){p=arguments,v.html(u?n("<div>").append(n.parseHTML(t)).find(u):t)}).complete(a&&function(t,o){v.each(a,p||[t.responseText,o,t])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,o){n.fn[o]=function(t){return this.on(o,t)}}),n.expr.filters.animated=function(t){return n.grep(n.timers,function(o){return t===o.elem}).length};var dt=t.document.documentElement;function Jb(t){return n.isWindow(t)?t:9===t.nodeType&&t.defaultView}n.offset={setOffset:function(t,o,a){var u,l,p,v,m,y,w=n.css(t,"position"),T=n(t),C={};"static"===w&&(t.style.position="relative"),m=T.offset(),p=n.css(t,"top"),y=n.css(t,"left"),("absolute"===w||"fixed"===w)&&(p+y).indexOf("auto")>-1?(v=(u=T.position()).top,l=u.left):(v=parseFloat(p)||0,l=parseFloat(y)||0),n.isFunction(o)&&(o=o.call(t,a,m)),null!=o.top&&(C.top=o.top-m.top+v),null!=o.left&&(C.left=o.left-m.left+l),"using"in o?o.using.call(t,C):T.css(C)}},n.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(o){n.offset.setOffset(this,t,o)});var o,a,u=this[0],l={top:0,left:0},p=u&&u.ownerDocument;return p?(o=p.documentElement,n.contains(o,u)?(typeof u.getBoundingClientRect!==ae&&(l=u.getBoundingClientRect()),a=Jb(p),{top:l.top+a.pageYOffset-o.clientTop,left:l.left+a.pageXOffset-o.clientLeft}):l):void 0},position:function(){if(this[0]){var t,o,a=this[0],u={top:0,left:0};return"fixed"===n.css(a,"position")?o=a.getBoundingClientRect():(t=this.offsetParent(),o=this.offset(),n.nodeName(t[0],"html")||(u=t.offset()),u.to
2p+=n.css(t[0],"borderTopWidth",!0),u.left+=n.css(t[0],"borderLeftWidth",!0)),{top:o.top-u.top-n.css(a,"marginTop",!0),left:o.left-u.left-n.css(a,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||dt;t&&!n.nodeName(t,"html")&&"static"===n.css(t,"position");)t=t.offsetParent;return t||dt})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(o,a){var u="pageYOffset"===a;n.fn[o]=function(l){return Y(this,function(o,l,p){var v=Jb(o);return void 0===p?v?v[a]:o[l]:void(v?v.scrollTo(u?t.pageXOffset:p,u?p:t.pageYOffset):o[l]=p)},o,l,arguments.length,null)}}),n.each(["top","left"],function(t,o){n.cssHooks[o]=ya(T.pixelPosition,function(t,a){return a?(a=xa(t,o),Ce.test(a)?n(t).position()[o]+"px":a):void 0})}),n.each({Height:"height",Width:"width"},function(t,o){n.each({padding:"inner"+t,content:o,"":"outer"+t},function(a,u){n.fn[u]=function(u,l){var p=arguments.length&&(a||"boolean"!=typeof u),v=a||(!0===u||!0===l?"margin":"border");return Y(this,function(o,a,u){var l;return n.isWindow(o)?o.document.documentElement["client"+t]:9===o.nodeType?(l=o.documentElement,Math.max(o.body["scroll"+t],l["scroll"+t],o.body["offset"+t],l["offset"+t],l["client"+t])):void 0===u?n.css(o,a,v):n.style(o,a,u,v)},o,p?u:void 0,p,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var ht=t.jQuery,gt=t.$;return n.noConflict=function(o){return t.$===n&&(t.$=gt),o&&t.jQuery===n&&(t.jQuery=ht),n},typeof o===ae&&(t.jQuery=t.$=n),n});
3(function($){function format(t){for(var o=1;o<arguments.length;o++)t=t.replace("%"+(o-1),arguments[o]);return t}function CloudZoom(t,o){var i,e,s,a,n,l,d,r,u=$("img",t),p=null,c=null,h=null,m=null,f=null,g=null,A=0,v=0,x=0,b=0,y=0,z=0,w=this;setTimeout(function(){if(null===c){var o=t.width();t.parent().append(format('<div style="width:%0px;position:absolute;top:75%;left:%1px;text-align:center" class="cloud-zoom-loading" >Loading...</div>',o/3,o/2-o/6)).find(":last").css("opacity",.5)}},200);this.removeBits=function(){h&&(h.remove(),h=null),m&&(m.remove(),m=null),f&&(f.remove(),f=null),null!==g&&(g.remove(),g=null),$(".cloud-zoom-loading",t.parent()).remove()},this.destroy=function(){t.data("zoom",null),c&&(c.unbind(),c.remove(),c=null),p&&(p.remove(),p=null),this.removeBits()},this.fadedOut=function(){p&&(p.remove(),p=null),this.removeBits()},this.controlLoop=function(){if(h){var t=l-u.offset().left-.5*a|0,i=d-u.offset().top-.5*n|0;t<0?t=0:t>u.outerWidth()-a&&(t=u.outerWidth()-a),i<0?i=0:i>u.outerHeight()-n&&(i=u.outerHeight()-n),h.css({left:t,top:i}),h.css("background-position",-t+"px "+-i+"px"),v=t/u.outerWidth()*s.width|0,x=i/u.outerHeight()*s.height|0,y+=(v-y)/o.smoothMove,b+=(x-b)/o.smoothMove,p.css("background-position",-(y|0)+"px "+-(b|0)+"px")}A=setTimeout(function(){w.controlLoop()},30)},this.init2=function(t,o){z++,1===o&&(s=t),2===z&&this.init()},this.init=function(){$(".cloud-zoom-loading",t.parent()).remove(),(c=t.parent().append(format("<div class='mousetrap' style='background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wDCQgqN0pFezEAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAADUlEQVQI12NgYGBgAAAABQABXvMqOgAAAABJRU5ErkJggg==);z-index:999;position:absolute;width:%0px;height:%1px;left:%2px;top:%3px;'></div>",u.outerWidth(),u.outerHeight(),0,0)).find(":last")).bind("mousemove",this,function(t){l=t.pageX,d=t.pageY}),c.bind("mouseleave",this,function(t){return clearTimeout(A),h&&h.fadeOut(299),m&&m.fadeOut(299),f&&f.fadeOut(299),p.fadeOut(300,function(){w.fadedOut()}),!1}),c.bind("mouseenter",this,function(i){l=i.pageX,d=i.pageY,r=i.data,p&&(p.stop(!0,!1),p.remove());var e=o.adjustX,g=o.adjustY,A=u.outerWidth(),v=u.outerHeight(),x=o.zoomWidth,b=o.zoomHeight;"auto"==o.zoomWidth&&(x=A),"auto"==o.zoomHeight&&(b=v);var y=t.parent();switch(o.position){case"top":g-=b;break;case"right":e+=A;break;case"bottom":g+=v;break;case"left":e-=x;break;case"inside":x=A,b=v;break;default:(y=$("#"+o.position)).length?(x=y.innerWidth(),b=y.innerHeight()):(y=t,e+=A,g+=v)}p=y.append(format('<div id="cloud-zoom-big" class="cloud-zoom-big" style="display:none;position:absolute;
3left:%0px;top:%1px;width:%2px;height:%3px;background-image:url(\'%4\');z-index:99;"></div>',e,g,x,b,s.src)).find(":last"),u.attr("title")&&o.showTitle&&p.append(format('<div class="cloud-zoom-title">%0</div>',u.attr("title"))).find(":last").css("opacity",o.titleOpacity),p.fadeIn(500),h&&(h.remove(),h=null),a=u.outerWidth()/s.width*p.width(),n=u.outerHeight()/s.height*p.height(),h=t.append(format("<div class = 'cloud-zoom-lens' style='display:none;z-index:98;position:absolute;width:%0px;height:%1px;'></div>",a,n)).find(":last"),c.css("cursor",h.css("cursor"));var z=!1;o.tint&&(h.css("background",'url("'+u.attr("src")+'")'),(m=t.append(format('<div style="display:none;position:absolute; left:0px; top:0px; width:%0px; height:%1px; background-color:%2;" />',u.outerWidth(),u.outerHeight(),o.tint)).find(":last")).css("opacity",o.tintOpacity),z=!0,m.fadeIn(500)),o.softFocus&&(h.css("background",'url("'+u.attr("src")+'")'),(f=t.append(format('<div style="position:absolute;display:none;top:2px; left:2px; width:%0px; height:%1px;" />',u.outerWidth()-2,u.outerHeight()-2,o.tint)).find(":last")).css("background",'url("'+u.attr("src")+'")'),f.css("opacity",.5),z=!0,f.fadeIn(500)),z||h.css("opacity",o.lensOpacity),"inside"!==o.position&&h.fadeIn(500),r.controlLoop()})},i=new Image,$(i).load(function(){w.init2(this,0)}),i.src=u.attr("src"),e=new Image,$(e).load(function(){w.init2(this,1)});try{e.src=t.attr("href")}catch(t){}}$(document).ready(function(){$(".cloud-zoom, .cloud-zoom-gallery").CloudZoom()}),$.fn.CloudZoom=function(options){try{document.execCommand("BackgroundImageCache",!1,!0)}catch(t){}return this.each(function(){var relOpts,opts;eval("var\ta = {"+$(this).attr("rel")+"}"),relOpts=a,$(this).is(".cloud-zoom")?($(this).css({position:"relative",display:"block"}),$("img",$(this)).css({display:"block"}),"wrap"!=$(this).parent().attr("id")&&$(this).wrap('<div id="wrap" style="top:0px;z-index:9999;position:relative;"></div>'),opts=$.extend({},$.fn.CloudZoom.defaults,options),opts=$.extend({},opts,relOpts),$(this).data("zoom",new CloudZoom($(this),opts))):$(this).is(".cloud-zoom-gallery")&&(opts=$.extend({},relOpts,options),$(this).data("relOpts",opts),$(this).bind("click",$(this),function(t){var o=t.data.data("relOpts");return $("#"+o.useZoom).data("zoom").destroy(),$("#"+o.useZoom).attr("href",t.data.attr("href")),$("#"+o.useZoom+" img").attr("src",t.data.data("relOpts").smallImage),$("#"+t.data.data("relOpts").useZoom).CloudZoom(),!1}))}),this},$.fn.CloudZoom.defaults={zoomWidth:"auto",zoomHeight:"auto",position:"right",tint:!1,tintOpacity:.5,lensOpacity:.5,softFocus:!1,smoothMove:4,showTitle:!1,titleOpacity:.5,adjustX:0,adjustY:0}})(jQuery);
4function insertParam(e){var t=$("#"+e).attr("name"),a=$("#"+e+" option:selected").attr("value");if("select"!=a){t=escape(t),a=escape(a);for(var n,c=document.location.search.substr(1).split("&"),i=c.length;i--;)if("p"==(n=c[i].split("="))[0]&&c.splice(i,1),n[0]==t){n[1]=a,c[i]=n.join("=");break}i<0&&(c[c.length]=[t,a].join("="));var o=c.join("&");document.location.search=o.replace(new RegExp("^[&]+","g"),"")}}
5function submitQuestion(){var e=$("#customername").val(),n=$("#question-email").val(),o=$("#question").val(),i=$("#question-phone").val(),s=$("#pageType").val();s||(s=""),$.ajax({type:"POST",url:GLOBAL_CTX+"/crm/question",async:!1,cache:!1,dataType:"json",data:"name="+encodeURI(e)+"&email="+encodeURI(n)+"&phone="+encodeURI(i)+"&question="+encodeURI(o)+"&pageType="+encodeURI(s),success:function(e){return e.hasError?($("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.errors.join("<br />")+"</div><div>"),$("#popup-messages").show(),!1):($("#popup-messages").html('<div class="success-container text-center"><div class="success-container-inner"><i class="icon-ion-ios-checkmark-outline"></i><br>Thank you!<br> We will get back to you soon.</div><div>'),$("#popup-messages").fadeIn(),$("#question-form").parents(".content").hide(),!0)}})}function submitSolitaireLandingQuestion(e){var n=$("#customername").val(),o=$("#question-email").val(),i=$("#question").val(),s=$("#question-phone").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/solitaire/question",async:!1,cache:!1,dataType:"json",data:"name="+encodeURI(n)+"&email="+encodeURI(o)+"&phone="+encodeURI(s)+"&question="+encodeURI(i),success:function(n){return n.hasError?($(e).find("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+n.errors.join("<br />")+"</div><div>"),$(e).find("#popup-messages").show(),!1):($(e).find("#popup-messages").html('<div class="success-container"><div class="success-container-inner"><span>Thank you for your interest!</span><br/>Our Diamond expert will get in touch with you soon to provide free consultation.</div><div>'),$(e).find("#popup-messages").show(),$(e).find(".hide").hide(),trackGA("UITest-SolitaireLanding","LeadFormFilled",""),$("#solitaire-landing-question-form").each(function(){this.reset()}),$(e).find(".f-container").hide(),!0)}})}
5function submitSolitaireMenuQuestion(){var e=$(".solitaire-menu-form #customernamea").val(),n=$(".solitaire-menu-form #question-emaila").val(),o=$(".solitaire-menu-form #question-phonea").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/solitaire/question",async:!1,cache:!1,dataType:"json",data:"name="+encodeURI(e)+"&email="+encodeURI(n)+"&phone="+encodeURI(o),success:function(e){return e.hasError?($(".solitaire-menu-form #sol-popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.errors.join("<br />")+"</div><div>"),$.fx.speeds.xslow=1500,$(".solitaire-menu-form #sol-popup-messages").fadeIn("xslow"),$(".solitaire-menu-form .sol-men-frm").hide(),!1):($(".solitaire-menu-form #sol-popup-messages").html('<div class="success-container"><div class="success-container-inner"><span><strong>Thank you for your interest!</strong><br/>Our diamond expert will get in touch with you soon to provide free consultation.</div><div>'),$.fx.speeds.xslow=1500,$(".solitaire-menu-form #sol-popup-messages").fadeIn("xslow"),$(".solitaire-menu-form .sol-men-frm").hide(),$(".solitaire-menu-form #solitaire-menu-question-form").each(function(){this.reset()}),!0)}})}function submitQuestionWedding(){var e=$("#customername").val(),n=$("#question-email").val(),o=$("#question").val(),i=$("#question-phone").val(),s=$("#pageType").val();s||(s=""),$.ajax({type:"POST",url:GLOBAL_CTX+"/crm/question",async:!1,cache:!1,dataType:"json",data:"name="+encodeURI(e)+"&email="+encodeURI(n)+"&phone="+encodeURI(i)+"&question="+encodeURI(o)+"&pageType="+encodeURI(s),success:function(e){return e.hasError?($("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.errors.join("<br />")+"</div><div>"),$("#popup-messages").show(),!1):($("#popup-messages").html('<div class="success-container"><div class="success-container-inner">'+e.success+"</div><div>"),$("#popup-messages").show(),$("#wedding-question-form").each(function(){this.reset()}),!0)}})}$(document).ready(function(){$("#question-form").validationEngine("attach",{onValidationComplete:function(e,n){if(n)return submitQuestion()}}),$("#solitaire-landing-question-form").validationEngine("attach",{onValidationComplete:function(e,n){if(n)return submitSolitaireLandingQuestion("#solitaire-landing-question-form")},scroll:!1}),$("#solitaire-landing-question-form-top").validationEngine("attach",{onValidationComplete:function(e,n){if(n)return submitSolitaireLandingQuestion(".sl-form")},scroll:!1}),$("#solitaire-menu-question-form").submit(function(e){return e.preventDefault(),submitSolitaireMenuQuestion()}),$("#wedding-question-form").validationEngine("attach",{onValidationComplete:function(e,n){if(n)return submitQuestionWedding()}})});
6"function"!=typeof Object.create&&(Object.create=function(t){function g(){}return g.prototype=t,new g}),function(t,i,s){var o={init:function(i,s){this.$elem=t(s),this.options=t.extend({},t.fn.owlCarousel.options,this.$elem.data(),i),this.userOptions=i,this.loadContent()},loadContent:function(){var i,s=this;"function"==typeof s.options.beforeInit&&s.options.beforeInit.apply(this,[s.$elem]),"string"==typeof s.options.jsonPath?(i=s.options.jsonPath,t.getJSON(i,function a(t){var i,o="";if("function"==typeof s.options.jsonSuccess)s.options.jsonSuccess.apply(this,[t]);else{for(i in t.owl)t.owl.hasOwnProperty(i)&&(o+=t.owl[i].item);s.$elem.html(o)}s.logIn()})):s.logIn()},logIn:function(){this.$elem.data("owl-originalStyles",this.$elem.attr("style")),this.$elem.data("owl-originalClasses",this.$elem.attr("class")),this.$elem.css({opacity:0}),this.orignalItems=this.options.items,this.checkBrowser(),this.wrapperWidth=0,this.checkVisible=null,this.setVars()},setVars:function(){if(0===this.$elem.children().length)return!1;this.baseClass(),this.eventTypes(),this.$userItems=this.$elem.children(),this.itemsAmount=this.$userItems.length,this.wrapItems(),this.$owlItems=this.$elem.find(".owl-item"),this.$owlWrapper=this.$elem.find(".owl-wrapper"),this.playDirection="next",this.prevItem=0,this.prevArr=[0],this.currentItem=0,this.customEvents(),this.onStartup()},onStartup:function(){this.updateItems(),this.calculateAll(),this.buildControls(),this.updateControls(),this.response(),this.moveEvents(),this.stopOnHover(),this.owlStatus(),!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle),!0===this.options.autoPlay&&(this.options.autoPlay=5e3),this.play(),this.$elem.find(".owl-wrapper").css("display","block"),this.$elem.is(":visible")?this.$elem.css("opacity",1):this.watchVisibility(),this.onstartup=!1,this.eachMoveUpdate(),"function"==typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad(),!0===this.options.autoHeight&&this.autoHeight(),this.onVisibleItems(),"function"==typeof this.options.afterAction&&this.options.afterAction.apply(this,[this.$elem])}
6,updateVars:function(){"function"==typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]),this.watchVisibility(),this.updateItems(),this.calculateAll(),this.updatePosition(),this.updateControls(),this.eachMoveUpdate(),"function"==typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var t=this;i.setTimeout(function(){t.updateVars()},0)},watchVisibility:function(){var t=this;if(!1!==t.$elem.is(":visible"))return!1;t.$elem.css({opacity:0}),i.clearInterval(t.autoPlayInterval),i.clearInterval(t.checkVisible),t.checkVisible=i.setInterval(function(){t.$elem.is(":visible")&&(t.reload(),t.$elem.animate({opacity:1},200),i.clearInterval(t.checkVisible))},500)},wrapItems:function(){this.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"></div>'),this.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">'),this.wrapperOuter=this.$elem.find(".owl-wrapper-outer"),this.$elem.css("display","block")},baseClass:function(){var t=this.$elem.hasClass(this.options.baseClass),i=this.$elem.hasClass(this.options.theme);t||this.$elem.addClass(this.options.baseClass),i||this.$elem.addClass(this.options.theme)},updateItems:function(){var i,s;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall=!1,this.options.itemsMobile=!1;if((i=t(this.options.responsiveBaseWidth).width())>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems),!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(t,i){return t[0]-i[0]}),s=0;s<this.options.itemsCustom.length;s+=1)this.options.itemsCustom[s][0]<=i&&(this.options.items=this.options.itemsCustom[s][1]);else i<=this.options.itemsDesktop[0]&&!1!==this.options.itemsDesktop&&(this.options.items=this.options.itemsDesktop[1]),i<=this.options.itemsDesktopSmall[0]&&!1!==this.options.itemsDesktopSmall&&(this.options.items=this.options.itemsDesktopSmall[1]),i<=this.options.itemsTablet[0]&&!1!==this.options.itemsTablet&&(this.options.items=this.options.itemsTablet[1]),i<=this.options.itemsTabletSmall[0]&&!1!==this.options.itemsTabletSmall&&(this.options.items=this.options.itemsTabletSmall[1]),i<=this.options.itemsMobile[0]&&!1!==this.options.itemsMobile&&(this.options.items=this.options.itemsMobile[1]);this.options.items>this.itemsAmount&&!0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var s,o,n=this;if(!0!==n.options.responsive)return!1;o=t(i).width(),n.resizer=function(){t(i).width()!==o&&(!1!==n.options.autoPlay&&i.clearInterval(n.autoPlayInterval),i.clearTimeout(s),s=i.setTimeout(function(){o=t(i).width(),n.updateVars()},n.options.responsiveRefreshRate))},t(i).resize(n.resizer)},updatePosition:function(){this.jumpTo(this.currentItem),!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var i=this,s=0,o=i.itemsAmount-i.options.items;i.$owlItems.each(function(n){var r=t(this);r.css({width:i.itemWidth}).data("owl-item",Number(n)),0!==n%i.options.items&&n!==o||n>o||(s+=1),r.data("owl-roundPages",s)})},appendWrapperSizes:function(){this.$owlWrapper.css({width:this.$owlItems.length*this.itemWidth*2,left:0}),this.appendItemsSizes()},calculateAll:function(){this.calculateWidth(),this.appendWrapperSizes(),this.loops(),this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/this.options.items)},max:function(){var t=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);return this.options.items>this.itemsAmount?this.maximumPixels=t=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=t),t},min:function(){return 0},loops:function(){var i,s,o=0,n=0;for(this.positionsInArray=[0],this.pagesInArray=[],i=0;i<this.itemsAmount;i+=1)n+=this.itemWidth,this.positionsInArray.push(-n),!0===this.options.scrollPerPage&&((s=(s=t(this.$owlItems[i])).data("owl-roundPages"))!==o&&(this.pagesInArray[o]=this.positionsInArray[i],o=s))},buildControls:function(){!0!==this.options.navigation&&!0!==this.options.pagination||(this.owlControls=t('<div class="owl-control
6s"/>').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem)),!0===this.options.pagination&&this.buildPagination(),!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var i=this,s=t('<div class="owl-buttons"/>');i.owlControls.append(s),i.buttonPrev=t("<div/>",{class:"owl-prev",html:i.options.navigationText[0]||""}),i.buttonNext=t("<div/>",{class:"owl-next",html:i.options.navigationText[1]||""}),s.append(i.buttonPrev).append(i.buttonNext),s.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(t){t.preventDefault()}),s.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(s){s.preventDefault(),t(this).hasClass("owl-next")?i.next():i.prev()})},buildPagination:function(){var i=this;i.paginationWrapper=t('<div class="owl-pagination"/>'),i.owlControls.append(i.paginationWrapper),i.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(s){s.preventDefault(),Number(t(this).data("owl-page"))!==i.currentItem&&i.goTo(Number(t(this).data("owl-page")),!0)})},updatePagination:function(){var i,s,o,n,r,l;if(!1===this.options.pagination)return!1;for(this.paginationWrapper.html(""),i=0,s=this.itemsAmount-this.itemsAmount%this.options.items,n=0;n<this.itemsAmount;n+=1)0===n%this.options.items&&(i+=1,s===n&&(o=this.itemsAmount-this.options.items),r=t("<div/>",{class:"owl-page"}),l=t("<span></span>",{text:!0===this.options.paginationNumbers?i:"",class:!0===this.options.paginationNumbers?"owl-numbers":""}),r.append(l),r.data("owl-page",s===n?o:n),r.data("owl-roundPages",i),this.paginationWrapper.append(r));this.checkPagination()},checkPagination:function(){var i=this;if(!1===i.options.pagination)return!1;i.paginationWrapper.find(".owl-page").each(function(){t(this).data("owl-roundPages")===t(i.$owlItems[i.currentItem]).data("owl-roundPages")&&(i.paginationWrapper.find(".owl-page").removeClass("active"),t(this).addClass("active"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem===this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled")))},updateControls:function(){this.updatePagination(),this.checkNavigation(),this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(t){if(this.isTransition)return!1;if(this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1,this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0)){if(!0!==this.options.rewindNav)return this.currentItem=this.maximumItem,!1;this.currentItem=0,t="rewind"}this.goTo(this.currentItem,t)},prev:function(t){if(this.isTransition)return!1;if(this.currentItem=!0===this.options.scrollPerPage&&0<this.currentItem&&this.currentItem<this.options.items?0:this.currentItem-(!0===this.options.scrollPerPage?this.options.items:1),0>this.currentItem){if(!0!==this.options.rewindNav)return this.currentItem=0,!1;this.currentItem=this.maximumItem,t="rewind"}this.goTo(this.currentItem,t)},goTo:function(t,s,o){var n=this;return!n.isTransition&&("function"==typeof n.options.beforeMove&&n.options.beforeMove.apply(this,[n.$elem]),t>=n.maximumItem?t=n.maximumItem:0>=t&&(t=0),n.currentItem=n.owl.currentItem=t,!1!==n.options.transitionStyle&&"drag"!==o&&1===n.options.items&&!0===n.browser.support3d?(n.swapSpeed(0),!0===n.browser.support3d?n.transition3d(n.positionsInArray[t]):n.css2slide(n.positionsInArray[t],1),n.afterGo(),n.singleItemTransition(),!1):(t=n.positionsInArray[t],!0===n.browser.support3d?(n.isCss3Finish=!1,!0===s?(n.swapSpeed("paginationSpeed"),i.setTimeout(function(){n.isCss3Finish=!0},n.options.paginationSpeed)):"rewind"===s?(n.swapSpeed(n.options.rewindSpeed),i.setTimeout(function(){n.isCss3Finish=!0},n.options.rewindSpeed)):(n.swapSpeed("slideSpeed"),i.setTimeout(function(){n.isCss3Finish=!0},n.options.slideSpeed)),n.transition3d(t)):!0===s?n.css2slide(t,n.options.paginationSpeed):"rewind"===s?n.css2slide(t,n.options.rewindSpeed):n.css2slide(t,n.options.slideSpeed),void n.afterGo()))},jumpTo:function(t){"function"==typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]),t>=this.maximumItem||-1===t?t=this.maximumItem:0>=t&&(t=0),this.swapSpeed(0),!0===this.browser.support3d?this.transition3d(this.positionsInArray[t]):this.css2slide(this.positionsInArray[t],1),this.currentItem=this.owl.currentItem=t,this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem),this.prevItem=this.owl.prevItem=this.prevArr[this.prevArr.length-2],this.prevArr.shift(0),this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp()),"function"==typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop",i.clearInterval(this.autoPlayInterval)},checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var t=this;if(t.apStatus="play",!1===t.options.autoPlay)return!1;i.clearInterval(t.autoPlayInterval),t.autoPlayInterval=i.setInterval(function(){t.next(!0)},t.options.autoPlay)},swapSpeed:function(t){"slideSpeed"===t?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===t?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!=typeof t&&this.$owlWrapper.css(this.addCssSpeed(t))},addCssSpeed:function(t){return{"-webkit-transition":"all "+t+"ms ease","-moz-transition":"all "+t+"ms ease","-o-transition":"all "+t+"ms ease",transition:"all "+t+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(t){return{"-webkit-transform":"translate3d("+t+"px, 0px, 0px)","-moz-transform":"translate3d("+t+"px, 0px, 0px)","-o-transform":"translate3d("+t+"px, 0px, 0px)","-ms-transform":"translate3d("+t+"px, 0px, 0px)",transform:"translate3d("+t+"px, 0px,0px)"}},transition3d:function(t){this.$owlWrapper.css(this.doTranslate(t))},css2move:function(t){this.$owlWrapper.css({left:t})},css2slide:function(t,i){var s=this;s.isCssFinish=!1,s.$owlWrapper.stop(!0,!0).animate({left:t},{duration:i||s.options.slideSpeed,complete:function(){s.isCssFinish=!0}})},checkBrowser:function(){var t=s.createElement("div");t.style.cssText="  -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)",t=t.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g),this.browser={supp
6ort3d:null!==t&&1===t.length,isTouch:"ontouchstart"in i||i.navigator.msMaxTouchPoints}},moveEvents:function(){!1===this.options.mouseDrag&&!1===this.options.touchDrag||(this.gestures(),this.disabledEvents())},eventTypes:function(){var t=["s","e","x"];this.ev_types={},!0===this.options.mouseDrag&&!0===this.options.touchDrag?t=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:!1===this.options.mouseDrag&&!0===this.options.touchDrag?t=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(t=["mousedown.owl","mousemove.owl","mouseup.owl"]),this.ev_types.start=t[0],this.ev_types.move=t[1],this.ev_types.end=t[2]},disabledEvents:function(){this.$elem.on("dragstart.owl",function(t){t.preventDefault()}),this.$elem.on("mousedown.disableTextSelect",function(i){return t(i.target).is("input, textarea, select, option")})},gestures:function(){function a(t){if(void 0!==t.touches)return{x:t.touches[0].pageX,y:t.touches[0].pageY};if(void 0===t.touches){if(void 0!==t.pageX)return{x:t.pageX,y:t.pageY};if(void 0===t.pageX)return{x:t.clientX,y:t.clientY}}}function b(i){"on"===i?(t(s).on(o.ev_types.move,e),t(s).on(o.ev_types.end,c)):"off"===i&&(t(s).off(o.ev_types.move),t(s).off(o.ev_types.end))}function e(r){r=r.originalEvent||r||i.event,o.newPosX=a(r).x-n.offsetX,o.newPosY=a(r).y-n.offsetY,o.newRelativeX=o.newPosX-n.relativePos,"function"==typeof o.options.startDragging&&!0!==n.dragging&&0!==o.newRelativeX&&(n.dragging=!0,o.options.startDragging.apply(o,[o.$elem])),(8<o.newRelativeX||-8>o.newRelativeX)&&!0===o.browser.isTouch&&(void 0!==r.preventDefault?r.preventDefault():r.returnValue=!1,n.sliding=!0),(10<o.newPosY||-10>o.newPosY)&&!1===n.sliding&&t(s).off("touchmove.owl"),o.newPosX=Math.max(Math.min(o.newPosX,o.newRelativeX/5),o.maximumPixels+o.newRelativeX/5),!0===o.browser.support3d?o.transition3d(o.newPosX):o.css2move(o.newPosX)}function c(s){var r;(s=s.originalEvent||s||i.event).target=s.target||s.srcElement,n.dragging=!1,!0!==o.browser.isTouch&&o.$owlWrapper.removeClass("grabbing"),o.dragDirection=0>o.newRelativeX?o.owl.dragDirection="left":o.owl.dragDirection="right",0!==o.newRelativeX&&(r=o.getNewPosition(),o.goTo(r,!1,"drag"),n.targetElement===s.target&&!0!==o.browser.isTouch&&(t(s.target).on("click.disable",function(i){i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault(),t(i.target).off("click.disable")}),r=(s=t._data(s.target,"events").click).pop(),s.splice(0,0,r))),b("off")}var o=this,n={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};o.isCssFinish=!0,o.$elem.on(o.ev_types.start,".owl-wrapper",function(s){var r;if(3===(s=s.originalEvent||s||i.event).which)return!1;if(!(o.itemsAmount<=o.options.items)){if(!1===o.isCssFinish&&!o.options.dragBeforeAnimFinish||!1===o.isCss3Finish&&!o.options.dragBeforeAnimFinish)return!1;!1!==o.options.autoPlay&&i.clearInterval(o.autoPlayInterval),!0===o.browser.isTouch||o.$owlWrapper.hasClass("grabbing")||o.$owlWrapper.addClass("grabbing"),o.newPosX=0,o.newRelativeX=0,t(this).css(o.removeTransition()),r=t(this).position(),n.relativePos=r.left,n.offsetX=a(s).x-r.left,n.offsetY=a(s).y-r.top,b("on"),n.sliding=!1,n.targetElement=s.target||s.srcElement}})},getNewPosition:function(){var t=this.closestItem();return t>this.maximumItem?t=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem=t=0),t},closestItem:function(){var i=this,s=!0===i.options.scrollPerPage?i.pagesInArray:i.positionsInArray,o=i.newPosX,n=null;return t.each(s,function(r,l){o-i.itemWidth/20>s[r+1]&&o-i.itemWidth/20<l&&"left"===i.moveDirection()?(n=l,i.currentItem=!0===i.options.scrollPerPage?t.inArray(n,i.positionsInArray):r):o+i.itemWidth/20<l&&o+i.itemWidth/20>(s[r+1]||s[r]-i.itemWidth)&&"right"===i.moveDirection()&&(!0===i.options.scrollPerPage?(n=s[r+1]||s[s.length-1],i.currentItem=t.inArray(n,i.positionsInArray)):(n=s[r+1],i.currentItem=r+1))}),i.currentItem},moveDirection:function(){var t;return 0>this.newRelativeX?(t="right",this.playDirection="next"):(t="left",this.playDirection="prev"),t},customEvents:function(){var t=this;t.$elem.on("owl.next",function(){t.next()}),t.$elem.on("owl.prev",function(){t.prev()}),t.$elem.on("owl.play",function(i,s){t.options.autoPlay=s,t.play(),t.hoverStatus="play"}),t.$elem.on("owl.stop",function(){t.stop(),t.hoverStatus="stop"}),t.$elem.on("owl.goTo",function(i,s){t.goTo(s)}),t.$elem.on("owl.jumpTo",function(i,s){t.jumpTo(s)})},stopOnHover:function(){var t=this;!0===t.options.stopOnHover&&!0!==t.browser.isTouch&&!1!==t.options.autoPlay&&(t.$elem.on("mouseover",function(){t.stop()}),t.$elem.on("mouseout",function(){"stop"!==t.hoverStatus&&t.play()}))},lazyLoad:function(){var i,s,o,n;if(!1===this.options.lazyLoad)return!1;for(i=0;i<this.itemsAmount;i+=1)"loaded"!==(s=t(this.$owlItems[i])).data("owl-loaded")&&(o=s.data("owl-item"),"string"!=typeof(n=s.find(".lazyOwl")).data("original")?
6s.data("owl-loaded","loaded"):(void 0===s.data("owl-loaded")&&(n.hide(),s.addClass("loading").data("owl-loaded","checked")),(!0!==this.options.lazyFollow||o>=this.currentItem)&&o<this.currentItem+this.options.items&&n.length&&this.lazyPreload(s,n)))},lazyPreload:function(t,s){function e(){t.data("owl-loaded","loaded").removeClass("loading"),s.removeAttr("data-original"),"fade"===n.options.lazyEffect?s.fadeIn(400):s.show(),"function"==typeof n.options.afterLazyLoad&&n.options.afterLazyLoad.apply(this,[n.$elem])}var o,n=this,r=0;"DIV"===s.prop("tagName")?(s.css("background-image","url("+s.data("original")+")"),o=!0):s[0].src=s.data("original"),function c(){r+=1,n.completeImg(s.get(0))||!0===o?e():100>=r?i.setTimeout(c,100):e()}()},autoHeight:function(){function a(){var s=t(o.$owlItems[o.currentItem]).height();o.wrapperOuter.css("height",s+"px"),o.wrapperOuter.hasClass("autoHeight")||i.setTimeout(function(){o.wrapperOuter.addClass("autoHeight")},0)}var s,o=this,n=t(o.$owlItems[o.currentItem]).find("img");void 0!==n.get(0)?(s=0,function b(){s+=1,o.completeImg(n.get(0))?a():100>=s?i.setTimeout(b,100):o.wrapperOuter.css("height","")}()):a()},completeImg:function(t){return!(!t.complete||void 0!==t.naturalWidth&&0===t.naturalWidth)},onVisibleItems:function(){var i;for(!0===this.options.addClassActive&&this.$owlItems.removeClass("active"),this.visibleItems=[],i=this.currentItem;i<this.currentItem+this.options.items;i+=1)this.visibleItems.push(i),!0===this.options.addClassActive&&t(this.$owlItems[i]).addClass("active");this.owl.visibleItems=this.visibleItems},transitionTypes:function(t){this.outClass="owl-"+t+"-out",this.inClass="owl-"+t+"-in"},singleItemTransition:function(){var t=this,i=t.outClass,s=t.inClass,o=t.$owlItems.eq(t.currentItem),n=t.$owlItems.eq(t.prevItem),r=Math.abs(t.positionsInArray[t.currentItem])+t.positionsInArray[t.prevItem],l=Math.abs(t.positionsInArray[t.currentItem])+t.itemWidth/2;t.isTransition=!0,t.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":l+"px","-moz-perspective-origin":l+"px","perspective-origin":l+"px"}),n.css({position:"relative",left:r+"px"}).addClass(i).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){t.endPrev=!0,n.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend"),t.clearTransStyle(n,i)}),o.addClass(s).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){t.endCurrent=!0,o.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend"),t.clearTransStyle(o,s)})},clearTransStyle:function(t,i){t.css({position:"",left:""}).removeClass(i),this.endPrev&&this.endCurrent&&(this.$owlWrapper.removeClass("owl-origin"),this.isTransition=this.endCurrent=this.endPrev=!1)},owlStatus:function(){this.owl={userOptions:this.userOptions,baseElement:this.$elem,userItems:this.$userItems,owlItems:this.$owlItems,currentItem:this.currentItem,prevItem:this.prevItem,visibleItems:this.visibleItems,isTouch:this.browser.isTouch,browser:this.browser,dragDirection:this.dragDirection}},clearEvents:function(){this.$elem.off(".owl owl mousedown.disableTextSelect"),t(s).off(".owl owl"),t(i).off("resize",this.resizer)},unWrap:function(){0!==this.$elem.children().length&&(this.$owlWrapper.unwrap(),this.$userItems.unwrap().unwrap(),this.owlControls&&this.owlControls.remove()),this.clearEvents(),this.$elem.attr("style",this.$elem.data("owl-originalStyles")||"").attr("class",this.$elem.data("owl-originalClasses"))},destroy:function(){this.stop(),i.clearInterval(this.checkVisible),this.unWrap(),this.$elem.removeData()},reinit:function(i){i=t.extend({},this.userOptions,i),this.unWrap(),this.init(i,this.$elem)},addItem:function(t,i){var s;return!!t&&(0===this.$elem.children().length?(this.$elem.append(t),this.setVars(),!1):(this.unWrap(),(s=void 0===i||-1===i?-1:i)>=this.$userItems.length||-1===s?this.$userItems.eq(-1).after(t):this.$userItems.eq(s).before(t),void this.setVars()))},removeItem:function(t){if(0===this.$elem.children().length)return!1;t=void 0===t||-1===t?-1:t,this.unWrap(),this.$userItems.eq(t).remove(),this.setVars()}};t.fn.owlCarousel=function(i){return this.each(function(){if(!0===t(this).data("owl-init"))return!1;t(this).data("owl-init",!0);var s=Object.create(o);s.init(i,this),t.data(this,"owlCarousel",s)})},t.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1e3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:i,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}}(jQuery,window,document);
7/*!
8 * fancyBox - jQuery Plugin
9 * version: 2.1.5 (Fri, 14 Jun 2013)
10 * @requires jQuery v1.6 or later
11 *
12 * Examples at http://fancyapps.com/fancybox/
13 * License: www.fancyapps.com/fancybox/#license
14 *
15 * Copyright 2012 Janis Skarnelis - [email protected]
16 *
17 */
18!function(e,t,i,n){"use strict";var o=i("html"),a=i(e),r=i(t),s=i.fancybox=function(){s.open.apply(this,arguments)},l=navigator.userAgent.match(/msie/i),c=null,d=t.createTouch!==n,isQuery=function(e){return e&&e.hasOwnProperty&&e instanceof i},isString=function(e){return e&&"string"===i.type(e)},isPercentage=function(e){return isString(e)&&e.indexOf("%")>0},isScrollable=function(e){return e&&!(e.style.overflow&&"hidden"===e.style.overflow)&&(e.clientWidth&&e.scrollWidth>e.clientWidth||e.clientHeight&&e.scrollHeight>e.clientHeight)},getScalar=function(e,t){var i=parseInt(e,10)||0;return t&&isPercentage(e)&&(i=s.getViewport()[t]/100*i),Math.ceil(i)},getValue=function(e,t){return getScalar(e,t)+"px"};i.extend(s,{version:"2.1.5",defaults:{padding:7,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!d,fitToView:!0,aspectRatio:!1,topRatio:.5,leftRatio:.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3e3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(l?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:i.noop,beforeLoad:i.noop,afterLoad:i.noop,beforeShow:i.noop,afterShow:i.noop,beforeChange:i.noop,beforeClose:i.noop,afterClose:i.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(e,t){if(e&&(i.isPlainObject(t)||(t={}),!1!==s.close(!0)))return i.isArray(e)||(e=isQuery(e)?i(e).get():[e]),i.each(e,function(o,a){var r,l,c,d,p,h,f,u={};"object"===i.type(a)&&(a.nodeType&&(a=i(a)),isQuery(a)?(u={href:a.data("fancybox-href")||a.attr("href"),title:a.data("fancybox-title")||a.attr("title"),isDom:!0,element:a},i.metadata&&i.extend(!0,u,a.metadata())):u=a),r=t.href||u.href||(isString(a)?a:null),l=t.title!==n?t.title:u.title||"",!(d=(c=t.content||u.content)?"html":t.type||u.type)&&u.isDom&&((d=a.data("fancybox-type"))||(d=(p=a.prop("class").match(/fancybox\.(\w+)/))?p[1]:null)),isString(r)&&(d||(s.isImage(r)?d="image":s.isSWF(r)?d="swf":"#"===r.charAt(0)?d="inline":isString(a)&&(d="html",c=a)),"ajax"===d&&(h=r.split(/\s+/,2),r=h.shift(),f=h.shift())),c||("inline"===d?r?c=i(isString(r)?r.replace(/.*(?=#[^\s]+$)/,""):r):u.isDom&&(c=a):"html"===d?c=r:d||r||!u.isDom||(d="inline",c=a)),i.extend(u,{href:r,type:d,content:c,title:l,selector:f}),e[o]=u}),s.opts=i.extend(!0,{},s.defaults,t),t.keys!==n&&(s.opts.keys=!!t.keys&&i.extend({},s.defaults.keys,t.keys)),s.group=e,s._start(s.opts.index)},cancel:function(){var e=s.coming;e&&!1!==s.trigger("onCancel")&&(s.hideLoading(),s.ajaxLoad&&s.ajaxLoad.abort(),s.ajaxLoad=null,
18s.imgPreload&&(s.imgPreload.onload=s.imgPreload.onerror=null),e.wrap&&e.wrap.stop(!0,!0).trigger("onReset").remove(),s.coming=null,s.current||s._afterZoomOut(e))},close:function(e){s.cancel(),!1!==s.trigger("beforeClose")&&(s.unbindEvents(),s.isActive&&(s.isOpen&&!0!==e?(s.isOpen=s.isOpened=!1,s.isClosing=!0,i(".fancybox-item, .fancybox-nav").remove(),s.wrap.stop(!0,!0).removeClass("fancybox-opened"),s.transitions[s.current.closeMethod]()):(i(".fancybox-wrap").stop(!0).trigger("onReset").remove(),s._afterZoomOut())))},play:function(e){var clear=function(){clearTimeout(s.player.timer)},set=function(){clear(),s.current&&s.player.isActive&&(s.player.timer=setTimeout(s.next,s.current.playSpeed))},stop=function(){clear(),r.unbind(".player"),s.player.isActive=!1,s.trigger("onPlayEnd")};!0===e||!s.player.isActive&&!1!==e?s.current&&(s.current.loop||s.current.index<s.group.length-1)&&(s.player.isActive=!0,r.bind({"onCancel.player beforeClose.player":stop,"onUpdate.player":set,"beforeLoad.player":clear}),set(),s.trigger("onPlayStart")):stop()},next:function(e){var t=s.current;t&&(isString(e)||(e=t.direction.next),s.jumpto(t.index+1,e,"next"))},prev:function(e){var t=s.current;t&&(isString(e)||(e=t.direction.prev),s.jumpto(t.index-1,e,"prev"))},jumpto:function(e,t,i){var o=s.current;o&&(e=getScalar(e),s.direction=t||o.direction[e>=o.index?"next":"prev"],s.router=i||"jumpto",o.loop&&(e<0&&(e=o.group.length+e%o.group.length),e%=o.group.length),o.group[e]!==n&&(s.cancel(),s._start(e)))},reposition:function(e,t){var n,o=s.current,a=o?o.wrap:null;a&&(n=s._getPosition(t),e&&"scroll"===e.type?(delete n.position,a.stop(!0,!0).animate(n,200)):(a.css(n),o.pos=i.extend({},o.dim,n)))},update:function(e){var t=e&&e.type,i=!t||"orientationchange"===t;i&&(clearTimeout(c),c=null),s.isOpen&&!c&&(c=setTimeout(function(){var n=s.current;n&&!s.isClosing&&(s.wrap.removeClass("fancybox-tmp"),(i||"load"===t||"resize"===t&&n.autoResize)&&s._setDimension(),"scroll"===t&&n.canShrink||s.reposition(e),s.trigger("onUpdate"),c=null)},i&&!d?0:300))},toggle:function(e){s.isOpen&&(s.current.fitToView="boolean"===i.type(e)?e:!s.current.fitToView,d&&(s.wrap.removeAttr("style").addClass("fancybox-tmp"),s.trigger("onUpdate")),s.update())},hideLoading:function(){r.unbind(".loading"),i("#fancybox-loading").remove()},showLoading:function(){var e,t;s.hideLoading(),e=i('<div id="fancybox-loading"><div></div></div>').click(s.cancel).appendTo("body"),r.bind("keydown.loading",function(e){27===(e.which||e.keyCode)&&(e.preventDefault(),s.cancel())}),s.defaults.fixed||(t=s.getViewport(),e.css({position:"absolute",top:.5*t.h+t.y,left:.5*t.w+t.x}))},getViewport:function(){var t=s.current&&s.current.locked||!1,i={x:a.scrollLeft(),y:a.scrollTop()};return t?(i.w=t[0].clientWidth,i.h=t[0].clientHeight):(i.w=d&&e.innerWidth?e.innerWidth:a.width(),i.h=d&&e.innerHeight?e.innerHeight:a.height()),i},unbindEvents:function(){s.wrap&&isQuery(s.wrap)&&s.wrap.unbind(".fb"),r.unbind(".fb"),a.unbind(".fb")},bindEvents:function(){var e,t=s.current;t&&(a.bind("orientationchange.fb"+(d?"":" resize.fb")+(t.autoCenter&&!t.locked?" scroll.fb":""),s.update),(e=t.keys)&&r.bind("keydown.fb",function(o){var a=o.which||o.keyCode,r=o.target||o.srcElement;if(27===a&&s.coming)return!1;o.ctrlKey||o.altKey||o.shiftKey||o.metaKey||r&&(r.type||i(r).is("[contenteditable]"))||i.each(e,function(e,r){return t.group.length>1&&r[a]!==n?(s[e](r[a]),o.preventDefault(),!1):i.inArray(a,r)>-1?(s[e](),o.preventDefault(),!1):void 0})}),i.fn.mousewheel&&t.mouseWheel&&s.wrap.bind("mousewheel.fb",function(e,n,o,a){for(var r=e.target||null,l=i(r),c=!1;l.length&&!(c||l.is(".fancybox-skin")||l.is(".fancybox-wrap"));)c=isScrollable(l[0]),l=i(l).parent();0===n||c||s.group.length>1&&!t.canShrink&&(a>0||o>0?s.prev(a>0?"down":"left"):(a<0||o<0)&&s.next(a<0?"up":"right"),e.preventDefault())}))},trigger:function(e,t){var n,o=t||s.coming||s.current;if(o){if(i.isFunction(o[e])&&(n=o[e].apply(o,Array.prototype.slice.call(arguments,1))),!1===n)return!1;o.helpers&&i.each(o.helpers,function(t,n){n&&s.helpers[t]&&i.isFunction(s.helpers[t][e])&&s.helpers[t][e](i.extend(!0,{},s.helpers[t].defaults,n),o)}),r.trigger(e)}},isImage:function(e){return isString(e)&&e.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(e){return isString(e)&&e.match(/\.(swf)((\?|#).*)?$/i)},_start:function(e){var t,n,o,a,r,l={};
18if(e=getScalar(e),!(t=s.group[e]||null))return!1;if(a=(l=i.extend(!0,{},s.opts,t)).margin,r=l.padding,"number"===i.type(a)&&(l.margin=[a,a,a,a]),"number"===i.type(r)&&(l.padding=[r,r,r,r]),l.modal&&i.extend(!0,l,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}}),l.autoSize&&(l.autoWidth=l.autoHeight=!0),"auto"===l.width&&(l.autoWidth=!0),"auto"===l.height&&(l.autoHeight=!0),l.group=s.group,l.index=e,s.coming=l,!1!==s.trigger("beforeLoad")){if(o=l.type,n=l.href,!o)return s.coming=null,!(!s.current||!s.router||"jumpto"===s.router)&&(s.current.index=e,s[s.router](s.direction));if(s.isActive=!0,"image"!==o&&"swf"!==o||(l.autoHeight=l.autoWidth=!1,l.scrolling="visible"),"image"===o&&(l.aspectRatio=!0),"iframe"===o&&d&&(l.scrolling="scroll"),l.wrap=i(l.tpl.wrap).addClass("fancybox-"+(d?"mobile":"desktop")+" fancybox-type-"+o+" fancybox-tmp "+l.wrapCSS).appendTo(l.parent||"body"),i.extend(l,{skin:i(".fancybox-skin",l.wrap),outer:i(".fancybox-outer",l.wrap),inner:i(".fancybox-inner",l.wrap)}),i.each(["Top","Right","Bottom","Left"],function(e,t){l.skin.css("padding"+t,getValue(l.padding[e]))}),s.trigger("onReady"),"inline"===o||"html"===o){if(!l.content||!l.content.length)return s._error("content")}else if(!n)return s._error("href");"image"===o?s._loadImage():"ajax"===o?s._loadAjax():"iframe"===o?s._loadIframe():s._afterLoad()}else s.coming=null},_error:function(e){i.extend(s.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:e,content:s.coming.tpl.error}),s._afterLoad()},_loadImage:function(){var e=s.imgPreload=new Image;e.onload=function(){this.onload=this.onerror=null,s.coming.width=this.width/s.opts.pixelRatio,s.coming.height=this.height/s.opts.pixelRatio,s._afterLoad()},e.onerror=function(){this.onload=this.onerror=null,s._error("image")},e.src=s.coming.href,!0!==e.complete&&s.showLoading()},_loadAjax:function(){var e=s.coming;s.showLoading(),s.ajaxLoad=i.ajax(i.extend({},e.ajax,{url:e.href,error:function(e,t){s.coming&&"abort"!==t?s._error("ajax",e):s.hideLoading()},success:function(t,i){"success"===i&&(e.content=t,s._afterLoad())}}))},_loadIframe:function(){var e=s.coming,t=i(e.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",d?"auto":e.iframe.scrolling).attr("src",e.href);i(e.wrap).bind("onReset",function(){try{i(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(e){}}),e.iframe.preload&&(s.showLoading(),t.one("load",function(){i(this).data("ready",1),d||i(this).bind("load.fb",s.update),i(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show(),s._afterLoad()})),e.content=t.appendTo(e.inner),e.iframe.preload||s._afterLoad()},_preloadImages:function(){var e,t,i=s.group,n=s.current,o=i.length,a=n.preload?Math.min(n.preload,o-1):0;for(t=1;t<=a;t+=1)"image"===(e=i[(n.index+t)%o]).type&&e.href&&((new Image).src=e.href)},_afterLoad:function(){var e,t,n,o,a,r,l=s.coming,c=s.current,d="fancybox-placeholder";if(s.hideLoading(),l&&!1!==s.isActive){if(!1===s.trigger("afterLoad",l,c))return l.wrap.stop(!0).trigger("onReset").remove(),void(s.coming=null);switch(c&&(s.trigger("beforeChange",c),c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()),s.unbindEvents(),e=l,t=l.content,n=l.type,o=l.scrolling,i.extend(s,{wrap:e.wrap,skin:e.skin,outer:e.outer,inner:e.inner,current:e,previous:c}),a=e.href,n){case"inline":case"ajax":case"html":e.selector?t=i("<div>").html(t).find(e.selector):isQuery(t)&&(t.data(d)||t.data(d,i('<div class="'+d+'"></div>').insertAfter(t).hide()),t=t.show().detach(),e.wrap.bind("onReset",function(){i(this).find(t).length&&t.hide().replaceAll(t.data(d)).data(d,!1)}));break;case"image":t=e.tpl.image.replace("{href}",a);break;case"swf":t='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+a+'"></param>',r="",i.each(e.swf,function(e,i){t+='<param name="'+e+'" value="'+i+'"></param>',r+=" "+e+'="'+i+'"'}),t+='<embed src="'+a+'" type="application/x-shockwave-flash" width="100%" height="100%"'+r+"></embed></object>"}isQuery(t)&&t.parent().is(e.inner)||e.inner.append(t),s.trigger("beforeShow"),e.inner.css("overflow","yes"===o?"scroll":"no"===o?"hidden":o),s._setDimension(),s.reposition(),s.isOpen=!1,s.coming=null,s.bindEvents(),s.isOpened?c.prevMethod&&s.transitions[c.prevMethod]():i(".fancybox-wrap").not(e.wrap).stop(!0).trigger("onReset").remove(),s.transitions[s.isOpened?e.
18nextMethod:e.openMethod](),s._preloadImages()}},_setDimension:function(){var e,t,n,o,a,r,l,c,d,p,h,f,u,g,m,y,x,v=s.getViewport(),w=0,b=s.wrap,k=s.skin,C=s.inner,O=s.current,W=O.width,_=O.height,S=O.minWidth,T=O.minHeight,L=O.maxWidth,E=O.maxHeight,R=O.scrolling,j=O.scrollOutside?O.scrollbarWidth:0,P=O.margin,H=getScalar(P[1]+P[3]),M=getScalar(P[0]+P[2]);if(b.add(k).add(C).width("auto").height("auto").removeClass("fancybox-tmp"),a=H+(n=getScalar(k.outerWidth(!0)-k.width())),r=M+(o=getScalar(k.outerHeight(!0)-k.height())),l=isPercentage(W)?(v.w-a)*getScalar(W)/100:W,c=isPercentage(_)?(v.h-r)*getScalar(_)/100:_,"iframe"===O.type){if(y=O.content,O.autoHeight&&1===y.data("ready"))try{y[0].contentWindow.document.location&&(C.width(l).height(9999),x=y.contents().find("body"),j&&x.css("overflow-x","hidden"),c=x.outerHeight(!0))}catch(e){}}else(O.autoWidth||O.autoHeight)&&(C.addClass("fancybox-tmp"),O.autoWidth||C.width(l),O.autoHeight||C.height(c),O.autoWidth&&(l=C.width()),O.autoHeight&&(c=C.height()),C.removeClass("fancybox-tmp"));if(W=getScalar(l),_=getScalar(c),h=l/c,S=getScalar(isPercentage(S)?getScalar(S,"w")-a:S),L=getScalar(isPercentage(L)?getScalar(L,"w")-a:L),T=getScalar(isPercentage(T)?getScalar(T,"h")-r:T),d=L,p=E=getScalar(isPercentage(E)?getScalar(E,"h")-r:E),O.fitToView&&(L=Math.min(v.w-a,L),E=Math.min(v.h-r,E)),g=v.w-H,m=v.h-M,O.aspectRatio?(W>L&&(_=getScalar((W=L)/h)),_>E&&(W=getScalar((_=E)*h)),W<S&&(_=getScalar((W=S)/h)),_<T&&(W=getScalar((_=T)*h))):(W=Math.max(S,Math.min(W,L)),O.autoHeight&&"iframe"!==O.type&&(C.width(W),_=C.height()),_=Math.max(T,Math.min(_,E))),O.fitToView)if(C.width(W).height(_),b.width(W+n),f=b.width(),u=b.height(),O.aspectRatio)for(;(f>g||u>m)&&W>S&&_>T&&!(w++>19);)_=Math.max(T,Math.min(E,_-10)),(W=getScalar(_*h))<S&&(_=getScalar((W=S)/h)),W>L&&(_=getScalar((W=L)/h)),C.width(W).height(_),b.width(W+n),f=b.width(),u=b.height();else W=Math.max(S,Math.min(W,W-(f-g))),_=Math.max(T,Math.min(_,_-(u-m)));j&&"auto"===R&&_<c&&W+n+j<g&&(W+=j),C.width(W).height(_),b.width(W+n),f=b.width(),u=b.height(),e=(f>g||u>m)&&W>S&&_>T,t=O.aspectRatio?W<d&&_<p&&W<l&&_<c:(W<d||_<p)&&(W<l||_<c),i.extend(O,{dim:{width:getValue(f),height:getValue(u)},origWidth:l,origHeight:c,canShrink:e,canExpand:t,wPadding:n,hPadding:o,wrapSpace:u-k.outerHeight(!0),skinSpace:k.height()-_}),!y&&O.autoHeight&&_>T&&_<E&&!t&&C.height("auto")},_getPosition:function(e){var t=s.current,i=s.getViewport(),n=t.margin,o=s.wrap.width()+n[1]+n[3],a=s.wrap.height()+n[0]+n[2],r={position:"absolute",top:n[0],left:n[3]};return t.autoCenter&&t.fixed&&!e&&a<=i.h&&o<=i.w?r.position="fixed":t.locked||(r.top+=i.y,r.left+=i.x),r.top=getValue(Math.max(r.top,r.top+(i.h-a)*t.topRatio)),r.left=getValue(Math.max(r.left,r.left+(i.w-o)*t.leftRatio)),r},_afterZoomIn:function(){var e=s.current;e&&(s.isOpen=s.isOpened=!0,s.wrap.css("overflow","visible").addClass("fancybox-opened"),s.update(),(e.closeClick||e.nextClick&&s.group.length>1)&&s.inner.css("cursor","pointer").bind("click.fb",function(t){i(t.target).is("a")||i(t.target).parent().is("a")||(t.preventDefault(),s[e.closeClick?"close":"next"]())}),e.closeBtn&&i(e.tpl.closeBtn).appendTo(s.skin).bind("click.fb",function(e){e.preventDefault(),s.close()}),e.arrows&&s.group.length>1&&((e.loop||e.index>0)&&i(e.tpl.prev).appendTo(s.outer).bind("click.fb",s.prev),(e.loop||e.index<s.group.length-1)&&i(e.tpl.next).appendTo(s.outer).bind("click.fb",s.next)),s.trigger("afterShow"),e.loop||e.index!==e.group.length-1?s.opts.autoPlay&&!s.player.isActive&&(s.opts.autoPlay=!1,s.play()):s.play(!1))},_afterZoomOut:function(e){e=e||s.current,i(".fancybox-wrap").trigger("onReset").remove(),i.extend(s,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null}),s.trigger("afterClose",e)}}),s.transitions={getOrigPosition:function(){var e=s.current,t=e.element,i=e.orig,n={},o=50,a=50,r=e.hPadding,l=e.wPadding,c=s.getViewport();return!i&&e.isDom&&t.is(":visible")&&((i=t.find("img:first")).length||(i=t)),isQuery(i)?(n=i.offset(),i.is("img")&&(o=i.outerWidth(),a=i.outerHeight())):(n.top=c.y+(c.h-a)*e.topRatio,n.left=c.x+(c.w-o)*e.leftRatio),("fixed"===s.wrap.css("position")||e.locked)&&(n.top-=c.y,n.left-=c.x),n={top:getValue(n.top-r*e.topRatio),left
18:getValue(n.left-l*e.leftRatio),width:getValue(o+l),height:getValue(a+r)}},step:function(e,t){var i,n,o=t.prop,a=s.current,r=a.wrapSpace,l=a.skinSpace;"width"!==o&&"height"!==o||(i=t.end===t.start?1:(e-t.start)/(t.end-t.start),s.isClosing&&(i=1-i),n=e-("width"===o?a.wPadding:a.hPadding),s.skin[o](getScalar("width"===o?n:n-r*i)),s.inner[o](getScalar("width"===o?n:n-r*i-l*i)))},zoomIn:function(){var e=s.current,t=e.pos,n=e.openEffect,o="elastic"===n,a=i.extend({opacity:1},t);delete a.position,o?(t=this.getOrigPosition(),e.openOpacity&&(t.opacity=.1)):"fade"===n&&(t.opacity=.1),s.wrap.css(t).animate(a,{duration:"none"===n?0:e.openSpeed,easing:e.openEasing,step:o?this.step:null,complete:s._afterZoomIn})},zoomOut:function(){var e=s.current,t=e.closeEffect,i="elastic"===t,n={opacity:.1};i&&(n=this.getOrigPosition(),e.closeOpacity&&(n.opacity=.1)),s.wrap.animate(n,{duration:"none"===t?0:e.closeSpeed,easing:e.closeEasing,step:i?this.step:null,complete:s._afterZoomOut})},changeIn:function(){var e,t=s.current,i=t.nextEffect,n=t.pos,o={opacity:1},a=s.direction,r=200;n.opacity=.1,"elastic"===i&&(e="down"===a||"up"===a?"top":"left","down"===a||"right"===a?(n[e]=getValue(getScalar(n[e])-r),o[e]="+=200px"):(n[e]=getValue(getScalar(n[e])+r),o[e]="-=200px")),"none"===i?s._afterZoomIn():s.wrap.css(n).animate(o,{duration:t.nextSpeed,easing:t.nextEasing,complete:s._afterZoomIn})},changeOut:function(){var e=s.previous,t=e.prevEffect,n={opacity:.1},o=s.direction;"elastic"===t&&(n["down"===o||"up"===o?"top":"left"]=("up"===o||"left"===o?"-":"+")+"=200px"),e.wrap.animate(n,{duration:"none"===t?0:e.prevSpeed,easing:e.prevEasing,complete:function(){i(this).trigger("onReset").remove()}})}},s.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!d,fixed:!0},overlay:null,fixed:!1,el:i("html"),create:function(e){e=i.extend({},this.defaults,e),this.overlay&&this.close(),this.overlay=i('<div class="fancybox-overlay"></div>').appendTo(s.coming?s.coming.parent:e.parent),this.fixed=!1,e.fixed&&s.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(e){var t=this;e=i.extend({},this.defaults,e),this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(e),this.fixed||(a.bind("resize.overlay",i.proxy(this.update,this)),this.update()),e.closeClick&&this.overlay.bind("click.overlay",function(e){if(i(e.target).hasClass("fancybox-overlay"))return s.isActive?s.close():t.close(),!1}),this.overlay.css(e.css).show()},close:function(){var e,t;a.unbind("resize.overlay"),this.el.hasClass("fancybox-lock")&&(i(".fancybox-margin").removeClass("fancybox-margin"),e=a.scrollTop(),t=a.scrollLeft(),this.el.removeClass("fancybox-lock"),a.scrollTop(e).scrollLeft(t)),i(".fancybox-overlay").remove().hide(),i.extend(this,{overlay:null,fixed:!1})},update:function(){var e,i="100%";this.overlay.width(i).height("100%"),l?(e=Math.max(t.documentElement.offsetWidth,t.body.offsetWidth),r.width()>e&&(i=r.width())):r.width()>a.width()&&(i=r.width()),this.overlay.width(i).height(r.height())},onReady:function(e,t){var n=this.overlay;i(".fancybox-overlay").stop(!0,!0),n||this.create(e),e.locked&&this.fixed&&t.fixed&&(n||(this.margin=r.height()>a.height()&&i("html").css("margin-right").replace("px","")),t.locked=this.overlay.append(t.wrap),t.fixed=!1),!0===e.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(e,t){var n,o;t.locked&&(!1!==this.margin&&(i("*").filter(function(){return"fixed"===i(this).css("position")&&!i(this).hasClass("fancybox-overlay")&&!i(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),n=a.scrollTop(),o=a.scrollLeft(),this.el.addClass("fancybox-lock"),a.scrollTop(n).scrollLeft(o)),this.open(e)},onUpdate:function(){this.fixed||this.update()},afterClose:function(e){this.overlay&&!s.coming&&this.overlay.fadeOut(e.speedOut,i.proxy(this.close,this))}},s.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(e){var t,n,o=s.current,a=o.title,r=e.type;if(i.isFunction(a)&&(a=a.call(o.element,o)),isString(a)&&""!==i.trim(a)){switch(t=i('<div class="fancybox-title fancybox-title-'+r+'-wrap">'+a+"</div>"),r){case"inside":n=s.skin;break;case"outside":n=s.wrap;break;case"over":n=s.inner;break;default:n=s.skin,t.appendTo("body"),l&&t.width(t.width()),t.wrapInner('<span class="child"></span>'),s.current.margin[2]+=Math.abs(getScalar(t.css("margin-bottom")))}
18t["top"===e.position?"prependTo":"appendTo"](n)}}},i.fn.fancybox=function(e){var t,n=i(this),o=this.selector||"",run=function(a){var r,l,c=i(this).blur(),d=t;a.ctrlKey||a.altKey||a.shiftKey||a.metaKey||c.is(".fancybox-wrap")||(r=e.groupAttr||"data-fancybox-group",(l=c.attr(r))||(r="rel",l=c.get(0)[r]),l&&""!==l&&"nofollow"!==l&&(d=(c=(c=o.length?i(o):n).filter("["+r+'="'+l+'"]')).index(this)),e.index=d,!1!==s.open(c,e)&&a.preventDefault())};return t=(e=e||{}).index||0,o&&!1!==e.live?r.undelegate(o,"click.fb-start").delegate(o+":not('.fancybox-item, .fancybox-nav')","click.fb-start",run):n.unbind("click.fb-start").bind("click.fb-start",run),this.filter("[data-fancybox-start=1]").trigger("click"),this},r.ready(function(){var t,a,r,l;i.scrollbarWidth===n&&(i.scrollbarWidth=function(){var e=i('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),t=e.children(),n=t.innerWidth()-t.height(99).innerWidth();return e.remove(),n}),i.support.fixedPosition===n&&(i.support.fixedPosition=(r=i('<div style="position:fixed;top:20px;"></div>').appendTo("body"),l=20===r[0].offsetTop||15===r[0].offsetTop,r.remove(),l)),i.extend(s.defaults,{scrollbarWidth:i.scrollbarWidth(),fixed:i.support.fixedPosition,parent:i("body")}),t=i(e).width(),o.addClass("fancybox-lock-test"),a=i(e).width(),o.removeClass("fancybox-lock-test"),i("<style type='text/css'>.fancybox-margin{margin-right:"+(a-t)+"px;}</style>").appendTo("head")})}(window,document,jQuery);
19function clickId(e,n){13==e.keyCode&&$("#"+n).click()}function sign_in(){if($(".fancybox-close").on("click",function(){$(".formError").remove()}),$(".fancybox-overlay").on("click",function(){$(".formError").remove()}),$("#user-login1").validationEngine(),$("#user-login1").validationEngine("validate")){$("#fancybox-loading").css("display","block"),null!=$("#user-login1 #after-login-action").val()&&""!=$("#user-login1 #after-login-action").val()||$("#user-login1 #after-login-action").val(action),null!=$("#user-login1 #after-login-action-params").val()&&""!=$("#user-login1 #after-login-action-params").val()||$("#user-login1 #after-login-action-params").val(actionParams),null!=$("#user-login1 #otp-id").val()&&""!=$("#user-login1 #otp-id").val()||$("#user-login1 #otp-id").val(""),null!=$("#user-login1 #after-login-action-redirectUrlAfterLogin").val()&&""!=$("#user-login1 #after-login-action-redirectUrlAfterLogin").val()||$("#user-login1 #after-login-action-redirectUrlAfterLogin").val(redirectUrlAfterLogin);var e=$("#user-login1 #email-id").val();$("#loginInputContact").val(e),$.post($("#user-login1").attr("action"),$("#user-login1").serialize(),function(e){sign_in_response(e)},"json"),$("#fancybox-loading").css("display","none")}return!1}function sign_in_response(e){sign_in_and_sigup_response(e,!1)}function sign_in_and_sigup_response(e,n){if(0==e.hasError){if(trackGA("BsUI","Login successful","BlueStone"),fireLoginEvents(e,n),!n)if(""!=e.action&&null!=e.action)callback(e.action,e.actionParams,e.redirectUrlAfterLogin);else if(-1!==e.redirectUrl.indexOf("admin"))window.location=e.redirectUrl;else{if(-1===e.redirectUrlAfterLogin.indexOf("goldminehistory"))return void window.location.reload();window.location=e.redirectUrlAfterLogin}var i={id:$("#user-login1 #email-id").val(),password:$("#user-login1 #password").val()};CredentialMgm.create("password",i)}else{var o="#user-login #popup-messages";n&&(o="#user-signup #popup-messages"),$(o).html('<div class="error-container"><div class="error-container-inner">'+e.errors.join("<br />")+"</div></div>").show()}}function handleSignUpResponse(e){0==e.hasError?($(".checkout #popup-messages, #new-user #popup-messages").html('<div class="success-container"><div class="success-container-inner">'+e.message+"</div><div>").show(),$("#signupbox h2").html("Congratulations!"),$("#new-user #otp-verification").addClass("hidden"),$("#new-user .other-login-options").addClass("hidden"),$("#new-user #account-success-screen").removeClass("hidden"),$("#popup-messages .error-container").remove(),$(".formError").remove(),$(".fancybox-close, .fancybox-overlay").on("click",function(e){location.reload()}),""!=action&&null!=action&&callback(action,actionParams,redirectUrlAfterLogin),sign_in_and_sigup_response(e,!0)):$(".checkout #popup-messages, #signupbox #popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.errors.join("<br />")+"</div></div>")}function create_account(){return $("#fancybox-loading").css("display","block"),$(".checkout #popup-messages").html('<div class="success"> Please wait ......</div>'),$.post($("#user-register").attr("action"),$("#user-register").serialize(),function(e){handleSignUpResponse(e)},"json"),$("#fancybox-loading").css("display","none"),!1}function validateAndCreateAccount(){if($(".fancybox-close").on("click",function(){$(".formError").remove()}),$(".fancybox-overlay").on("click",function(){$(".formError").remove()}),$("#user-register").validationEngine(),$("#user-register").validationEngine("validate")){$("#user-register").addClass("register-button-clicked"),create_account(),trackGA("BsUI","Signup successful","BlueStone");try{sessionStorage.setItem("triggerLoginOrSignupEvent",JSON.stringify({event_type:"signup",registration_method:$("#signupInputEmail").val()||""}))}catch(e){}}return!1}
19$(document).ready(function(){$(this).validationEngine("hideAll"),action="",actionParams="",redirectUrlAfterLogin="",wrappClass="","singlePageCheckout"==PAGE_TYPE?wrappClass="auth-login spc":wrappClass="auth-login",$(".showLoginBox, #login-quick a").fancybox({openEffect:"elastic",closeEffect:"fade",overlayColor:"#000",overlayOpacity:".2",centerOnScroll:!1,scrolling:"no",type:"ajax",wrapCSS:wrappClass,beforeLoad:function(){if("/showLoginPage"===window.location.pathname)return $(".logintab").addClass("activeBox"),$(".signuptab").removeClass("activeBox"),!1;$(this).validationEngine("hideAll")},afterLoad:function(){trackGA("BsUI","Login popup shown"),setTimeout(function(){$("#otp-form").validationEngine()},1e3)},onComplete:function(){},onCleanup:function(){$("#user-login1").validationEngine("hideAll")},href:GLOBAL_CTX+"/showLoginPageBody"}),$(".logintab,.signuptab").on("click",function(){$(".logintab, .signuptab").removeClass("activeBox"),$(this).addClass("activeBox")}),$(".showSignupBox, #signup-quick a").fancybox({openEffect:"elastic",closeEffect:"fade",overlayColor:"#000",overlayOpacity:".2",centerOnScroll:!1,scrolling:"no",type:"ajax",wrapCSS:"auth-signup",beforeLoad:function(){if("/showLoginPage"===window.location.pathname)return $(".signuptab").addClass("activeBox"),$(".logintab").removeClass("activeBox"),!1;$(this).validationEngine("hideAll")},afterLoad:function(){trackGA("BsUI","Signup popup shown")},onComplete:function(){},onCleanup:function(){$("#user-register").validationEngine("hideAll")},href:GLOBAL_CTX+"/showSignUpPageBody"}),$("#user-login1").validationEngine(),$(document).on("click","#edit-create-account",function(e){e.preventDefault();var n=$("#user-register #email").val();$("#signupInputEmail").val(n);var i=$("#user-register #customer_phone").val(),o=getEmailRegisteredStatus(n,i);o.hasError?$("#new-user #popup-messages").html('<div class="error-container"><div class="error-container-inner">'+o.message+"</div><div>").show():generateOTPForSignup()}),$(document).on("click","#register-button-clicked",function(e){e.preventDefault()}),$(document).on("focus","#user-register .content input",function(e){$("#user-register").removeClass("register-button-clicked"),e.preventDefault()})});
20!function(e){"use strict";var t={init:function(a){var r=this;return r.data("jqv")&&null!=r.data("jqv")||(a=t._saveOptions(r,a),e(document).on("click",".formError",function(){e(this).fadeOut(function(){e(this).parent(".formErrorOuter").remove(),e(this).remove()})})),this},attach:function(a){var r,i=this;return(r=a?t._saveOptions(i,a):i.data("jqv")).validateAttribute=i.find("[data-validation-engine*=validate]").length?"data-validation-engine":"class",r.binded&&(i.find("["+r.validateAttribute+"*=validate]").not("[type=checkbox]").not("[type=radio]").not(".datepicker").bind(r.validationEventTrigger,t._onFieldEvent),i.find("["+r.validateAttribute+"*=validate][type=checkbox],["+r.validateAttribute+"*=validate][type=radio]").bind("click",t._onFieldEvent),i.find("["+r.validateAttribute+"*=validate][class*=datepicker]").bind(r.validationEventTrigger,{delay:300},t._onFieldEvent)),r.autoPositionUpdate&&e(window).bind("resize",{noAnimation:!0,formElem:i},t.updatePromptsPosition),i.bind("submit",t._onSubmitEvent),this},detach:function(){var a=this,r=a.data("jqv");return a.find("["+r.validateAttribute+"*=validate]").not("[type=checkbox]").unbind(r.validationEventTrigger,t._onFieldEvent),a.find("["+r.validateAttribute+"*=validate][type=checkbox],[class*=validate][type=radio]").unbind("click",t._onFieldEvent),a.unbind("submit",t.onAjaxFormComplete),a.find("["+r.validateAttribute+"*=validate]").not("[type=checkbox]").die(r.validationEventTrigger,t._onFieldEvent),a.find("["+r.validateAttribute+"*=validate][type=checkbox]").die("click",t._onFieldEvent),a.die("submit",t.onAjaxFormComplete),a.removeData("jqv"),r.autoPositionUpdate&&e(window).unbind("resize",t.updatePromptsPosition),this},validate:function(){return t._validateFields(this)},validateField:function(a){var r=e(this).data("jqv"),i=t._validateField(e(a),r);return r.onSuccess&&0==r.InvalidFields.length?r.onSuccess():r.onFailure&&r.InvalidFields.length>0&&r.onFailure(),i},validateform:function(){return t._onSubmitEvent.call(this)}
20,updatePromptsPosition:function(a){if(a&&this==window)var r=a.data.formElem,i=a.data.noAnimation;else r=e(this.closest("form"));var o=r.data("jqv");return r.find("["+o.validateAttribute+"*=validate]").not(":hidden").not(":disabled").each(function(){var a=e(this),r=t._getPrompt(a),l=e(r).find(".formErrorContent").html();r&&t._updatePrompt(a,e(r),l,void 0,!1,o,i)}),this},showPrompt:function(e,a,r,i){var o=this.closest("form").data("jqv");return o||(o=t._saveOptions(this,o)),r&&(o.promptPosition=r),o.showArrow=1==i,t._showPrompt(this,e,a,!1,o),this},hidePrompt:function(){var a=this.data("jqv"),r="."+t._getClassName(e(this).attr("id"))+"formError";return e(r).fadeTo(a.fadeDuration,.3,function(){e(this).parent(".formErrorOuter").remove(),e(this).remove()}),this},hide:function(){var a,r=this.data("jqv");return a=e(this).is("form")?"parentForm"+t._getClassName(e(this).attr("id")):t._getClassName(e(this).attr("id"))+"formError",e("."+a).fadeTo(r.fadeDuration,.1,function(){e(this).parent(".formErrorOuter").remove(),e(this).remove()}),this},hideAll:function(){var t=this.data("jqv");return null==t&&(t={fadeDuration:1}),e(".formError").fadeTo(t.fadeDuration,.1,function(){e(this).parent(".formErrorOuter").remove(),e(this).remove()}),this},_onFieldEvent:function(a){var r=e(this),i=r.closest("form").data("jqv");window.setTimeout(function(){t._validateField(r,i),0==i.InvalidFields.length&&i.onSuccess?i.onSuccess():i.InvalidFields.length>0&&i.onFailure&&i.onFailure()},a.data?a.data.delay:0)},_onSubmitEvent:function(){var a=e(this),r=a.data("jqv"),i=t._validateFields(a,r.ajaxFormValidation);return i&&r.ajaxFormValidation?(t._validateFormWithAjax(a,r),!1):r.onValidationComplete?(r.onValidationComplete(a,i),!1):i},_checkAjaxStatus:function(t){var a=!0;return e.each(t.ajaxValidCache,function(e,t){if(!t)return a=!1,!1}),a},_validateFields:function(a,r){var i=a.data("jqv"),o=!1;a.trigger("jqv.form.validating");var l=null;if(a.find("["+i.validateAttribute+"*=validate]").not(":hidden").not(":disabled").each(function(){var a=e(this);if(o|=t._validateField(a,i,r),i.doNotShowAllErrosOnSubmit)return!1;o&&null==l&&(l=a)}),a.trigger("jqv.form.result",[o]),o){if(i.scroll){var n=l.offset().top,s=l.offset().left,d=i.promptPosition;if("string"==typeof d&&-1!=d.indexOf(":")&&(d=d.substring(0,d.indexOf(":"))),"bottomRight"!=d&&"bottomLeft"!=d)n=t._getPrompt(l).offset().top;if(i.isOverflown){var u=e(i.overflownDIV);if(!u.length)return!1;n+=u.scrollTop()+-parseInt(u.offset().top)-5,e(i.overflownDIV+":not(:animated)").animate({scrollTop:n},1100,function(){i.focusFirstField&&l.focus()})}else e("html:not(:animated),body:not(:animated)").animate({scrollTop:n-100,scrollLeft:s},1100,function(){i.focusFirstField&&l.focus()})}else i.focusFirstField&&l.focus();return!1}return!0},_validateFormWithAjax:function(a,r){var i=a.serialize(),o=r.ajaxFormValidationURL?r.ajaxFormValidationURL:a.attr("action");e.ajax({type:"GET",url:o,cache:!1,dataType:"json",data:i,form:a,methods:t,options:r,beforeSend:function(){return r.onBeforeAjaxFormValidation(a,r)},error:function(e,a){t._ajaxError(e,a)},success:function(i){if(!0!==i){for(var o=!1,l=0;l<i.length;l++){var n=i[l],s=n[0],d=e(e("#"+s)[0]);if(1==d.length){var u=n[2];if(1==n[1])if(""!=u&&u){if(r.allrules[u])(c=r.allrules[u].alertTextOk)&&(u=c);t._showPrompt(d,u,"pass",!1,r,!0)}else t._closePrompt(d);else{var c;if(o|=!0,r.allrules[u])(c=r.allrules[u].alertText)&&(u=c);t._showPrompt(d,u,"",!1,r,!0)}}}r.onAjaxFormComplete(!o,a,i,r)}else r.onAjaxFormComplete(!0,a,"",r)}})},_validateField:function(a,r,i){a.attr("id")||e.error("jQueryValidate: an ID attribute is required for this field: "+a.attr("name")+" class:"+a.attr("class"));var o=a.attr(r.validateAttribute),l=/validate\[(.*)\]/.exec(o);if(!l)return!1;var n=l[1].split(/\[|,|\]/),s=!1,d=a.attr("name"),u="",c=!1;r.isError=!1,r.showArrow=!0;for(var v=e(a.closest("form")),f=0;f<n.length;f++){n[f]=n[f].replace(" ","");var p=void 0;switch(n[f]){case"required":c=!0,p=t._required(a,n,f,r);break;case"custom":p=t._customRegex(a,n,f,r);break;case"groupRequired":var m="["+r.validateAttribute+"*="+n[f+1]+"]";
20if((h=v.find(m).eq(0))[0]!=a[0]){t._validateField(h,r,i),r.showArrow=!0;continue}(p=t._groupRequired(a,n,f,r))&&(c=!0),r.showArrow=!1;break;case"ajax":i||(t._ajax(a,n,f,r),s=!0);break;case"minSize":p=t._minSize(a,n,f,r);break;case"maxSize":p=t._maxSize(a,n,f,r);break;case"min":p=t._min(a,n,f,r);break;case"max":p=t._max(a,n,f,r);break;case"past":p=t._past(a,n,f,r);break;case"future":p=t._future(a,n,f,r);break;case"dateRange":m="["+r.validateAttribute+"*="+n[f+1]+"]";var h=v.find(m).eq(0),x=v.find(m).eq(1);(h[0].value||x[0].value)&&(p=t._dateRange(h,x,n,f,r)),p&&(c=!0),r.showArrow=!1;break;case"dateTimeRange":m="["+r.validateAttribute+"*="+n[f+1]+"]",h=v.find(m).eq(0),x=v.find(m).eq(1);(h[0].value||x[0].value)&&(p=t._dateTimeRange(h,x,n,f,r)),p&&(c=!0),r.showArrow=!1;break;case"maxCheckbox":p=t._maxCheckbox(v,a,n,f,r),a=e(v.find("input[name='"+d+"']"));break;case"minCheckbox":p=t._minCheckbox(v,a,n,f,r),a=e(v.find("input[name='"+d+"']"));break;case"equals":p=t._equals(a,n,f,r);break;case"matchEmail":p=t._matchEmail(a,n,f,r);break;case"funcCall":p=t._funcCall(a,n,f,r);break;case"creditCard":p=t._creditCard(a,n,f,r)}if(void 0!==p&&(u+=p+"<br/>",r.isError=!0),1==r.isError)break}c||""!=a.val()||(r.isError=!1);var g=a.prop("type");("radio"==g||"checkbox"==g)&&v.find("input[name='"+d+"']").size()>1&&(a=e(v.find("input[name='"+d+"'][type!=hidden]:first")),r.showArrow=!1),"text"==g&&v.find("input[name='"+d+"']").size()>1&&(a=e(v.find("input[name='"+d+"'][type!=hidden]:first")),r.showArrow=!1),r.isError?t._showPrompt(a,u,"",!1,r):s||t._closePrompt(a),s||a.trigger("jqv.field.result",[a,r.isError,u]);var b=e.inArray(a[0],r.InvalidFields);return-1==b?r.isError&&r.InvalidFields.push(a[0]):r.isError||r.InvalidFields.splice(b,1),r.isError},_required:function(t,a,r,i){switch(t.prop("type")){case"text":case"password":case"textarea":case"file":default:if(!e.trim(t.val()))return i.allrules[a[r]].alertText;break;case"radio":case"checkbox":var o=t.closest("form"),l=t.attr("name");if(0==o.find("input[name='"+l+"']:checked").size())return 1==o.find("input[name='"+l+"']").size()?i.allrules[a[r]].alertTextCheckboxe:i.allrules[a[r]].alertTextCheckboxMultiple;break;case"select-one":if(!t.val())return i.allrules[a[r]].alertText;break;case"select-multiple":if(!t.find("option:selected").val())return i.allrules[a[r]].alertText}},_groupRequired:function(a,r,i,o){var l="["+o.validateAttribute+"*="+r[i+1]+"]",n=!1;if(a.closest("form").find(l).each(function(){if(!t._required(e(this),r,i,o))return n=!0,!1}),!n)return o.allrules[r[i]].alertText},_customRegex:function(e,t,a,r){var i=t[a+1],o=r.allrules[i];if(o){var l=o.regex;if(l)return new RegExp(l).test(e.val())?void 0:r.allrules[i].alertText;alert("jqv:custom regex not found "+i)}else alert("jqv:custom rule not found "+i)},_funcCall:function(e,t,a,r){var i=t[a+1],o=window[i]||r.customFunctions[i];if("function"==typeof o)return o(e,t,a,r)},_equals:function(t,a,r,i){var o=a[r+1];if(t.val()!=e("#"+o).val())return i.allrules.equals.alertText},_matchEmail:function(t,a,r,i){var o=a[r+1];if(t.val()!=e("#"+o).val())return i.allrules.matchEmail.alertText},_maxSize:function(e,t,a,r){var i=t[a+1];if(e.val().length>i){var o=r.allrules.maxSize;return o.alertText+i+o.alertText2}},_minSize:function(e,t,a,r){var i=t[a+1];if(e.val().length<i){var o=r.allrules.minSize;return o.alertText+i+o.alertText2}},_min:function(e,t,a,r){var i=parseFloat(t[a+1]);if(parseFloat(e.val())<i){var o=r.allrules.min;return o.alertText2?o.alertText+i+o.alertText2:o.alertText+i}},_max:function(e,t,a,r){var i=parseFloat(t[a+1]);if(parseFloat(e.val())>i){var o=r.allrules.max;return o.alertText2?o.alertText+i+o.alertText2:o.alertText+i}},_past:function(e,a,r,i){var o=a[r+1],l="now"==o.toLowerCase()?new Date:t._parseDate(o);if(t._parseDate(e.val())>l){var n=i.allrules.past;return n.alertText2?n.alertText+t._dateToString(l)+n.alertText2:n.alertText+t._dateToString(l)}},_future:function(e,a,r,i){var o=a[r+1],l="now"==o.toLowerCase()?new Date:t._parseDate(o);if(t._parseDate(e.val())<l){var n=i.allrules.future;return n.alertText2?n.alertText+t._dateToString(l)+n.alertText2:n.alertText+t._dateToString(l)}},_isDate:function(e){return new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?
20:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/).test(e)},_isDateTime:function(e){return new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/).test(e)},_dateCompare:function(e,t){return new Date(e.toString())<new Date(t.toString())},_dateRange:function(e,a,r,i,o){return!e[0].value&&a[0].value||e[0].value&&!a[0].value?o.allrules[r[i]].alertText+o.allrules[r[i]].alertText2:t._isDate(e[0].value)&&t._isDate(a[0].value)&&t._dateCompare(e[0].value,a[0].value)?void 0:o.allrules[r[i]].alertText+o.allrules[r[i]].alertText2},_dateTimeRange:function(e,a,r,i,o){return!e[0].value&&a[0].value||e[0].value&&!a[0].value?o.allrules[r[i]].alertText+o.allrules[r[i]].alertText2:t._isDateTime(e[0].value)&&t._isDateTime(a[0].value)&&t._dateCompare(e[0].value,a[0].value)?void 0:o.allrules[r[i]].alertText+o.allrules[r[i]].alertText2},_maxCheckbox:function(e,t,a,r,i){var o=a[r+1],l=t.attr("name");if(e.find("input[name='"+l+"']:checked").size()>o)return i.showArrow=!1,i.allrules.maxCheckbox.alertText2?i.allrules.maxCheckbox.alertText+" "+o+" "+i.allrules.maxCheckbox.alertText2:i.allrules.maxCheckbox.alertText},_minCheckbox:function(e,t,a,r,i){var o=a[r+1],l=t.attr("name");if(e.find("input[name='"+l+"']:checked").size()<o)return i.showArrow=!1,i.allrules.minCheckbox.alertText+" "+o+" "+i.allrules.minCheckbox.alertText2},_creditCard:function(e,t,a,r){var i=!1,o=e.val().replace(/ +/g,"").replace(/-+/g,""),l=o.length;if(l>=14&&l<=16&&parseInt(o)>0){var n,s=0,d=(a=l-1,1),u=new String;do{n=parseInt(o.charAt(a)),u+=d++%2==0?2*n:n}while(--a>=0);for(a=0;a<u.length;a++)s+=parseInt(u.charAt(a));i=s%10==0}if(!i)return r.allrules.creditCard.alertText},_ajax:function(a,r,i,o){var l=r[i+1],n=o.allrules[l],s=n.extraData,d=n.extraDataDynamic;if(s||(s=""),d){var u=[],c=String(d).split(",");for(i=0;i<c.length;i++){var v=c[i];if(e(v).length){var f=a.closest("form").find(v).val(),p=v.replace("#","")+"="+escape(f);u.push(p)}}d=u.join("&")}else d="";o.isError||e.ajax({type:"GET",url:n.url,cache:!1,dataType:"json",data:"fieldId="+a.attr("id")+"&fieldValue="+a.val()+"&extraData="+s+"&"+d,field:a,rule:n,methods:t,options:o,beforeSend:function(){var e=n.alertTextLoad;e&&t._showPrompt(a,e,"load",!0,o)},error:function(e,a){t._ajaxError(e,a)},success:function(a){var r=a[0],i=e(e("input[id='"+r+"']")[0]);if(1==i.length){var l=a[1],s=a[2];if(l){if(void 0!==o.ajaxValidCache[r]&&(o.ajaxValidCache[r]=!0),s){if(o.allrules[s])(d=o.allrules[s].alertTextOk)&&(s=d)}else s=n.alertTextOk;s?t._showPrompt(i,s,"pass",!0,o):t._closePrompt(i)}else{var d;if(o.ajaxValidCache[r]=!1,o.isError=!0,s){if(o.allrules[s])(d=o.allrules[s].alertText)&&(s=d)}else s=n.alertText;t._showPrompt(i,s,"",!0,o)}}i.trigger("jqv.field.result",[i,o.isError,s])}})},_ajaxError:function(e,t){0==e.status&&null==t&&alert("The page is not served from a server! ajax call failed")},_dateToString:function(e){return e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()},_parseDate:function(e){var t=e.split("-");return t==e&&(t=e.split("/")),new Date(t[0],t[1]-1,t[2])},_showPrompt:function(e,a,r,i,o,l){var n=t._getPrompt(e);l&&(n=!1),n?t._updatePrompt(e,n,a,r,i,o):t._buildPrompt(e,a,r,i,o)},_buildPrompt:function(a,r,i,o,l){var n=e("<div>");switch(n.addClass(t._getClassName(a.attr("id"))+"formError"),a.is(":input")&&n.addClass("parentForm"+t._getClassName(a.parents("form").attr("id"))),n.addClass("formError"),i){case"pass":n.addClass("greenPopup");break;case"load":n.addClass("blackPopup")}o&&n.addClass("ajaxed");e("<div>").addClass("formErrorContent").html(r).appendTo(n);if(l.showArrow){var s=e("<div>").addClass("formErrorArrow"),d=a.data("promptPosition")||l.promptPosition;if("string"==typeof d)-1!=(c=d.indexOf(":"))&&(d=d.substring(0,c));switch(d){case"bottomLeft":case"bottomRight":n.find(".formErrorContent").before(s),s.addClass("formErrorArrowBottom").html('<div class="line1">\x3c!-- --\x3e</div><div class="line2">\x3c!-- --\x3e</div><div class="line3">\x3c!-- --\x3e</div><div class="line4">\x3c!-- --\x3e</div><div class="line5">\x3c!-- --\x3e</div><div class="line6">\x3c!-- --\x3e</div><div class="line7">\x3c!-- --\x3e</div><div class="line8">\x3c!-- --\x3e</div><div class="line9">\x3c!-- --\x3e</div><div class="line10">\x3c!-- --\x3e</div>');break;case"topLeft":case"topRight":s.html('<div class="line10">\x3c!-- --\x3e</div><div class="line9">\x3c!-- --\x3e</div><div class="line8">\x3c!-- --\x3e</div><div class="line7">\x3c!-- --\x3e</div><div class="line6">\x3c!-- --\x3e</div><div class="line5">\x3c!-- --\x3e</div><div class="line4">\x3c!-- --\x3e</div><div class="line3">\x3c!-- --\x3e</div><div class="line2">\x3c!-- --\x3e</div><div class="line1">\x3c!-- --\x3e</div>'),n.append(s)}}if(a.closest(".ui-dialog").length&&n.addClass("formErrorInsideDialog"),l.relative){var u=e("
20<div>").css("position","relative").css("vertical-align","top").addClass("formErrorOuter").append(n.css("position","absolute"));a.after(u),l.relativePadding&&u.css("padding-bottom",n.height()+"px")}else l.isOverflown?a.before(n):e("body").append(n);var c=t._calculatePosition(a,n,l);return n.css({top:c.callerTopPosition,left:c.callerleftPosition,marginTop:c.marginTopSize,opacity:0}).data("callerField",a),l.autoHidePrompt&&setTimeout(function(){n.animate({opacity:0},function(){n.closest(".formErrorOuter").remove(),n.remove()})},l.autoHideDelay),n.animate({opacity:.87})},_updatePrompt:function(e,a,r,i,o,l,n){if(a){void 0!==i&&("pass"==i?a.addClass("greenPopup"):a.removeClass("greenPopup"),"load"==i?a.addClass("blackPopup"):a.removeClass("blackPopup")),o?a.addClass("ajaxed"):a.removeClass("ajaxed"),a.find(".formErrorContent").html(r);var s=t._calculatePosition(e,a,l),d={top:s.callerTopPosition,left:s.callerleftPosition,marginTop:s.marginTopSize};n?a.css(d):a.animate(d)}},_closePrompt:function(e){var a=t._getPrompt(e);a&&a.fadeTo("fast",0,function(){a.parent(".formErrorOuter").remove(),a.remove()})},closePrompt:function(e){return t._closePrompt(e)},_getPrompt:function(a){var r=t._getClassName(a.attr("id"))+"formError",i=e("."+t._escapeExpression(r))[0];if(i)return e(i)},_escapeExpression:function(e){return e.replace(/([#;&,\.\+\*\~':"\!\^$\[\]\(\)=>\|])/g,"\\$1")},isRTL:function(t){var a=e(document),r=e("body"),i=t&&t.hasClass("rtl")||t&&"rtl"===(t.attr("dir")||"").toLowerCase()||a.hasClass("rtl")||"rtl"===(a.attr("dir")||"").toLowerCase()||r.hasClass("rtl")||"rtl"===(r.attr("dir")||"").toLowerCase();return Boolean(i)},_calculatePosition:function(e,a,r){var i,o,l,n=e.width(),s=a.height(),d=r.isOverflown||r.relative;if(d)i=o=0,l=-s;else{var u=e.offset();i=u.top,o=u.left,l=0}var c=e.data("promptPosition")||r.promptPosition,v="",f="",p=0,m=0;if("string"==typeof c&&-1!=c.indexOf(":")&&(v=c.substring(c.indexOf(":")+1),c=c.substring(0,c.indexOf(":")),-1!=v.indexOf(",")&&(f=v.substring(v.indexOf(",")+1),v=v.substring(0,v.indexOf(",")),m=parseInt(f),isNaN(m)&&(m=0)),p=parseInt(v),isNaN(v)&&(v=0)),t.isRTL(e))switch(c){default:case"topLeft":d?o-=a.width()-30:(o-=a.width()-30,i+=-s-2);break;case"topRight":d?o+=n-a.width():(o+=n-a.width(),i+=-s-2);break;case"centerRight":d?(i=e.outerHeight(),o=e.outerWidth(1)+5):o+=e.outerWidth()+5;break;case"centerLeft":o-=a.width()+2;break;case"bottomLeft":o+=30-a.width(),i=i+e.height()+15;break;case"bottomRight":o+=n-a.width(),i+=e.height()+15}else switch(c){default:case"topRight":d?o+=n-30:(o+=n-30,i+=-s-2);break;case"topLeft":i+=-s-10;break;case"centerRight":d?(i=e.outerHeight(),o=e.outerWidth(1)+5):o+=e.outerWidth()+5;break;case"centerLeft":o-=a.width()+2;break;case"bottomLeft":i=i+e.height()+15;break;case"bottomRight":o+=n-30,i+=e.height()+5}return{callerTopPosition:(i+=m)+"px",callerleftPosition:(o+=p)+"px",marginTopSize:l+"px"}},_saveOptions:function(t,a){if(e.validationEngineLanguage)var r=e.validationEngineLanguage.allRules;else e.error("jQuery.validationEngine rules are not loaded, plz add localization files to the page");e.validationEngine.defaults.allrules=r;var i=e.extend(!0,{},e.validationEngine.defaults,a);return i.isOverflown&&(i.relative=!0),i.relative&&(i.isOverflown=!0),t.data("jqv",i),i},_getClassName:function(e){if(e)return e.replace(/:/g,"_").replace(/\./g,"_")}};e.fn.validationEngine=function(a){var r=e(this);return!!r[0]&&("string"==typeof a&&"_"!=a.charAt(0)&&t[a]?("showPrompt"!=a&&"hidePrompt"!=a&&"hide"!=a&&"hideAll"!=a&&t.init.apply(r),t[a].apply(r,Array.prototype.slice.call(arguments,1))):"object"!=typeof a&&a?void e.error("Method "+a+" does not exist in jQuery.validationEngine"):(t.init.apply(r,arguments),t.attach.apply(r)))},e.validationEngine={defaults:{validationEventTrigger:"blur",scroll:!1,focusFirstField:!0,promptPosition:"topRight",bindMethod:"bind",inlineAjax:!1,ajaxFormValidation:!1,ajaxFormValidationURL:!1,onAjaxFormComplete:e.noop,onBeforeAjaxFormValidation:e.noop,onValidationComplete:!1,relative:!1,relativePadding:!1,isOverflown:!1,overflownDIV:"",doNotShowAllErrosOnSubmit:!1,binded:!0,showArrow:!0,isError:!1,ajaxValidCache:{},autoPositionUpdate:!1,InvalidFields:[],onSuccess:!1,onFailure:!1,autoHidePrompt:!1,autoHideDelay:1e4,fadeDuration:.3}},e(function(){e.validationEngine.defaults.promptPosition=t.isRTL()?"topLeft":"topRight"})}(jQuery);
21!function(e){e.fn.validationEngineLanguage=function(){},e.validationEngineLanguage={newLang:function(){e.validationEngineLanguage.allRules={required:{regex:"none",alertText:"* This field is required",alertTextCheckboxMultiple:"* Please select an option",alertTextCheckboxe:"* This checkbox is required",alertTextDateRange:"* Both date range fields are required"},dateRange:{regex:"none",alertText:"* Invalid ",alertText2:"Date Range"},dateTimeRange:{regex:"none",alertText:"* Invalid ",alertText2:"Date Time Range"},minSize:{regex:"none",alertText:"* Minimum ",alertText2:" characters required"},maxSize:{regex:"none",alertText:"* Maximum ",alertText2:" characters allowed"},groupRequired:{regex:"none",alertText:"* You must fill one of the following fields"},min:{regex:"none",alertText:"* Minimum value is "},max:{regex:"none",alertText:"* Maximum value is "},past:{regex:"none",alertText:"* Date prior to "},future:{regex:"none",alertText:"* Date past "},maxCheckbox:{regex:"none",alertText:"* Maximum ",alertText2:" options allowed"},minCheckbox:{regex:"none",alertText:"* Please select ",alertText2:" options"},equals:{regex:"none",alertText:"* Your password is not matching"},matchEmail:{regex:"none",alertText:"* Your email is not matching"},creditCard:{regex:"none",alertText:"* Invalid credit card number"},phone:{regex:/^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,alertText:"* Invalid phone number"},email2:{regex:/^[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9+\/_-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/i,alertText:"* Invalid email address"},email:{regex:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,alertText:"* Invalid email address"},emailOrPhone:{regex:/^(((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)|(^[0][1-9]\d{9}$|^[1-9]\d{9}$)$/i,alertText:"* Please enter a valid email/mobile number"},integer:{regex:/^[\-\+]?\d+$/,alertText:"* Not a valid integer"},number:{regex:/^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,alertText:"* Invalid floating decimal number"},date:{regex:/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,alertText:"* Invalid date, must be in YYYY-MM-DD format"},ipv4:{regex:/^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,alertText:"* Invalid IP address"},url:{regex:/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,alertText:"* Invalid URL"},onlyNumberSp:{regex:/^[0-9\ ]+$/,alertText:"* Numbers only"},onlyLetterSp:{regex:/^[a-zA-Z\ \']+$/,alertText:"* Letters only"},onlyLetterNumber:{regex:/^[0-9a-zA-Z]+$/,alertText:"* No special characters allowed"},ajaxUserCall:{url:"ajaxValidateFieldUser",extraData:"name=eric",alertText:"* This user is already taken",alertTextLoad:"* Validating, please wait"},validatePincode:{url:GLOBAL_CTX+"/homeTryOn/pincodeValidation",alertText:"Please enter a valid pincode"},ajaxUserCallPhp:{url:"phpajax/ajaxValidateFieldUser.php",extraData:"name=eric",alertTextOk:"* This username is available",alertText:"* This user is already taken",alertTextLoad:"* Validating, please wait"},ajaxNameCall:{url:"ajaxValidateFieldName",alertText:"* This name is already taken",alertTextOk:"* This name is available",alertTextLoad:"* Validating, please wait"},ajaxNameCallPhp:{url:"phpajax/ajaxValidateFieldName.php",alertText:"* This name is already taken",alertTextLoad:"* Validating, please wait"},validate2fields:{alertText:"* Please input HELLO"},dateFormat:{regex:/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?
21:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/,alertText:"* Invalid Date"},dateTimeFormat:{regex:/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/,alertText:"* Invalid Date or Date Format",alertText2:"Expected Format: ",alertText3:"mm/dd/yyyy hh:mm:ss AM|PM or ",alertText4:"yyyy-mm-dd hh:mm:ss AM|PM"},userName:{regex:/^([a-zA-Z]{1})+\.?([a-zA-Z\. '\-])+$/,alertText:"Oops! Your name seems to have invalid characters."},telephone:{regex:/^([123456789]{1})([0-9]{9})$/,alertText:"* Please enter a valid 10 digit mobile number"},postcode:{regex:/^([123456789]{1})([0-9]{5})$/,alertText:"* Please enter a valid 6 digit pincode."},zipcode:{regex:/^([123456789]{1})([0-9]{5})$/,alertText:"* Please enter a valid postal code"},panNumber:{regex:/^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/,alertText:"* Please enter a valid PAN number"},testcode:{regex:/^[0-9a-zA-Z]+$/,alertText:"* Please enter a valid postal code"},mobile:{regex:/^([123456789]{1})([0-9]{9})$/,alertText:"* Please enter a valid mobile number"},selectRingSize:{regex:/^[0-9\ ]+$/,alertText:"Please Select a Ring size"},selectBangleSize:{regex:/^[0-9\ ]+$/,alertText:"Please Select a Bangle size"},selectBraceletSize:{regex:/^[0-9\ ]+$/,alertText:"Please Select a Bracelet size"},selectChainSize:{regex:/^[0-9\ ]+$/,alertText:"Please Select a Chain size"},ifscCode:{regex:/^[A-Za-z]{4}[a-zA-Z0-9]{7}$/,alertText:"* Please enter a valid IFSC code"},"mobile-number":{regex:/^[0][1-9]\d{9}$|^[1-9]\d{9}$/,alertText:"Please enter valid number"},gstNumber:{regex:/^[0-9]{2}[0-9A-Z]{2}[A-Z]{3}[0-9]{4}[0-9A-Z]{4}$/,alertText:"Please enter a valid gst number"},selectNecklaceSize:{regex:/^[0-9\ ]+$/,alertText:"Please Select a Necklace size"}}}},e.validationEngineLanguage.newLang()}(jQuery);
22jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(n,e,t,u,a){return jQuery.easing[jQuery.easing.def](n,e,t,u,a)},easeInQuad:function(n,e,t,u,a){return u*(e/=a)*e+t},easeOutQuad:function(n,e,t,u,a){return-u*(e/=a)*(e-2)+t},easeInOutQuad:function(n,e,t,u,a){return(e/=a/2)<1?u/2*e*e+t:-u/2*(--e*(e-2)-1)+t},easeInCubic:function(n,e,t,u,a){return u*(e/=a)*e*e+t},easeOutCubic:function(n,e,t,u,a){return u*((e=e/a-1)*e*e+1)+t},easeInOutCubic:function(n,e,t,u,a){return(e/=a/2)<1?u/2*e*e*e+t:u/2*((e-=2)*e*e+2)+t},easeInQuart:function(n,e,t,u,a){return u*(e/=a)*e*e*e+t},easeOutQuart:function(n,e,t,u,a){return-u*((e=e/a-1)*e*e*e-1)+t},easeInOutQuart:function(n,e,t,u,a){return(e/=a/2)<1?u/2*e*e*e*e+t:-u/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(n,e,t,u,a){return u*(e/=a)*e*e*e*e+t},easeOutQuint:function(n,e,t,u,a){return u*((e=e/a-1)*e*e*e*e+1)+t},easeInOutQuint:function(n,e,t,u,a){return(e/=a/2)<1?u/2*e*e*e*e*e+t:u/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(n,e,t,u,a){return-u*Math.cos(e/a*(Math.PI/2))+u+t},easeOutSine:function(n,e,t,u,a){return u*Math.sin(e/a*(Math.PI/2))+t},easeInOutSine:function(n,e,t,u,a){return-u/2*(Math.cos(Math.PI*e/a)-1)+t},easeInExpo:function(n,e,t,u,a){return 0==e?t:u*Math.pow(2,10*(e/a-1))+t},easeOutExpo:function(n,e,t,u,a){return e==a?t+u:u*(1-Math.pow(2,-10*e/a))+t},easeInOutExpo:function(n,e,t,u,a){return 0==e?t:e==a?t+u:(e/=a/2)<1?u/2*Math.pow(2,10*(e-1))+t:u/2*(2-Math.pow(2,-10*--e))+t},easeInCirc:function(n,e,t,u,a){return-u*(Math.sqrt(1-(e/=a)*e)-1)+t},easeOutCirc:function(n,e,t,u,a){return u*Math.sqrt(1-(e=e/a-1)*e)+t},easeInOutCirc:function(n,e,t,u,a){return(e/=a/2)<1?-u/2*(Math.sqrt(1-e*e)-1)+t:u/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(n,e,t,u,a){var r=1.70158,i=0,s=u;if(0==e)return t;if(1==(e/=a))return t+u;if(i||(i=.3*a),s<Math.abs(u)){s=u;r=i/4}else r=i/(2*Math.PI)*Math.asin(u/s);return-s*Math.pow(2,10*(e-=1))*Math.sin((e*a-r)*(2*Math.PI)/i)+t},easeOutElastic:function(n,e,t,u,a){var r=1.70158,i=0,s=u;if(0==e)return t;if(1==(e/=a))return t+u;if(i||(i=.3*a),s<Math.abs(u)){s=u;r=i/4}else r=i/(2*Math.PI)*Math.asin(u/s);return s*Math.pow(2,-10*e)*Math.sin((e*a-r)*(2*Math.PI)/i)+u+t},easeInOutElastic:function(n,e,t,u,a){var r=1.70158,i=0,s=u;if(0==e)return t;if(2==(e/=a/2))return t+u;if(i||(i=a*(.3*1.5)),s<Math.abs(u)){s=u;r=i/4}else r=i/(2*Math.PI)*Math.asin(u/s);return e<1?s*Math.pow(2,10*(e-=1))*Math.sin((e*a-r)*(2*Math.PI)/i)*-.5+t:s*Math.pow(2,-10*(e-=1))*Math.sin((e*a-r)*(2*Math.PI)/i)*.5+u+t},easeInBack:function(n,e,t,u,a,r){return null==r&&(r=1.70158),u*(e/=a)*e*((r+1)*e-r)+t},easeOutBack:function(n,e,t,u,a,r){return null==r&&(r=1.70158),u*((e=e/a-1)*e*((r+1)*e+r)+1)+t},easeInOutBack:function(n,e,t,u,a,r){return null==r&&(r=1.70158),(e/=a/2)<1?u/2*(e*e*((1+(r*=1.525))*e-r))+t:u/2*((e-=2)*e*((1+(r*=1.525))*e+r)+2)+t},easeInBounce:function(n,e,t,u,a){return u-jQuery.easing.easeOutBounce(n,a-e,0,u,a)+t},easeOutBounce:function(n,e,t,u,a){return(e/=a)<1/2.75?u*(7.5625*e*e)+t:e<2/2.75?u*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?u*(7.5625*(e-=2.25/2.75)*e+.9375)+t:u*(7.5625*(e-=2.625/2.75)*e+.984375)+t},easeInOutBounce:function(n,e,t,u,a){return e<a/2?.5*jQuery.easing.easeInBounce(n,2*e,0,u,a)+t:.5*jQuery.easing.easeOutBounce(n,2*e-a,0,u,a)+.5*u+t}});
23/*! Lazy Load 1.9.7 - MIT license - Copyright 2010-2015 Mika Tuupola */
24!function(e,t,i,o){var n=e(t);e.fn.lazyload=function(r){function g(){var t=0;l.each(function(){var i=e(this);if(!a.skip_invisible||i.is(":visible"))if(e.abovethetop(this,a)||e.leftofbegin(this,a));
24else if(e.belowthefold(this,a)||e.rightoffold(this,a)){if(++t>a.failure_limit)return!1}else i.trigger("appear"),t=0})}var f,l=this,a={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:t,data_attribute:"original",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return r&&(o!==r.failurelimit&&(r.failure_limit=r.failurelimit,delete r.failurelimit),o!==r.effectspeed&&(r.effect_speed=r.effectspeed,delete r.effectspeed),e.extend(a,r)),f=a.container===o||a.container===t?n:e(a.container),0===a.event.indexOf("scroll")&&f.bind(a.event,function(){return g()}),this.each(function(){var t=this,i=e(t);t.loaded=!1,(i.attr("src")===o||!1===i.attr("src"))&&i.is("img")&&i.attr("src",a.placeholder),i.one("appear",function(){if(!this.loaded){if(a.appear){var o=l.length;a.appear.call(t,o,a)}e("<img />").bind("load",function(){var o=i.attr("data-"+a.data_attribute);i.hide(),i.is("img")?i.attr("src",o):i.css("background-image","url('"+o+"')"),i[a.effect](a.effect_speed),t.loaded=!0;var n=e.grep(l,function(e){return!e.loaded});if(l=e(n),a.load){var r=l.length;a.load.call(t,r,a)}}).attr("src",i.attr("data-"+a.data_attribute))}}),0!==a.event.indexOf("scroll")&&i.bind(a.event,function(){t.loaded||i.trigger("appear")})}),n.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&n.bind("pageshow",function(t){t.originalEvent&&t.originalEvent.persisted&&l.each(function(){e(this).trigger("appear")})}),e(i).ready(function(){g()}),this},e.belowthefold=function(i,r){return(r.container===o||r.container===t?(t.innerHeight?t.innerHeight:n.height())+n.scrollTop():e(r.container).offset().top+e(r.container).height())<=e(i).offset().top-r.threshold},e.rightoffold=function(i,r){return(r.container===o||r.container===t?n.width()+n.scrollLeft():e(r.container).offset().left+e(r.container).width())<=e(i).offset().left-r.threshold},e.abovethetop=function(i,r){return(r.container===o||r.container===t?n.scrollTop():e(r.container).offset().top)>=e(i).offset().top+r.threshold+e(i).height()},e.leftofbegin=function(i,r){return(r.container===o||r.container===t?n.scrollLeft():e(r.container).offset().left)>=e(i).offset().left+r.threshold+e(i).width()},e.inviewport=function(t,i){return!(e.rightoffold(t,i)||e.leftofbegin(t,i)||e.belowthefold(t,i)||e.abovethetop(t,i))},e.extend(e.expr[":"],{"below-the-fold":function(t){return e.belowthefold(t,{threshold:0})},"above-the-top":function(t){return!e.belowthefold(t,{threshold:0})},"right-of-screen":function(t){return e.rightoffold(t,{threshold:0})},"left-of-screen":function(t){return!e.rightoffold(t,{threshold:0})},"in-viewport":function(t){return e.inviewport(t,{threshold:0})},"above-the-fold":function(t){return!e.belowthefold(t,{threshold:0})},"right-of-fold":function(t){return e.rightoffold(t,{threshold:0})},"left-of-fold":function(t){return!e.rightoffold(t,{threshold:0})}})}(jQuery,window,document);
25/*! lazysizes - v5.2.2 */
26!function(i){var c=function(i,c,u){"use strict";var d,f;if(function(){var c,u={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(c in f=i.lazySizesConfig||i.lazysizesConfig||{},u)c in f||(f[c]=u[c])}(),!c||!c.getElementsByClassName)return{init:function(){},cfg:f,noSupport:!0};var m=c.documentElement,y=i.HTMLPictureElement,h="addEventListener",z="getAttribute",v=i[h].bind(i),g=i.setTimeout,p=i.requestAnimationFrame||g,C=i.requestIdleCallback,b=/^picture$/i,A=["load","error","lazyincluded","_lazyloaded"],E={},_=Array.prototype.forEach,J=function(i,c){return E[c]||(E[c]=new RegExp("(\\s|^)"+c+"(\\s|$)")),E[c].test(i[z]("class")||"")&&E[c]},K=function(i,c){J(i,c)||i.setAttribute("class",(i[z]("class")||"").trim()+" "+c)},Q=function(i,c){var u;(u=J(i,c))&&i.setAttribute("class",(i[z]("class")||"").replace(u," "))},V=function(i,c,u){var d=u?h:"removeEventListener";u&&V(i,c),A.forEach(function(u){i[d](u,c)})},X=function(i,u,f,m,y){var h=c.createEvent("Event");return f||(f={}),f.instance=d,h.initEvent(u,!m,!y),h.detail=f,i.dispatchEvent(h),h},Y=function(c,u){var d;!y&&(d=i.picturefill||f.pf)?(u&&u.src&&!c[z]("srcset")&&c.setAttribute("srcset",u.src),d({reevaluate:!0,elements:[c]})):u&&u.src&&(c.src=u.src)},Z=function(i,c){return(getComputedStyle(i,null)||{})[c]},s=function(i,c,u){for(u=u||i.offsetWidth;u<f.minSize&&c&&!i._lazysizesWidth;)u=c.offsetWidth,c=c.parentNode;return u},w=function(){var i,u,d=[],f=[],m=d,s=function(){var c=m;for(m=d.length?f:d,i=!0,u=!1;c.length;)c.shift()();i=!1},e=function(d,f){i&&!f?d.apply(this,arguments):(m.push(d),u||(u=!0,(c.hidden?g:p)(s)))};return e._lsFlush=s,e}(),te=function(i,c){return c?function(){w(i)}:function(){var c=this,u=arguments;w(function(){i.apply(c,u)})}},ie=function(i){var c,d=0,m=f.throttleDelay,y=f.ricTimeout,t=function(){c=!1,d=u.now(),i()},h=C&&y>49?function(){C(t,{timeout:y}),y!==f.ricTimeout&&(y=f.ricTimeout)}:te(function(){g(t)},!0);return function(i){var f;(i=!0===i)&&(y=33),c||(c=!0,(f=m-(u.now()-d))<0&&(f=0),i||f<9?h():g(h,f))}},ae=function(i){var c,d,r=function(){c=null,i()},n=function(){var i=u.now()-d;i<99?g(n,99-i):(C||r)(r)};return function(){d=u.now(),c||(c=g(n,99))}},N=function(){var y,C,A,E,N,T,D,k,H,O,P,$,q=/^img$/i,I=/^iframe$/i,U="onscroll"in i&&!/(gle|ing)bot/.test(navigator.userAgent),j=0,G=0,ee=-1,x=function(i){G--,(!i||G<0||!i.target)&&(G=0)},W=function(i){return null==$&&($="hidden"==Z(c.body,"visibility")),$||!("hidden"==Z(i.parentNode,"visibility")&&"hidden"==Z(i,"visibility"))},S=function(i,u){var d,f=i,y=W(i);for(k-=u,P+=u,H-=u,O+=u;y&&(f=f.offsetParent)&&f!=c.body&&f!=m;)(y=(Z(f,"opacity")||1)>
260)&&"visible"!=Z(f,"overflow")&&(d=f.getBoundingClientRect(),y=O>d.left&&H<d.right&&P>d.top-1&&k<d.bottom+1);return y},t=function(){var i,u,h,v,g,p,b,A,_,w,N,M,q=d.elements;if((E=f.loadMode)&&G<8&&(i=q.length)){for(u=0,ee++;u<i;u++)if(q[u]&&!q[u]._lazyRace)if(!U||d.prematureUnveil&&d.prematureUnveil(q[u]))R(q[u]);else if((A=q[u][z]("data-expand"))&&(p=1*A)||(p=j),w||(w=!f.expand||f.expand<1?m.clientHeight>500&&m.clientWidth>500?500:370:f.expand,d._defEx=w,N=w*f.expFactor,M=f.hFac,$=null,j<N&&G<1&&ee>2&&E>2&&!c.hidden?(j=N,ee=0):j=E>1&&ee>1&&G<6?w:0),_!==p&&(T=innerWidth+p*M,D=innerHeight+p,b=-1*p,_=p),h=q[u].getBoundingClientRect(),(P=h.bottom)>=b&&(k=h.top)<=D&&(O=h.right)>=b*M&&(H=h.left)<=T&&(P||O||H||k)&&(f.loadHidden||W(q[u]))&&(C&&G<3&&!A&&(E<3||ee<4)||S(q[u],p))){if(R(q[u]),g=!0,G>9)break}else!g&&C&&!v&&G<4&&ee<4&&E>2&&(y[0]||f.preloadAfterLoad)&&(y[0]||!A&&(P||O||H||k||"auto"!=q[u][z](f.sizesAttr)))&&(v=y[0]||q[u]);v&&!g&&R(v)}},ne=ie(t),B=function(i){var c=i.target;c._lazyCache?delete c._lazyCache:(x(i),K(c,f.loadedClass),Q(c,f.loadingClass),V(c,L),X(c,"lazyloaded"))},re=te(B),L=function(i){re({target:i.target})},F=function(i){var c,u=i[z](f.srcsetAttr);(c=f.customMedia[i[z]("data-media")||i[z]("media")])&&i.setAttribute("media",c),u&&i.setAttribute("srcset",u)},oe=te(function(i,c,u,d,m){var y,h,v,p,C,E;(C=X(i,"lazybeforeunveil",c)).defaultPrevented||(d&&(u?K(i,f.autosizesClass):i.setAttribute("sizes",d)),h=i[z](f.srcsetAttr),y=i[z](f.srcAttr),m&&(p=(v=i.parentNode)&&b.test(v.nodeName||"")),E=c.firesLoad||"src"in i&&(h||y||p),C={target:i},K(i,f.loadingClass),E&&(clearTimeout(A),A=g(x,2500),V(i,L,!0)),p&&_.call(v.getElementsByTagName("source"),F),h?i.setAttribute("srcset",h):y&&!p&&(I.test(i.nodeName)?function(i,c){try{i.contentWindow.location.replace(c)}catch(u){i.src=c}}(i,y):i.src=y),m&&(h||p)&&Y(i,{src:y})),i._lazyRace&&delete i._lazyRace,Q(i,f.lazyClass),w(function(){var c=i.complete&&i.naturalWidth>1;E&&!c||(c&&K(i,"ls-is-cached"),B(C),i._lazyCache=!0,g(function(){"_lazyCache"in i&&delete i._lazyCache},9)),"lazy"==i.loading&&G--},!0)}),R=function(i){if(!i._lazyRace){var c,u=q.test(i.nodeName),d=u&&(i[z](f.sizesAttr)||i[z]("sizes")),m="auto"==d;(!m&&C||!u||!i[z]("src")&&!i.srcset||i.complete||J(i,f.errorClass)||!J(i,f.lazyClass))&&(c=X(i,"lazyunveilread").detail,m&&M.updateElem(i,!0,i.offsetWidth),i._lazyRace=!0,G++,oe(i,c,m,d,u))}},se=ae(function(){f.loadMode=3,ne()}),l=function(){3==f.loadMode&&(f.loadMode=2),se()},o=function(){C||(u.now()-N<999?g(o,999):(C=!0,f.loadMode=3,ne(),v("scroll",l,!0)))};return{_:function(){N=u.now(),d.elements=c.getElementsByClassName(f.lazyClass),y=c.getElementsByClassName(f.lazyClass+" "+f.preloadClass),v("scroll",ne,!0),v("resize",ne,!0),v("pageshow",function(i){if(i.persisted){var u=c.querySelectorAll("."+f.loadingClass);u.length&&u.forEach&&p(function(){u.forEach(function(i){i.complete&&R(i)})})}}),i.MutationObserver?new MutationObserver(ne).observe(m,{childList:!0,subtree:!0,attributes:!0}):(m[h]("DOMNodeInserted",ne,!0),m[h]("DOMAttrModified",ne,!0),setInterval(ne,999)),v("hashchange",ne,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(i){c[h](i,ne,!0)}),/d$|^c/.test(c.readyState)?o():(v("load",o),c[h]("DOMContentLoaded",ne),g(o,2e4)),d.elements.length?(t(),w._lsFlush()):ne()},checkElems:ne,unveil:R,_aLSL:l}}(),M=function(){var i,u=te(function(i,c,u,d){var f,m,y;if(i._lazysizesWidth=d,d+="px",i.setAttribute("sizes",d),b.test(c.nodeName||""))for(m=0,y=(f=c.getElementsByTagName("source")).length;m<y;m++)f[m].setAttribute("sizes",d);u.detail.dataAttr||Y(i,u.detail)}),a=function(i,c,d){var f,m=i.parentNode;m&&(d=s(i,m,d),(f=X(i,"lazybeforesizes",{width:d,dataAttr:!!c})).defaultPrevented||(d=f.detail.width)&&d!==i._lazysizesWidth&&u(i,m,f,d))},d=ae(function(){var c,u=i.length;if(u)for(c=0;c<u;c++)a(i[c])});return{_:function(){i=c.getElementsByClassName(f.autosizesClass),v("resize",d)},checkElems:d,updateElem:a}}(),t=function(){!t.i&&c.getElementsByClassName&&(t.i=!0,M._(),N._())};return g(function(){f.init&&t()}),d={cfg:f,autoSizer:M,loader:N,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:w}}(i,i.document,Date);i.lazySizes=c,"object"==typeof module&&module.exports&&(module.exports=c)}("undefined"!=typeof window?window:{});
27/*!
28 * jQuery Cookie Plugin v1.4.1
29 * https://github.com/carhartl/jquery-cookie
30 *
31 * Copyright 2006, 2014 Klaus Hartl
32 * Released under the MIT license
33 */
34!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){var o=/\+/g;function encode(e){return n.raw?e:encodeURIComponent(e)}function decode(e){return n.raw?e:decodeURIComponent(e)}function stringifyCookieValue(e){return encode(n.json?JSON.stringify(e):String(e))}function read(i,r){var t=n.raw?i:function parseCookieValue(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(o," ")),n.json?JSON.parse(e):e}catch(e){}}(i);return e.isFunction(r)?r(t):t}var n=e.cookie=function(o,i,r){if(arguments.length>1&&!e.isFunction(i)){if("number"==typeof(r=e.extend({},n.defaults,r)).expires){var t=r.expires,c=r.expires=new Date;c.setMilliseconds(c.getMilliseconds()+864e5*t)}return document.cookie=[encode(o),"=",stringifyCookieValue(i),r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"",r.secure?"; secure":""].join("")}for(var u=o?void 0:{},d=document.cookie?document.cookie.split("; "):[],a=0,s=d.length;a<s;a++){var f=d[a].split("="),p=decode(f.shift()),l=f.join("=");if(o===p){u=read(l,i);break}o||void 0===(l=read(l))||(u[p]=l)}return u};n.defaults={},e.removeCookie=function(o,n){return e.cookie(o,"",e.extend({},n,{expires:-1})),!e.cookie(o)}});
35"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(t){return t<10?"0"+t:t}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(t){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(t){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;function quote(t){return escapable.lastIndex=0,escapable.test(t)?'"'+t.replace(escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var n,r,o,u,i,p=gap,a=e[t];switch(a&&"object"==typeof a&&"function"==typeof a.toJSON&&(a=a.toJSON(t)),"function"==typeof rep&&(a=rep.call(e,t,a)),typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";if(gap+=indent,i=[],"[object Array]"===Object.prototype.toString.apply(a)){for(u=a.length,n=0;n<u;n+=1)i[n]=str(n,a)||"null";return o=0===i.length?"[]":gap?"[\n"+gap+i.join(",\n"+gap)+"\n"+p+"]":"["+i.join(",")+"]",gap=p,o}if(rep&&"object"==typeof rep)for(u=rep.length,n=0;n<u;n+=1)"string"==typeof rep[n]&&(o=str(r=rep[n],a))&&i.push(quote(r)+(gap?": ":":")+o);else for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(o=str(r,a))&&i.push(quote(r)+(gap?": ":":")+o);return o=0===i.length?"{}":gap?"{\n"+gap+i.join(",\n"+gap)+"\n"+p+"}":"{"+i.join(",")+"}",gap=p,o}}
35"function"!=typeof JSON.stringify&&(JSON.stringify=function(t,e,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(t,e){var n,r,o=t[e];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(void 0!==(r=walk(o,n))?o[n]=r:delete o[n]);return reviver.call(t,e,o)}if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\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+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();
36function showPopupFancyBox(o,n){o&&$.fancybox({transitionIn:"elastic",transitionOut:"fade",overlayColor:"#000",overlayOpacity:".2",centerOnScroll:!1,scrolling:"no",enableEscapeButton:!1,type:"ajax",wrapCSS:"fp-transparent wga",onComplete:function(){},onCleanup:function(){},href:GLOBAL_CTX+n})}function showPopupFancyBox2(o,n){o&&$.fancybox({transitionIn:"elastic",transitionOut:"fade",overlayColor:"#000",overlayOpacity:".8",centerOnScroll:!1,scrolling:"no",enableEscapeButton:!1,type:"ajax",wrapCSS:"fp-transparent wga",onComplete:function(){},onCleanup:function(){},helpers:{overlay:{closeClick:!1}},keys:{close:[0]},href:GLOBAL_CTX+n})}function validateGuideShopPopup(){return $("#guide-store").validationEngine(),$("#guide-store").validationEngine("validate")&&submit_popup(),!1}function submit_popup(){return $("#guide-store").validationEngine(),$("#fancybox-loading").css("display","block"),$.post($("#guide-store").attr("action"),$("#guide-store").serialize(),function(o){handlePopupGuideStoreResponse(o)},"json"),$("#fancybox-loading").css("display","none"),!1}function handlePopupGuideStoreResponse(o){0==o.hasError?$("#popup-form").html('<div class="visit-guideshop"><div class="visit-head">Please visit our Guide shop at:</div><div class="visit-address"><div class="bs-icon"></div>212/A, 1st Floor,<br>1st Main Road,<br>2nd Stage, Domlur,<br>Bangalore 560071<br>Karnataka, India</div></div>'):($("#popup-form .error-container").css("display","block"),$("#popup-form .error-container .error-container-inner").html(o.message))}
37/*!
38 * hoverIntent v1.8.0 // 2014.06.29 // jQuery v1.9.1+
39 * http://cherne.net/brian/resources/jquery.hoverIntent.html
40 *
41 * You may use hoverIntent under the terms of the MIT license. Basically that
42 * means you are free to use hoverIntent as long as this header is left intact.
43 * Copyright 2007, 2014 Brian Cherne
44 */
45!function(e){e.fn.hoverIntent=function(t,n,o){var r,v,i,u,s={interval:100,sensitivity:6,timeout:0};s="object"==typeof t?e.extend(s,t):e.isFunction(n)?e.extend(s,{over:t,out:n,selector:o}):e.extend(s,{over:t,out:t,selector:n});var track=function(e){r=e.pageX,v=e.pageY},compare=function(t,n){if(n.hoverIntent_t=clearTimeout(n.hoverIntent_t),Math.sqrt((i-r)*(i-r)+(u-v)*(u-v))<s.sensitivity)return e(n).off("mousemove.hoverIntent",track),n.hoverIntent_s=!0,s.over.apply(n,[t]);i=r,u=v,n.hoverIntent_t=setTimeout(function(){compare(t,n)},s.interval)},handleHover=function(t){var n=e.extend({},t),o=this;o.hoverIntent_t&&(o.hoverIntent_t=clearTimeout(o.hoverIntent_t)),"mouseenter"===t.type?(i=n.pageX,u=n.pageY,e(o).on("mousemove.hoverIntent",track),o.hoverIntent_s||(o.hoverIntent_t=setTimeout(function(){compare(n,o)},s.interval))):(e(o).off("mousemove.hoverIntent",track),o.hoverIntent_s&&(o.hoverIntent_t=setTimeout(function(){!function(e,t){t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=!1,s.out.apply(t,[e])}(n,o)},s.timeout)))};return this.on({"mouseenter.hoverIntent":handleHover,"mouseleave.hoverIntent":handleHover},s.selector)}}(jQuery);
46!function(e){var r=[],t=!1,i=!1,o={interval:250,force_process:!1},n=e(window),a=[];function process(){i=!1;for(var t=0,o=r.length;t<o;t++){var n=e(r[t]).filter(function(){return e(this).is(":appeared")});if(n.trigger("appear",[n]),a[t]){var s=a[t].not(n);s.trigger("disappear",[s])}a[t]=n}}e.expr[":"].appeared=function(r){var t=e(r);if(!t.is(":visible"))return!1;var i=n.scrollLeft(),o=n.scrollTop(),a=t.offset(),s=a.left,p=a.top;return p+t.height()>=o&&p-(t.data("appear-top-offset")||0)<=o+n.height()&&s+t.width()>
46=i&&s-(t.data("appear-left-offset")||0)<=i+n.width()},e.fn.extend({appear:function(n){var s=e.extend({},o,n||{}),p=this.selector||this;if(!t){var on_check=function(){i||(i=!0,setTimeout(process,s.interval))};e(window).scroll(on_check).resize(on_check),t=!0}return s.force_process&&setTimeout(process,s.interval),function add_selector(e){r.push(e),a.push()}(p),e(p)}}),e.extend({force_appear:function(){return!!t&&(process(),!0)}})}("undefined"!=typeof module?require("jquery"):jQuery);
47!function(ne){"function"==typeof define&&define.amd?define(["jquery"],ne):"object"==typeof exports?module.exports=ne:ne(jQuery)}(function(ne){function b(le){var re=le||window.event,ce=se.call(arguments,1),ue=0,he=0,fe=0,me=0,pe=0,ge=0;if((le=ne.event.fix(re)).type="mousewheel","detail"in re&&(fe=-1*re.detail),"wheelDelta"in re&&(fe=re.wheelDelta),"wheelDeltaY"in re&&(fe=re.wheelDeltaY),"wheelDeltaX"in re&&(he=-1*re.wheelDeltaX),"axis"in re&&re.axis===re.HORIZONTAL_AXIS&&(he=-1*fe,fe=0),ue=0===fe?he:fe,"deltaY"in re&&(ue=fe=-1*re.deltaY),"deltaX"in re&&(he=re.deltaX,0===fe&&(ue=-1*he)),0!==fe||0!==he){if(1===re.deltaMode){var ve=ne.data(this,"mousewheel-line-height");ue*=ve,fe*=ve,he*=ve}else if(2===re.deltaMode){var xe=ne.data(this,"mousewheel-page-height");ue*=xe,fe*=xe,he*=xe}if(me=Math.max(Math.abs(fe),Math.abs(he)),(!ie||ie>me)&&(ie=me,d(re,me)&&(ie/=40)),d(re,me)&&(ue/=40,he/=40,fe/=40),ue=Math[ue>=1?"floor":"ceil"](ue/ie),he=Math[he>=1?"floor":"ceil"](he/ie),fe=Math[fe>=1?"floor":"ceil"](fe/ie),de.settings.normalizeOffset&&this.getBoundingClientRect){var we=this.getBoundingClientRect();pe=le.clientX-we.left,ge=le.clientY-we.top}return le.deltaX=he,le.deltaY=fe,le.deltaFactor=ie,le.offsetX=pe,le.offsetY=ge,le.deltaMode=0,ce.unshift(le,ue,he,fe),ae&&clearTimeout(ae),ae=setTimeout(c,200),(ne.event.dispatch||ne.event.handle).apply(this,ce)}}function c(){ie=null}function d(ne,ae){return de.settings.adjustOldDeltas&&"mousewheel"===ne.type&&ae%120==0}var ae,ie,le=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],re="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],se=Array.prototype.slice;if(ne.event.fixHooks)for(var ce=le.length;ce;)ne.event.fixHooks[le[--ce]]=ne.event.mouseHooks;var de=ne.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var ae=re.length;ae;)this.addEventListener(re[--ae],b,!1);else this.onmousewheel=b;ne.data(this,"mousewheel-line-height",de.getLineHeight(this)),ne.data(this,"mousewheel-page-height",de.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var ae=re.length;ae;)this.removeEventListener(re[--ae],b,!1);else this.onmousewheel=null;ne.removeData(this,"mousewheel-line-height"),ne.removeData(this,"mousewheel-page-height")},getLineHeight:function(ae){var ie=ne(ae),le=ie["offsetParent"in ne.fn?"offsetParent":"parent"]();return le.length||(le=ne("body")),parseInt(le.css("fontSize"),10)||parseInt(ie.css("fontSize"),10)||16},getPageHeight:function(ae){return ne(ae).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};ne.fn.extend({mousewheel:function(ne){return ne?this.bind("mousewheel",ne):this.trigger("mousewheel")},unmousewheel:function(ne){return this.unbind("mousewheel",ne)}})}),function(ne){"function"==typeof define&&define.amd?define(["jquery"],ne):"object"==typeof exports?module.exports=ne:ne(jQuery)}(function(ne){function b(le){var re=le||window.event,ce=se.call(arguments,1),ue=0,he=0,fe=0,me=0,pe=0,ge=0;if((le=ne.event.fix(re)).type="mousewheel","detail"in re&&(fe=-1*re.detail),"wheelDelta"in re&&(fe=re.wheelDelta),"wheelDeltaY"in re&&(fe=re.wheelDeltaY),"wheelDeltaX"in re&&(he=-1*re.wheelDeltaX),"axis"in re&&re.axis===re.HORIZONTAL_AXIS&&(he=-1*fe,fe=0),ue=0===fe?he:fe,"deltaY"in re&&(ue=fe=-1*re.deltaY),"deltaX"in re&&(he=re.deltaX,0===fe&&(ue=-1*he)),0!==fe||0!==he){if(1===re.deltaMode){var ve=ne.data(this,"mousewheel-line-height");ue*=ve,fe*=ve,he*=ve}else if(2===re.deltaMode){var xe=ne.data(this,"mousewheel-page-height");ue*=xe,fe*=xe,he*=xe}if(me=Math.max(Math.abs(fe),Math.abs(he)),(!ie||ie>me)&&(ie=me,d(re,me)&&(ie/=40)),d(re,me)&&(ue/=40,he/=40,fe/=40),ue=Math[ue>=1?"floor":"ceil"](ue/ie),he=Math[he>=1?"floor":"ceil"](he/ie),fe=Math[fe>=1?"floor":"ceil"](fe/ie),de.settings.normalizeOffset&&this.getBoundingClientRect){var we=this.getBoundingClientRect();pe=le.clientX-we.left,ge=le.clientY-we.top}return le.deltaX=he,le.deltaY=fe,le.deltaFactor=ie,le.offsetX=pe,le.offsetY=ge,le.deltaMode=0,ce.unshift(le,ue,he,fe),ae&&clearTimeout(ae),ae=setTimeout(c,200),(ne.event.dispatch||ne.event.handle).apply(this,ce)}}function c(){ie=null}function d(ne,ae){return de.settings.adjustOldDeltas&&"mousewheel"===ne.type&&ae%120==0}var ae,ie,le=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],re="onwheel"in document||document.documentMode>
vendor: 9,236 bytes, line 47
47=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],se=Array.prototype.slice;if(ne.event.fixHooks)for(var ce=le.length;ce;)ne.event.fixHooks[le[--ce]]=ne.event.mouseHooks;var de=ne.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var ae=re.length;ae;)this.addEventListener(re[--ae],b,!1);else this.onmousewheel=b;ne.data(this,"mousewheel-line-height",de.getLineHeight(this)),ne.data(this,"mousewheel-page-height",de.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var ae=re.length;ae;)this.removeEventListener(re[--ae],b,!1);else this.onmousewheel=null;ne.removeData(this,"mousewheel-line-height"),ne.removeData(this,"mousewheel-page-height")},getLineHeight:function(ae){var ie=ne(ae),le=ie["offsetParent"in ne.fn?"offsetParent":"parent"]();return le.length||(le=ne("body")),parseInt(le.css("fontSize"),10)||parseInt(ie.css("fontSize"),10)||16},getPageHeight:function(ae){return ne(ae).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};ne.fn.extend({mousewheel:function(ne){return ne?this.bind("mousewheel",ne):this.trigger("mousewheel")},unmousewheel:function(ne){return this.unbind("mousewheel",ne)}})}),function(ne){"undefined"!=typeof module&&module.exports?module.exports=ne:ne(jQuery,window,document)}(function(ne){var ae,ie,le;ae="function"==typeof define&&define.amd,ie="undefined"!=typeof module&&module.exports,le="https:"==document.location.protocol?"https:":"http:",ae||(ie?require("jquery-mousewheel")(ne):ne.event.special.mousewheel||ne("head").append(decodeURI("%3Cscript src="+le+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E"))),function(){var ae,ie="mCustomScrollbar",le="mCS",re=".mCustomScrollbar",se={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},ce=0,de={},ue=window.attachEvent&&!window.addEventListener?1:0,he=!1,fe=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],me={init:function(ae){ae=ne.extend(!0,{},se,ae);var ie=f.call(this);if(ae.live){var ue=ae.liveSelector||this.selector||re,he=ne(ue);if("off"===ae.live)return void m(ue);de[ue]=setTimeout(function(){he.mCustomScrollbar(ae),"once"===ae.live&&he.length&&m(ue)},500)}else m(ue);return ae.setWidth=ae.set_width?ae.set_width:ae.setWidth,ae.setHeight=ae.set_height?ae.set_height:ae.setHeight,ae.axis=ae.horizontalScroll?"x":p(ae.axis),ae.scrollInertia=ae.scrollInertia>0&&ae.scrollInertia<17?17:ae.scrollInertia,"object"!=typeof ae.mouseWheel&&1==ae.mouseWheel&&(ae.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),ae.mouseWheel.scrollAmount=ae.mouseWheelPixels?ae.mouseWheelPixels:ae.mouseWheel.scrollAmount,ae.mouseWheel.normalizeDelta=ae.advanced.normalizeMouseWheelDelta?ae.advanced.normalizeMouseWheelDelta:ae.mouseWheel.normalizeDelta,ae.scrollButtons.scrollType=g(ae.scrollButtons.scrollType),h(ae),ne(ie).each(function(){var ie=ne(this);if(!ie.data(le)){ie.data(le,{idx:++ce,opt:ae,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:ie.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var re=ie.data(le),se=re.opt,de=ie.data("mcs-axis"),ue=ie.data("mcs-scrollbar-position"),he=ie.data("mcs-theme");de&&(se.axis=de),ue&&(se.scrollbarPosition=ue),he&&(se.theme=he,h(se)),v.call(this),re&&se.callbacks.onCreate&&"function"==typeof se.callbacks.onCreate&&se.callbacks.onCreate.call(this),ne("#mCSB_"+re.idx+"_container img:not(."+fe[2]+")").addClass(fe[2]),me.update.call(null,ie)}})},update:function(ae,ie){var re=ae||f.call(this);return ne(re).each(function(){var ae=ne(this);if(ae.data(le)){var re=ae.data(le),se=re.opt,ce=ne("#mCSB_"+re.idx+"_container"),de=ne("#mCSB_"+re.idx),ue=[ne("#mCSB_"+re.idx+"_dragger_vertical"),ne("#mCSB_"+re.idx+"_dragger_horizontal")];if(!ce.length)return;re.tweenRunning&&N(ae),ie&&re&&se.callbacks.onBeforeUpdate&&"function"==typeof se.callbacks.onBeforeUpdate&&se.callbacks.onBeforeUpdate.call(this),ae.hasClass(fe[3])&&ae.removeClass(fe[3]),ae.hasClass(fe[4])&&ae.removeClass(fe[4]),de.css("max-height","none"),de.height()!==ae.height()&&de.css("max-height",ae.height()),_.call(this),"y"===se.axis||se.advanced.autoExpandHorizontalScroll||ce.css("width",x(ce)),re.overflowed=y.call(this),M.call(this),se.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var he=[Math.abs(ce[0].offsetTop),Math.abs(ce[0].offsetLeft)];"x"!==se.axis&&(re.overflowed[0]?ue[0].height()>ue[0].parent().height()?B.call(this):(V(ae,he[0].toString(),{dir:"y",dur:0,overwrite:"none"}),re.contentReset.y=null):(B.call(this),"y"===se.axis?k.call(this):"yx"===se.axis&&re.overflowed[1]&&V(ae,he[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==se.axis&&(re.overflowed[1]?ue[1].width()>ue[1].parent().width()?B.call(this):(V(ae,he[1].toString(),{dir:"x",dur:0,overwrite:"none"}),re.contentReset.x=null):(B.call(this),"x"===se.axis?k.call(this):"yx"===se.axis&&re.overflowed[0]&&V(ae,he[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),ie&&re&&(2===ie&&se.callbacks.onImageLoad&&"function"==typeof se.callbacks.onImageLoad?se.callbacks.onImageLoad.call(this):3===ie&&se.callbacks.onSelectorChange&&"function"==typeof se.callbacks.onSelectorChange?se.callbacks.onSelectorChange.call(this):se.callbacks.onUpdate&&"function"==typeof se.callbacks.onUpdate&&se.callbacks.onUpdate.call(this)),X.call(this)}})},scrollTo:function(ae,ie){if(void 0!==ae&&null!=ae){var re=f.call(this);return ne(re).each(function(){var re=ne(this);if(re.data(le)){var se=re.data(le),ce=se.opt,de={trigger:"external",scrollInertia:ce.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},ue=ne.extend(!0,{},de,ie),he=q.call(this,ae),fe=ue.scrollInertia>0&&ue.scrollInertia<17?17:ue.scrollInertia;he[0]=Y.call(this,he[0],"y"),he[1]=Y.call(this,he[1],"x"),ue.moveDragger&&(he[0]*=se.scrollRatio.y,he[1]*=se.scrollRatio.x),ue.dur=oe()?0:fe,setTimeout(function(){null!==he[0]&&void 0!==he[0]&&"x"!==ce.axis&&se.overflowed[0]&&(ue.dir="y",ue.overwrite="all",V(re,he[0].toString(),ue)),null!==he[1]&&void 0!==he[1]&&"y"!==ce.axis&&se.overflowed[1]&&(ue.dir="x",ue.overwrite="none",V(re,he[1].toString(),ue))},ue.timeout)}})}},stop:function(){var ae=f.call(this);return ne(ae).each(function(){var ae=ne(this);ae.data(le)&&N(ae)})},disable:function(ae){var ie=f.call(this);return ne(ie).each(function(){var ie=ne(this);ie.data(le)&&(ie.data(le),X.call(this,"remove"),k.call(this),ae&&B.call(this),M.call(this,!0),ie.addClass(fe[3]))})},destroy:function(){var ae=f.call(this);return ne(ae).each(function(){var re=ne(this);if(re.data(le)){var se=re.data(le),ce=se.opt,de=ne("#mCSB_"+se.idx),ue=ne("#mCSB_"+se.idx+"_container"),he=ne(".mCSB_"+se.idx+"_scrollbar");ce.live&&m(ce.liveSelector||ne(ae).selector),X.call(this,"remove"),k.call(this),B.call(this),re.removeData(le),K(this,"mcs"),he.remove(),ue.find("img."+fe[2]).removeClass(fe[2]),de.replaceWith(ue.contents()),re.removeClass(ie+" _"+le+"_"+se.idx+" "+fe[6]+" "+fe[7]+" "+fe[5]+" "+fe[3]).addClass(fe[4])}})}},f=function(){return"object"!=typeof ne(this)||ne(this).length<1?re:this},h=function(ae){var ie=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],le=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],re=["minimal","minimal-dark"],se=["minimal","minimal-dark"],ce=["minimal","minimal-dark"];ae.autoDraggerLength=!(ne.inArray(ae.theme,ie)>-1)&&ae.autoDraggerLength,ae.autoExpandScrollbar=!(ne.inArray(ae.theme,le)>-1)&&ae.autoExpandScrollbar,ae.scrollButtons.enable=!(ne.inArray(ae.theme,re)>-1)&&ae.scrollButtons.enable,ae.autoHideScrollbar=ne.inArray(ae.theme,se)>-1||ae.autoHideScrollbar,ae.scrollbarPosition=ne.inArray(ae.theme,ce)>-1?"outside":ae.scrollbarPosition},m=function(ne){de[ne]&&(clearTimeout(de[ne]),K(de,ne))},p=function(ne){return"yx"===ne||"xy"===ne||"auto"===ne?"yx":"x"===ne||"horizontal"===ne?"x":"y"},g=function(ne){return"stepped"===ne||"pixels"===ne||"step"===ne||"click"===ne?"stepped":"stepless"},v=function(){var ae=ne(this),re=ae.data(le),se=re.opt,ce=se.autoExpandScrollbar?" "+fe[1]+"_expand":"",de=["<div id='m
47CSB_"+re.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+re.idx+"_scrollbar mCS-"+se.theme+" mCSB_scrollTools_vertical"+ce+"'><div class='"+fe[12]+"'><div id='mCSB_"+re.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+re.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+re.idx+"_scrollbar mCS-"+se.theme+" mCSB_scrollTools_horizontal"+ce+"'><div class='"+fe[12]+"'><div id='mCSB_"+re.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],ue="yx"===se.axis?"mCSB_vertical_horizontal":"x"===se.axis?"mCSB_horizontal":"mCSB_vertical",he="yx"===se.axis?de[0]+de[1]:"x"===se.axis?de[1]:de[0],me="yx"===se.axis?"<div id='mCSB_"+re.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",pe=se.autoHideScrollbar?" "+fe[6]:"",ge="x"!==se.axis&&"rtl"===re.langDir?" "+fe[7]:"";se.setWidth&&ae.css("width",se.setWidth),se.setHeight&&ae.css("height",se.setHeight),se.setLeft="y"!==se.axis&&"rtl"===re.langDir?"989999px":se.setLeft,ae.addClass(ie+" _"+le+"_"+re.idx+pe+ge).wrapInner("<div id='mCSB_"+re.idx+"' class='mCustomScrollBox mCS-"+se.theme+" "+ue+"'><div id='mCSB_"+re.idx+"_container' class='mCSB_container' style='position:relative; top:"+se.setTop+"; left:"+se.setLeft+";' dir="+re.langDir+" /></div>");var ve=ne("#mCSB_"+re.idx),xe=ne("#mCSB_"+re.idx+"_container");"y"===se.axis||se.advanced.autoExpandHorizontalScroll||xe.css("width",x(xe)),"outside"===se.scrollbarPosition?("static"===ae.css("position")&&ae.css("position","relative"),ae.css("overflow","visible"),ve.addClass("mCSB_outside").after(he)):(ve.addClass("mCSB_inside").append(he),xe.wrap(me)),w.call(this);var we=[ne("#mCSB_"+re.idx+"_dragger_vertical"),ne("#mCSB_"+re.idx+"_dragger_horizontal")];we[0].css("min-height",we[0].height()),we[1].css("min-width",we[1].width())},x=function(ae){var ie=[ae[0].scrollWidth,Math.max.apply(Math,ae.children().map(function(){return ne(this).outerWidth(!0)}).get())],le=ae.parent().width();return ie[0]>le?ie[0]:ie[1]>le?ie[1]:"100%"},_=function(){var ae=ne(this).data(le),ie=ae.opt,re=ne("#mCSB_"+ae.idx+"_container");if(ie.advanced.autoExpandHorizontalScroll&&"y"!==ie.axis){re.css({width:"auto","min-width":0,"overflow-x":"scroll"});var se=Math.ceil(re[0].scrollWidth);3===ie.advanced.autoExpandHorizontalScroll||2!==ie.advanced.autoExpandHorizontalScroll&&se>re.parent().width()?re.css({width:se,"min-width":"100%","overflow-x":"inherit"}):re.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(re[0].getBoundingClientRect().right+.4)-Math.floor(re[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var ae=ne(this).data(le),ie=ae.opt,re=ne(".mCSB_"+ae.idx+"_scrollbar:first"),se=ee(ie.scrollButtons.tabindex)?"tabindex='"+ie.scrollButtons.tabindex+"'":"",ce=["<a href='#' class='"+fe[13]+"' oncontextmenu='return false;' "+se+" />","<a href='#' class='"+fe[14]+"' oncontextmenu='return false;' "+se+" />","<a href='#' class='"+fe[15]+"' oncontextmenu='return false;' "+se+" />","<a href='#' class='"+fe[16]+"' oncontextmenu='return false;' "+se+" />"],de=["x"===ie.axis?ce[2]:ce[0],"x"===ie.axis?ce[3]:ce[1],ce[2],ce[3]];ie.scrollButtons.enable&&re.prepend(de[0]).append(de[1]).next(".mCSB_scrollTools").prepend(de[2]).append(de[3])},S=function(){var ae=ne(this).data(le),ie=ne("#mCSB_"+ae.idx),re=ne("#mCSB_"+ae.idx+"_container"),se=[ne("#mCSB_"+ae.idx+"_dragger_vertical"),ne("#mCSB_"+ae.idx+"_dragger_horizontal")],ce=[ie.height()/re.outerHeight(!1),ie.width()/re.outerWidth(!1)],de=[parseInt(se[0].css("min-height")),Math.round(ce[0]*se[0].parent().height()),parseInt(se[1].css("min-width")),Math.round(ce[1]*se[1].parent().width())],he=ue&&de[1]<de[0]?de[0]:de[1],fe=ue&&de[3]<de[2]?de[2]:de[3];se[0].css({height:he,"max-height":se[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":de[0]+"px"}),se[1].css({width:fe,"max-width":se[1].parent().width()-10})},b=function(){var ae=ne(this).data(le),ie=ne("#mCSB_"+ae.idx),re=ne("#mCSB_"+ae.idx+"_container"),se=[ne("#mCSB_"+ae.idx+"_dragger_vertical"),ne("#mCSB_"+ae.idx+"_dragger_horizontal")],ce=[re.outerHeight(!1)-ie.height(),re.outerWidth(!1)-ie.width()],de=[ce[0]/(se[0].parent().height()-se[0].height()),ce[1]/(se[1].parent().width()-se[1].width())];ae.scrollRatio={y:de[0],x:de[1]}},C=function(ne,ae,ie){var le=ie?fe[0]+"_expanded":"",re=ne.closest(".mCSB_scrollTools");"active"===ae?(ne.toggleClass(fe[0]+" "+le),re.toggleClass(fe[1]),ne[0]._draggable=ne[0]._draggable?0:1):ne[0]._draggable||("hide"===ae?(ne.removeClass(fe[0]),re.removeClass(fe[1])):(ne.addClass(fe[0]),re.addClass(fe[1])))},y=function(){var ae=ne(this).data(le),ie=ne("#mCSB_"+ae.idx),re=ne("#mCSB_"+ae.idx+"_container"),se=null==ae.overflowed?re.height():re.outerHeight(!1),ce=null==ae.overflowed?re.width():re.outerWidth(!1),de=re[0].scrollHeight,ue=re[0].scrollWidth;return de>se&&(se=de),ue>ce&&(ce=ue),[se>ie.height(),ce>ie.width()]},B=function(){var ae=ne(this),ie=ae.data(le),re=ie.opt,se=ne("#mCSB_"+ie.idx),ce=ne("#mCSB_"+ie.idx+"_container"),de=[ne("#mCSB_"+ie.idx+"_dragger_vertical"),ne("#mCSB_"+ie.idx+"_dragger_horizontal")];if(N(ae),("x"!==re.axis&&!ie.overflowed[0]||"y"===re.axis&&ie.overflowed[0])&&(de[0].add(ce).css("top",0),V(ae,"_resetY")),"y"!==re.axis&&!ie.overflowed[1]||"x"===re.axis&&ie.overflowed[1]){var ue=dx=0;"rtl"===ie.langDir&&(ue=se.width()-ce.outerWidth(!1),dx=Math.abs(ue/ie.scrollRatio.x)),ce.css("left",ue),de[1].css("left",dx),V(ae,"_resetX")}},T=function(){function t(){ae=setTimeout(function(){ne.event.special.mousewheel?(clearTimeout(ae),R.call(ie[0])):t()},100)}var ae,ie=ne(this),re=ie.data(le),se=re.opt;re.bindEvents||(I.call(this),se.contentTouchScroll&&D.call(this),E.call(this),se.mouseWheel.enable&&t(),L.call(this),P.call(this),se.advanced.autoScrollOnFocus&&z.call(this),se.scrollButtons.enable&&H.call(this),se.keyboard.enable&&U.call(this),re.bindEvents=!0)},k=function(){var ae=ne(this),ie=ae.data(le),re=ie.opt,se=le+"_"+ie.idx,ce=".mCSB_"+ie.idx+"_scrollbar",de=ne("#mCSB_"+ie.idx+",#mCSB_"+ie.idx+"_container,#mCSB_"+ie.idx+"_container_wrapper,"+ce+" ."+fe[12]+",#mCSB_"+ie.idx+"_dragger_vertical,#mCSB_"+ie.idx+"_dragger_horizontal,"+ce+">a"),ue=ne("#mCSB_"+ie.idx+"_container");re.advanced.releaseDraggableSelectors&&de.add(ne(re.advanced.releaseDraggableSelectors)),re.advanced.extraDraggableSelectors&&de.add(ne(re.advanced.extraDraggableSelectors)),ie.bindEvents&&(ne(document).add(ne(!W()||top.document)).unbind("."+se),de.each(function(){ne(this).unbind("."+se)}),clearTimeout(ae[0]._focusTimeout),K(ae[0],"_focusTimeout"),clearTimeout(ie.sequential.step),K(ie.sequential,"step"),clearTimeout(ue[0].onCompleteTimeout),K(ue[0],"onCompleteTimeout"),ie.bindEvents=!1)},M=function(ae){var ie=ne(this),re=ie.data(le),se=re.opt,ce=ne("#mCSB_"+re.idx+"_container_wrapper"),de=ce.length?ce:ne("#mCSB_"+re.idx+"_container"),ue=[ne("#mCSB_"+re.idx+"_scrollbar_vertical"),ne("#mCSB_"+re.idx+"_scrollbar_horizontal")],he=[ue[0].find(".mCSB_dragger"),ue[1].find(".mCSB_dragger")];"x"!==se.axis&&(re.overflowed[0]&&!ae?(ue[0].add(he[0]).add(ue[0].children("a")).css("display","block"),de.removeClass(fe[8]+" "+fe[10])):(se.alwaysShowScrollbar?(2!==se.alwaysShowScrollbar&&he[0].css("display","none"),de.removeClass(fe[10])):(ue[0].css("display","none"),de.addClass(fe[10])),de.addClass(fe[8]))
vendor: 25,368 bytes, line 47
47),"y"!==se.axis&&(re.overflowed[1]&&!ae?(ue[1].add(he[1]).add(ue[1].children("a")).css("display","block"),de.removeClass(fe[9]+" "+fe[11])):(se.alwaysShowScrollbar?(2!==se.alwaysShowScrollbar&&he[1].css("display","none"),de.removeClass(fe[11])):(ue[1].css("display","none"),de.addClass(fe[11])),de.addClass(fe[9]))),re.overflowed[0]||re.overflowed[1]?ie.removeClass(fe[5]):ie.addClass(fe[5])},O=function(ae){var ie=ae.type,le=ae.target.ownerDocument!==document?[ne(frameElement).offset().top,ne(frameElement).offset().left]:null,re=W()&&ae.target.ownerDocument!==top.document?[ne(ae.view.frameElement).offset().top,ne(ae.view.frameElement).offset().left]:[0,0];switch(ie){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return le?[ae.originalEvent.pageY-le[0]+re[0],ae.originalEvent.pageX-le[1]+re[1],!1]:[ae.originalEvent.pageY,ae.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var se=ae.originalEvent.touches[0]||ae.originalEvent.changedTouches[0],ce=ae.originalEvent.touches.length||ae.originalEvent.changedTouches.length;return ae.target.ownerDocument!==document?[se.screenY,se.screenX,ce>1]:[se.pageY,se.pageX,ce>1];default:return le?[ae.pageY-le[0]+re[0],ae.pageX-le[1]+re[1],!1]:[ae.pageY,ae.pageX,!1]}},I=function(){function t(ne){var ae=pe.find("iframe");if(ae.length){var ie=ne?"auto":"none";ae.css("pointer-events",ie)}}function o(ne,ie,le,re){if(pe[0].idleTimer=de.scrollInertia<233?250:0,ae.attr("id")===me[1])var ue="x",he=(ae[0].offsetLeft-ie+re)*ce.scrollRatio.x;else ue="y",he=(ae[0].offsetTop-ne+le)*ce.scrollRatio.y;V(se,he.toString(),{dir:ue,drag:!0})}var ae,ie,re,se=ne(this),ce=se.data(le),de=ce.opt,fe=le+"_"+ce.idx,me=["mCSB_"+ce.idx+"_dragger_vertical","mCSB_"+ce.idx+"_dragger_horizontal"],pe=ne("#mCSB_"+ce.idx+"_container"),ge=ne("#"+me[0]+",#"+me[1]),ve=de.advanced.releaseDraggableSelectors?ge.add(ne(de.advanced.releaseDraggableSelectors)):ge,xe=de.advanced.extraDraggableSelectors?ne(!W()||top.document).add(ne(de.advanced.extraDraggableSelectors)):ne(!W()||top.document);ge.bind("mousedown."+fe+" touchstart."+fe+" pointerdown."+fe+" MSPointerDown."+fe,function(le){if(le.stopImmediatePropagation(),le.preventDefault(),Z(le)){he=!0,ue&&(document.onselectstart=function(){return!1}),t(!1),N(se);var ce=(ae=ne(this)).offset(),fe=O(le)[0]-ce.top,me=O(le)[1]-ce.left,pe=ae.height()+ce.top,ge=ae.width()+ce.left;pe>fe&&fe>0&&ge>me&&me>0&&(ie=fe,re=me),C(ae,"active",de.autoExpandScrollbar)}}).bind("touchmove."+fe,function(ne){ne.stopImmediatePropagation(),ne.preventDefault();var le=ae.offset(),se=O(ne)[0]-le.top,ce=O(ne)[1]-le.left;o(ie,re,se,ce)}),ne(document).add(xe).bind("mousemove."+fe+" pointermove."+fe+" MSPointerMove."+fe,function(ne){if(ae){var le=ae.offset(),se=O(ne)[0]-le.top,ce=O(ne)[1]-le.left;if(ie===se&&re===ce)return;o(ie,re,se,ce)}}).add(ve).bind("mouseup."+fe+" touchend."+fe+" pointerup."+fe+" MSPointerUp."+fe,function(ne){ae&&(C(ae,"active",de.autoExpandScrollbar),ae=null),he=!1,ue&&(document.onselectstart=null),t(!0)})},D=function(){function o(ne){if(!$(ne)||he||O(ne)[2])ae=0;else{ae=1,we=0,_e=0,ie=1,Se.removeClass("mCS_touch_action");var le=Te.offset();re=O(ne)[0]-le.top,se=O(ne)[1]-le.left,Ee=[O(ne)[0],O(ne)[1]]}}function n(ne){if($(ne)&&!he&&!O(ne)[2]&&(Ce.documentTouchScroll||ne.preventDefault(),ne.stopImmediatePropagation(),(!_e||we)&&ie)){fe=G();var ae=Be.offset(),le=O(ne)[0]-ae.top,ce=O(ne)[1]-ae.left,de="mcsLinearOut";if(ke.push(le),De.push(ce),Ee[2]=Math.abs(O(ne)[0]-Ee[0]),Ee[3]=Math.abs(O(ne)[1]-Ee[1]),be.overflowed[0])var ue=Me[0].parent().height()-Me[0].height(),me=re-le>0&&le-re>-ue*be.scrollRatio.y&&(2*Ee[3]<Ee[2]||"yx"===Ce.axis);if(be.overflowed[1])var pe=Me[1].parent().width()-Me[1].width(),ge=se-ce>0&&ce-se>-pe*be.scrollRatio.x&&(2*Ee[2]<Ee[3]||"yx"===Ce.axis);me||ge?(ze||ne.preventDefault(),we=1):(_e=1,Se.addClass("mCS_touch_action")),ze&&ne.preventDefault(),ve="yx"===Ce.axis?[re-le,se-ce]:"x"===Ce.axis?[null,se-ce]:[re-le,null],Te[0].idleTimer=250,be.overflowed[0]&&s(ve[0],Oe,de,"y","all",!0),be.overflowed[1]&&s(ve[1],Oe,de,"x",Ie,!0)}}function i(ne){if(!$(ne)||he||O(ne)[2])ae=0;else{ae=1,ne.stopImmediatePropagation(),N(Se),ue=G();var ie=Be.offset();ce=O(ne)[0]-ie.top,de=O(ne)[1]-ie.left,ke=[],De=[]}}function r(ne){if($(ne)&&!he&&!O(ne)[2]){ie=0,ne.stopImmediatePropagation(),we=0,_e=0,me=G();var ae=Be.offset(),le=O(ne)[0]-ae.top,re=O(ne)[1]-ae.left;if(!(me-fe>30)){var se="mcsEaseOut",Se=2.5>(ge=1e3/(me-ue)),ye=Se?[ke[ke.length-2],De[De.length-2]]:[0,0];pe=Se?[le-ye[0],re-ye[1]]:[le-ce,re-de];var Me=[Math.abs(pe[0]),Math.abs(pe[1])];ge=Se?[Math.abs(pe[0]/4),Math.abs(pe[1]/4)]:[ge,ge];var Oe=[Math.abs(Te[0].offsetTop)-pe[0]*l(Me[0]/ge[0],ge[0]),Math.abs(Te[0].offsetLeft)-pe[1]*l(Me[1]/ge[1],ge[1])];ve="yx"===Ce.axis?[Oe[0],Oe[1]]:"x"===Ce.axis?[null,Oe[1]]:[Oe[0],null],xe=[4*Me[0]+Ce.scrollInertia,4*Me[1]+Ce.scrollInertia];var Ee=parseInt(Ce.contentTouchScroll)||0;ve[0]=Me[0]>Ee?ve[0]:0,ve[1]=Me[1]>Ee?ve[1]:0,be.overflowed[0]&&s(ve[0],xe[0],se,"y",Ie,!1),be.overflowed[1]&&s(ve[1],xe[1],se,"x",Ie,!1)}}}function l(ne,ae){var ie=[1.5*ae,2*ae,ae/1.5,ae/2];return ne>90?ae>4?ie[0]:ie[3]:ne>60?ae>3?ie[3]:ie[2]:ne>30?ae>8?ie[1]:ae>6?ie[0]:ae>4?ae:ie[2]:ae>8?ae:ie[3]}function s(ne,ae,ie,le,re,se){ne&&V(Se,ne.toString(),{dur:ae,scrollEasing:ie,dir:le,overwrite:re,drag:se})}var ie,re,se,ce,de,ue,fe,me,pe,ge,ve,xe,we,_e,Se=ne(this),be=Se.data(le),Ce=be.opt,ye=le+"_"+be.idx,Be=ne("#mCSB_"+be.idx),Te=ne("#mCSB_"+be.idx+"_container"),Me=[ne("#mCSB_"+be.idx+"_dragger_vertical"),ne("#mCSB_"+be.idx+"_dragger_horizontal")],ke=[],De=[],Oe=0,Ie="yx"===Ce.axis?"none":"all",Ee=[],Le=Te.find("iframe"),Re=["touchstart."+ye+" pointerdown."+ye+" MSPointerDown."+ye,"touchmove."+ye+" pointermove."+ye+" MSPointerMove."+ye,"touchend."+ye+" pointerup."+ye+" MSPointerUp."+ye],ze=void 0!==document.body.style.touchAction;Te.bind(Re[0],function(ne){o(ne)}).bind(Re[1],function(ne){n(ne)}),Be.bind(Re[0],function(ne){i(ne)}).bind(Re[2],function(ne){r(ne)}),Le.length&&Le.each(function(){ne(this).load(function(){W(this)&&ne(this.contentDocument||this.contentWindow.document).bind(Re[0],function(ne){o(ne),i(ne)}).bind(Re[1],function(ne){n(ne)}).bind(Re[2],function(ne){r(ne)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(ne,ae,le){de.type=le&&ie?"stepped":"stepless",de.scrollAmount=10,F(re,ne,ae,"mcsLinearOut",le?60:null)}var ie,re=ne(this),se=re.data(le),ce=se.opt,de=se.sequential,ue=le+"_"+se.idx,fe=ne("#mCSB_"+se.idx+"_container"),me=fe.parent();fe.bind("mousedown."+ue,function(ne){ae||ie||(ie=1,he=!0)}).add(document).bind("mousemove."+ue,function(ne){if(!ae&&ie&&o()){var le=fe.offset(),re=O(ne)[0]-le.top+fe[0].offsetTop,ue=O(ne)[1]-le.left+fe[0].offsetLeft;re>0&&re<me.height()&&ue>0&&ue<me.width()?de.step&&n("off",null,"stepped"):("x"!==ce.axis&&se.overflowed[0]&&(0>re?n("on",38):re>me.height()&&n("on",40)),"y"!==ce.axis&&se.overflowed[1]&&(0>ue?n("on",37):ue>me.width()&&n("on",39)))}}).bind("mouseup."+ue+" dragend."+ue,function(ne){ae||(ie&&(ie=0,n("off",null)),he=!1)})},R=function(){function t(le,se){if(N(ae),!A(ae,le.target)){var he="auto"!==re.mouseWheel.deltaFactor?parseInt(re.mouseWheel.deltaFactor):ue&&le.deltaFactor<100?100:le.deltaFactor||100,fe=re.scrollInertia;if("x"===re.axis||"x"===re.mouseWheel.axis)var me="x",pe=[Math.round(he*ie.scrollRatio.x),parseInt(re.mouseWheel.scrollAmount)],ge="auto"!==re.mouseWheel.scrollAmount?pe[1]:pe[0]>=ce.width()?.9*ce.width():pe[0],ve=Math.abs(ne("#mCSB_"+ie.idx+"_container")[0].offsetLeft),xe=de[1][0].offsetLeft,we=de[1].parent().width()-de[1].width(),_e=le.deltaX||le.deltaY||se;else me="y",pe=[Math.round(he*ie.scrollRatio.y),parseInt(re.mouseWheel.scrollAmount)],ge="auto"!==re.mouseWheel.scrollAmount?pe[1]:pe[0]>=ce.height()?.9*ce.height():pe[0],ve=Math.abs(ne("#mCSB_"+ie.idx+"_container")[0].offsetTop),xe=de[0][0].offsetTop,we=de[0].parent().height()-de[0].height(),_e=le.deltaY||se;"y"===me&&!ie.overflowed[0]||"x"===me&&!ie.overflowed[1]||((re.mouseWheel.invert||le.webkitDirectionInvertedFromDevice)&&(_e=-_e),re.mouseWheel.normalizeDelta&&(_e=0>_e?-1:1),(_e>0&&0!==xe||0>_e&&xe!==we||re.mouseWheel.preventDefault)&&(le.stopImmediatePropagation(),le.preventDefault()),le.deltaFactor<2&&!re.mouseWheel.normalizeDelta&&(ge=le.deltaFactor,fe=17),V(ae,(ve-_e*ge).toString(),{dir:me,dur:fe}))}}if(ne(this).data(le)){var ae=ne(this),ie=ae.data(le),re=ie.opt,se=le+"_"+ie.idx,ce=ne("#mCSB_"+ie.idx),de=[ne("#mCSB_"+ie.idx+"_dragger_vertical"),ne("#mCSB_"+ie.idx+"_dragger_horizontal")],he=ne("#mCSB_"+ie.idx+"_container").find("iframe");he.length&&he.each(function(){ne(this).load(function(){W(this)&&ne(this.contentDocument||this.contentWindow.document).bind("mousewheel."+se,function(ne,ae){t(ne,ae)})})}),ce.bind("mousewheel."+se,function(ne,ae){t(ne,ae)})}},W=function(ne){var ae=null;if(ne){try{ae=(ne.contentDocument||ne.contentWindow.document).body.innerHTML}catch(ne){}return null!==ae}try{ae=top.document.body.innerHTML}catch(ne){}return null!==ae},A=function(ae,ie){var re=ie.nodeName.toLowerCase(),se=ae.data(le).opt.mouseWheel.disableOver,ce=["select","textarea"];return ne.inArray(re,se)>-1&&!(ne.inArray(re,ce)>-1&&!ne(ie).is(":focus"))},L=function(){var ae,ie=ne(this),re=ie.data(le),se=le+"_"+re.idx,ce=ne("#mCSB_"+re.idx+"_container"),de=ce.parent();ne(".mCSB_"+re.idx+"_scrollbar ."+fe[12]).bind("mousedown."+se+" touchstart."+se+" pointerdown."+se+" MSPointerDown."+se,function(ie){he=!0,ne(ie.target).hasClass("mCSB_dragger")||(ae=1)}).bind("touchend."+se+" pointerup."+se+" MSPointerUp."+se,function(ne){he=!1}).bind("click."+se,function(le){if(ae&&(ae=0,ne(le.target).hasClass(fe[12])||ne(le.target).hasClass("mCSB_draggerRail"))){N(ie);var se=ne(this),ue=se.find(".mCSB_dragger");if(se.parent(".mCSB_scrollTools_horizontal").length>0){if(!re.overflowed[1])return;var he="x",me=le.pageX>ue.offset().left?-1:1,pe=Math.abs(ce[0].offsetLeft)-.9*me*de.width()}else{if(!re.overflowed[0])return;he="y",me=le.pageY>ue.offset().top?-1:1,pe=Math.abs(ce[0].offsetTop)-.9*me*de.height()}V(ie,pe.toString(),{dir:he,scrollEasing:"mcsEaseInOut"})}})},z=function(){var ae=ne(this),ie=ae.data(le),re=ie.opt,se=le+"_"+ie.idx,ce=ne("#mCSB_"+ie.idx+"_container"),de=ce.parent();ce.bind("focusin."+se,function(ie){var le=ne(document.activeElement),se=ce.find(".mCustomScrollBox").length,ue=0;le.is(re.advanced.autoScrollOnFocus)&&(N(ae),clearTimeout(ae[0]._focusTimeout),ae[0]._focusTimer=se?(ue+17)*se:0,ae[0]._focusTimeout=setTimeout(function(){var ne=[te(le)[0],te(le)[1]],ie=[ce[0].offsetTop,ce[0].offsetLeft],se=[ie[0]+ne[0]>=0&&ie[0]+ne[0]<de.height()-le.outerHeight(!1),ie[1]+ne[1]>=0&&ie[0]+ne[1]<de.width()-le.outerWidth(!1)],he="yx"!==re.axis||se[0]||se[1]?"all":"none";"x"===re.axis||se[0]||V(ae,ne[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:he,dur:ue}),"y"===re.axis||se[1]||V(ae,ne[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:he,dur:ue})},ae[0]._focusTimer))})},P=function(){var ae=ne(this).data(le),ie=le+"_"+ae.idx,re=ne("#mCSB_"+ae.idx+"_container").parent();re.bind("scroll."+ie,function(ie){(0!==re.scrollTop()||0!==re.scrollLeft())&&ne(".mCSB_"+ae.idx+"_scrollbar").css("visibility","hidden")})},H=function(){var ae=ne(this),ie=ae.data(le),re=ie.opt,se=ie.sequential,ce=le+"_"+ie.idx,de=".mCSB_"+ie.idx+"_scrollbar";ne(de+">a").bind("mousedown."+ce+" touchstart."+ce+" pointerdown."+ce+" MSPointerDown."+ce+" mouseup."+ce+" touchend."+ce+" pointerup."+ce+" MSPointerUp."+ce+" mouseout."+ce+" pointerout."+ce+" MSPointerOut."+ce+" click."+ce,function(le){function r(ne,ie){se.scrollAmount=re.scrollButtons.scrollAmount,F(ae,ne,ie)}if(le.preventDefault(),Z(le)){var ce=ne(this).attr("class");switch(se.type=re.scrollButtons.scrollType,le.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===se.type)return;he=!0,ie.tweenRunning=!1,r("on",ce);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===se.type)return;he=!1,se.dir&&r("off",ce);break;case"click":if("stepped"!==se.type||ie.tweenRunning)return;r("on",ce)}}})},U=function(){function t(le){function a(ne,le){se.type=re.keyboard.scrollType,se.scrollAmount=re.keyboard.scrollAmount,"stepped"===se.type&&ie.tweenRunning||F(ae,ne,le)}switch(le.type){case"blur":ie.tweenRunning&&se.dir&&a("off",null);break;case"keydown":case"keyup":var ce=le.keyCode?le.keyCode:le.which,de="on";if("x"!==re.axis&&(38===ce||40===ce)||"y"!==re.axis&&(37===ce||39===ce)){if((38===ce||40===ce)&&!ie.overflowed[0]||(37===ce||39===ce)&&!ie.overflowed[1])return;"keyup"===le.type&&(de="off"),ne(document.activeElement).is(fe)||(le.preventDefault(),le.stopImmediatePropagation(),a(de,ce))}else if(33===ce||34===ce){if((ie.overflowed[0]||ie.overflowed[1])&&(le.preventDefault(),le.stopImmediatePropagation()),"keyup"===le.type){N(ae);var me=34===ce?-1:1;if("x"===re.axis||"yx"===re.axis&&ie.overflowed[1]&&!ie.overflowed[0])var pe="x",ge=Math.abs(ue[0].offsetLeft)-.9*me*he.width();else pe="y",ge=Math.abs(ue[0].offsetTop)-.9*me*he.height();V(ae,ge.toString(),{dir:pe,scrollEasing:"mcsEaseInOut"})}}else 35!==ce&&36!==ce||ne(document.activeElement).is(fe)||((ie.overflowed[0]||ie.overflowed[1])&&(le.preventDefault(),le.stopImmediatePropagation()),"keyup"!==le.type)||("x"===re.axis||"yx"===re.axis&&ie.overflowed[1]&&!ie.overflowed[0]?(pe="x",ge=35===ce?Math.abs(he.width()-ue.outerWidth(!1)):0):(pe="y",ge=35===ce?Math.abs(he.height()-ue.outerHeight(!1)):0),V(ae,ge.toString(),{dir:pe,scrollEasing:"mcsEaseInOut"}))}}var ae=ne(this),ie=ae.data(le),re=ie.opt,se=ie.sequential,ce=le+"_"+ie.idx,de=ne("#mCSB_"+ie.idx),ue=ne("#mCSB_"+ie.idx+"_container"),he=ue.parent(),fe="input,textarea,select,datalist,keygen,[contenteditable='true']",me=ue.find("iframe"),pe=["blur."+ce+" keydown."+ce+" keyup."+ce];me.length&&me.each(function(){ne(this).load(function(){W(this)&&ne(this.contentDocument||this.contentWindow.document).bind(pe[0],function(ne){t(ne)})})}),de.attr("tabindex","0").bind(pe[0],function(ne){t(ne)})},F=function(ae,ie,re,se,ce){function l(ne){ue.snapAmount&&(he.scrollAmount=ue.snapAmount instanceof Array?"x"===he.dir[0]?ue.snapAmount[1]:ue.snapAmount[0]:ue.snapAmount);var ie="stepped"!==he.type,le=ce||(ne?ie?ge/1.5:ve:1e3/60),re=ne?ie?7.5:40:2.5,fe=[Math.abs(me[0].offsetTop),Math.abs(me[0].offsetLeft)],pe=[de.scrollRatio.y>10?10:de.scrollRatio.y,de.scrollRatio.x>10?10:de.scrollRatio.x],xe="x"===he.dir[0]?fe[1]+he.dir[1]*pe[1]*re:fe[0]+he.dir[1]*pe[0]*re,we="x"===he.dir[0]?fe[1]+he.dir[1]*parseInt(he.scrollAmount):fe[0]+he.dir[1]*parseInt(he.scrollAmount),_e="auto"!==he.scrollAmount?we:xe,Se=se||(ne?ie?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),be=!!ne;return ne&&17>le&&(_e="x"===he.dir[0]?fe[1]:fe[0]),V(ae,_e.toString(),{dir:he.dir[0],scrollEasing:Se,dur:le,onComplete:be}),ne?void(he.dir=!1):(clearTimeout(he.step),void(he.step=setTimeout(function(){l()},le)))}function s(){clearTimeout(he.step),K(he,"step"),N(ae)}var de=ae.data(le),ue=de.opt,he=de.sequential,me=ne("#mCSB_"+de.idx+"_container"),pe="stepped"===he.type,ge=ue.scrollInertia<26?26:ue.scrollInertia,ve=ue.scrollInertia<1?17:ue.scrollInertia;switch(ie){case"on":if(he.dir=[re===fe[16]||re===fe[15]||39===re||37===re?"x":"y",re===fe[13]||re===fe[15]||38===re||37===re?-1:1],N(ae),ee(re)&&"stepped"===he.type)return;l(pe);break;case"off":s(),(pe||de.tweenRunning&&he.dir)&&l(!0)}},q=function(ae){var ie=ne(this).data(le).opt,re=[];return"function"==typeof ae&&(ae=ae()),ae instanceof Array?re=ae.length>1?[ae[0],ae[1]]:"x"===ie.axis?[null,ae[0]]:[ae[0],null]:(re[0]=ae.y?ae.y:ae.x||"x"===ie.axis?null:ae,re[1]=ae.x?ae.x:ae.y||"y"===ie.axis?null:ae),"function"==typeof re[0]&&(re[0]=re[0]()),"function"==typeof re[1]&&(re[1]=re[1]()),re},Y=function(ae,ie){if(null!=ae&&void 0!==ae){var re=ne(this),se=re.data(le),ce=se.opt,de=ne("#mCSB_"+se.idx+"_container"),ue=de.parent(),he=typeof ae;ie||(ie="x"===ce.axis?"x":"y");var fe="x"===ie?de.outerWidth(!1):de.outerHeight(!1),pe="x"===ie?de[0].offsetLeft:de[0].offsetTop,ge="x"===ie?"left":"top";switch(he){case"function":return ae();case"object":if(!(xe=ae.jquery?ae:ne(ae)).length)return;return"x"===ie?te(xe)[1]:te(xe)[0];case"string":case"number":if(ee(ae))return Math.abs(ae);if(-1!==ae.indexOf("%"))return Math.abs(fe*parseInt(ae)/100);if(-1!==ae.indexOf("-="))return Math.abs(pe-parseInt(ae.split("-=")[1]));if(-1!==ae.indexOf("+=")){var ve=pe+parseInt(ae.split("+=")[1]);return ve>=0?0:Math.abs(ve)}if(-1!==ae.indexOf("px")&&ee(ae.split("px")[0]))return Math.abs(ae.split("px")[0]);if("top"===ae||"left"===ae)return 0;if("bottom"===ae)return Math.abs(ue.height()-de.outerHeight(!1));if("right"===ae)return Math.abs(ue.width()-de.outerWidth(!1));if("first"===ae||"last"===ae){var xe=de.find(":"+ae);return"x"===ie?te(xe)[1]:te(xe)[0]}return ne(ae).length?"x"===ie?te(ne(ae))[1]:te(ne(ae))[0]:(de.css(ge,ae),void me.update.call(null,re[0]))}}},X=function(ae){function o(){return clearTimeout(ce[0].autoUpdate),0===ie.parents("html").length?void(ie=null):void(ce[0].autoUpdate=setTimeout(function(){return se.advanced.updateOnSelectorChange&&(re.poll.change.n=i(),re.poll.change.n!==re.poll.change.o)?(re.poll.change.o=re.poll.change.n,void r(3)):se.advanced.updateOnContentResize&&(re.poll.size.n=ie[0].scrollHeight+ie[0].scrollWidth+ce[0].offsetHeight+ie[0].offsetHeight+ie[0].offsetWidth,re.poll.size.n!==re.poll.size.o)?(re.poll.size.o=re.poll.size.n,void r(1)):!se.advanced.updateOnImageLoad||"auto"===se.advanced.updateOnImageLoad&&"y"===se.axis||(re.poll.img.n=ce.find("img").length,re.poll.img.n===re.poll.img.o)?void((se.advanced.updateOnSelectorChange||se.advanced.updateOnContentResize||se.advanced.updateOnImageLoad)&&o()):(re.poll.img.o=re.poll.img.n,void ce.find("img").each(function(){n(this)}))},se.advanced.autoUpdateTimeout))}function n(ae){function o(ne,ae){return function(){return ae.apply(ne,arguments)}}function a(){this.onload=null,ne(ae).addClass(fe[2]),r(2)}if(ne(ae).hasClass(fe[2]))r();else{var ie=new Image;ie.onload=o(ie,a),ie.src=ae.src}}function i(){!0===se.advanced.updateOnSelectorChange&&(se.advanced.updateOnSelectorChange="*");var ne=0,ae=ce.find(se.advanced.updateOnSelectorChange);return se.advanced.updateOnSelectorChange&&ae.length>0&&ae.each(function(){ne+=this.offsetHeight+this.offsetWidth}),ne}function r(ne){clearTimeout(ce[0].autoUpdate),me.update.call(null,ie[0],ne)}var ie=ne(this),re=ie.data(le),se=re.opt,ce=ne("#mCSB_"+re.idx+"_container");return ae?(clearTimeout(ce[0].autoUpdate),void K(ce[0],"autoUpdate")):void o()},j=function(ne,ae,ie){return Math.round(ne/ae)*ae-ie},N=function(ae){var ie=ae.data(le);ne("#mCSB_"+ie.idx+"_container,#mCSB_"+ie.idx+"_container_wrapper,#mCSB_"+ie.idx+"_dragger_vertical,#mCSB_"+ie.idx+"_dragger_horizontal").each(function(){J.call(this)})},V=function(ae,ie,re){function i(ne){return se&&ce.callbacks[ne]&&"function"==typeof ce.callbacks[ne]}function r(){return[ce.callbacks.alwaysTriggerOffsets||_e>=Se[0]+Ce,ce.callbacks.alwaysTriggerOffsets||-ye>=_e]}function l(){var ne=[fe[0].offsetTop,fe[0].offsetLeft],ie=[xe[0].offsetTop,xe[0].offsetLeft],le=[fe.outerHeight(!1),fe.outerWidth(!1)],se=[he.height(),he.width()];ae[0].mcs={content:fe,top:ne[0],left:ne[1],draggerTop:ie[0],draggerLeft:ie[1],topPct:Math.round(100*Math.abs(ne[0])/(Math.abs(le[0])-se[0])),leftPct:Math.round(100*Math.abs(ne[1])/(Math.abs(le[1])-se[1])),direction:re.dir}}var se=ae.data(le),ce=se.opt,de={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:ce.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},ue=[(re=ne.extend(de,re)).dur,re.drag?0:re.dur],he=ne("#mCSB_"+se.idx),fe=ne("#mCSB_"+se.idx+"_container"),me=fe.parent(),pe=ce.callbacks.onTotalScrollOffset?q.call(ae,ce.callbacks.onTotalScrollOffset):[0,0],ge=ce.callbacks.onTotalScrollBackOffset?q.call(ae,ce.callbacks.onTotalScrollBackOffset):[0,0];if(se.trigger=re.trigger,(0!==me.scrollTop()||0!==me.scrollLeft())&&(ne(".mCSB_"+se.idx+"_scrollbar").css("visibility","visible"),me.scrollTop(0).scrollLeft(0)),"_resetY"!==ie||se.contentReset.y||(i("onOverflowYNone")&&ce.callbacks.onOverflowYNone.call(ae[0]),se.contentReset.y=1),"_resetX"!==ie||se.contentReset.x||(i("onOverflowXNone")&&ce.callbacks.onOverflowXNone.call(ae[0]),se.contentReset.x=1),"_resetY"!==ie&&"_resetX"!==ie){if(!se.contentReset.y&&ae[0].mcs||!se.overflowed[0]||(i("onOverflowY")&&ce.callbacks.onOverflowY.call(ae[0]),se.contentReset.x=null),!se.contentReset.x&&ae[0].mcs||!se.overflowed[1]||(i("onOverflowX")&&ce.callbacks.onOverflowX.call(ae[0]),se.contentReset.x=null),ce.snapAmount){var ve=ce.snapAmount instanceof Array?"x"===re.dir?ce.snapAmount[1]:ce.snapAmount[0]:ce.snapAmount;ie=j(ie,ve,ce.snapOffset)}switch(re.dir){case"x":var xe=ne("#mCSB_"+se.idx+"_dragger_horizontal"),we="left",_e=fe[0].offsetLeft,Se=[he.width()-fe.outerWidth(!1),xe.parent().width()-xe.width()],be=[ie,0===ie?0:ie/se.scrollRatio.x],Ce=pe[1],ye=ge[1],Be=Ce>0?Ce/se.scrollRatio.x:0,Te=ye>0?ye/se.scrollRatio.x:0;break;case"y":xe=ne("#mCSB_"+se.idx+"_dragger_vertical"),we="top",_e=fe[0].offsetTop,Se=[he.height()-fe.outerHeight(!1),xe.parent().height()-xe.height()],be=[ie,0===ie?0:ie/se.scrollRatio.y],Ce=pe[0],ye=ge[0],Be=Ce>0?Ce/se.scrollRatio.y:0,Te=ye>0?ye/se.scrollRatio.y:0}be[1]<0||0===be[0]&&0===be[1]?be=[0,0]:be[1]>=Se[1]?be=[Se[0],Se[1]]:be[0]=-be[0],ae[0].mcs||(l(),i("onInit")&&ce.callbacks.onInit.call(ae[0])),clearTimeout(fe[0].onCompleteTimeout),Q(xe[0],we,Math.round(be[1]),ue[1],re.scrollEasing),(se.tweenRunning||!(0===_e&&be[0]>=0||_e===Se[0]&&be[0]<=Se[0]))&&Q(fe[0],we,Math.round(be[0]),ue[0],re.scrollEasing,re.overwrite,{onStart:function(){re.callbacks&&re.onStart&&!se.tweenRunning&&(i("onScrollStart")&&(l(),ce.callbacks.onScrollStart.call(ae[0])),se.tweenRunning=!0,C(xe),se.cbOffsets=r())},onUpdate:function(){re.callbacks&&re.onUpdate&&i("whileScrolling")&&(l(),ce.callbacks.whileScrolling.call(ae[0]))},onComplete:function(){if(re.callbacks&&re.onComplete){"yx"===ce.axis&&clearTimeout(fe[0].onCompleteTimeout);var ne=fe[0].idleTimer||0;fe[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),ce.callbacks.onScroll.call(ae[0])),i("onTotalScroll")&&be[1]>=Se[1]-Be&&se.cbOffsets[0]&&(l(),ce.callbacks.onTotalScroll.call(ae[0])),i("onTotalScrollBack")&&be[1]<=Te&&se.cbOffsets[1]&&(l(),ce.callbacks.onTotalScrollBack.call(ae[0])),se.tweenRunning=!1,fe[0].idleTimer=0,C(xe,"hide")},ne)}}})}},Q=function(ne,ae,ie,le,re,se,ce){function l(){we.stop||(ge||he.call(),ge=G()-pe,s(),ge>=we.time&&(we.time=ge>we.time?ge+de-(ge-we.time):ge+de-1,we.time<ge+1&&(we.time=ge+1)),we.time<le?we.id=ue(l):me.call())}function s(){le>0?(we.currVal=u(we.time,ve,_e,le,re),xe[ae]=Math.round(we.currVal)+"px"):xe[ae]=ie+"px",fe.call()}function c(){de=1e3/60,we.time=ge+de,ue=window.requestAnimationFrame?window.requestAnimationFrame:function(ne){return s(),setTimeout(ne,.01)},we.id=ue(l)}function d(){null!=we.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(we.id):clearTimeout(we.id),we.id=null)}function u(ne,ae,ie,le,re){switch(re){case"linear":case"mcsLinear":return ie*ne/le+ae;case"mcsLinearOut":return ne/=le,ne--,ie*Math.sqrt(1-ne*ne)+ae;case"easeInOutSmooth":return 1>(ne/=le/2)?ie/2*ne*ne+ae:-ie/2*(--ne*(ne-2)-1)+ae;case"easeInOutStrong":return 1>(ne/=le/2)?ie/2*Math.pow(2,10*(ne-1))+ae:(ne--,ie/2*(2-Math.pow(2,-10*ne))+ae);case"easeInOut":case"mcsEaseInOut":return 1>(ne/=le/2)?ie/2*ne*ne*ne+ae:ie/2*((ne-=2)*ne*ne+2)+ae;case"easeOutSmooth":return ne/=le,-ie*(--ne*ne*ne*ne-1)+ae;case"easeOutStrong":return ie*(1-Math.pow(2,-10*ne/le))+ae;default:var se=(ne/=le)*ne,ce=se*ne;return ae+ie*(.499999999999997*ce*se+-2.5*se*se+5.5*ce+-6.5*se+4*ne)}}ne._mTween||(ne._mTween={top:{},left:{}});var de,ue,he=(ce=ce||{}).onStart||function(){},fe=ce.onUpdate||function(){},me=ce.onComplete||function(){},pe=G(),ge=0,ve=ne.offsetTop,xe=ne.style,we=ne._mTween[ae];"left"===ae&&(ve=ne.offsetLeft);var _e=ie-ve;we.stop=0,"none"!==se&&d(),c()},G=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},J=function(){var ne=this;ne._mTween||(ne._mTween={top:{},left:{}});for(var ae=["top","left"],ie=0;ie<ae.length;ie++){var le=ae[ie];ne._mTween[le].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(ne._mTween[le].id):clearTimeout(ne._mTween[le].id),ne._mTween[le].id=null,ne._mTween[le].stop=1)}},K=function(ne,ae){try{delete ne[ae]}catch(ie){ne[ae]=null}},Z=function(ne){return!(ne.which&&1!==ne.which)},$=function(ne){var ae=ne.originalEvent.pointerType;return!(ae&&"touch"!==ae&&2!==ae)},ee=function(ne){return!isNaN(parseFloat(ne))&&isFinite(ne)},te=function(ne){var ae=ne.parents(".mCSB_container");return[ne.offset().top-ae.offset().top,ne.offset().left-ae.offset().left]},oe=function(){function e(){var ne=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var ae=0;ae<ne.length;ae++)if(ne[ae]+"Hidden"in document)return ne[ae]+"Hidden";return null}var ne=e();return!!ne&&document[ne]};ne.fn[ie]=function(ae){return me[ae]?me[ae].apply(this,Array.prototype.slice.call(arguments,1
47)):"object"!=typeof ae&&ae?void ne.error("Method "+ae+" does not exist"):me.init.apply(this,arguments)},ne[ie]=function(ae){return me[ae]?me[ae].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof ae&&ae?void ne.error("Method "+ae+" does not exist"):me.init.apply(this,arguments)},ne[ie].defaults=se,window[ie]=!0,ne(window).load(function(){ne(re)[ie](),ne.extend(ne.expr[":"],{mcsInView:ne.expr[":"].mcsInView||function(ae){var ie,le,re=ne(ae),se=re.parents(".mCSB_container");if(se.length)return ie=se.parent(),(le=[se[0].offsetTop,se[0].offsetLeft])[0]+te(re)[0]>=0&&le[0]+te(re)[0]<ie.height()-re.outerHeight(!1)&&le[1]+te(re)[1]>=0&&le[1]+te(re)[1]<ie.width()-re.outerWidth(!1)},mcsOverflow:ne.expr[":"].mcsOverflow||function(ae){var ie=ne(ae).data(le);if(ie)return ie.overflowed[0]||ie.overflowed[1]}})})}()});
48var addDOMLoadEvent=function(){var e,t,n,a,r=[],G=function(){for(t=!0,clearInterval(e);n=r.shift();)n()};return function(n){if(t)return n();r[0]||(document.addEventListener&&document.addEventListener("DOMContentLoaded",G,!1),/WebKit/i.test(navigator.userAgent)&&(e=setInterval(function(){/loaded|complete/.test(document.readyState)&&G()},10)),a=window.onload,window.onload=function(){G(),a&&a()}),r.push(n)}}(),Base=function(){};function addEvent(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else{n.$$guid||(n.$$guid=addEvent.guid++),e.events||(e.events={});var a=e.events[t];a||(a=e.events[t]={},e["on"+t]&&(a[0]=e["on"+t])),a[n.$$guid]=n,e["on"+t]=handleEvent}}function removeEvent(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.events&&e.events[t]&&delete e.events[t][n.$$guid]}function handleEvent(e){var t=!0;e=e||fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);var n=this.events[e.type];for(var a in n)this.$$handleEvent=n[a],!1===this.$$handleEvent(e)&&(t=!1);return t}function fixEvent(e){return e.preventDefault=fixEvent.preventDefault,e.stopPropagation=fixEvent.stopPropagation,e}Base.extend=function(e,t){var n=Base.prototype.extend;Base._prototyping=!0;var a=new this;n.call(a,e),delete Base._prototyping;var r=a.constructor,i=a.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==i)this._constructing=!0,r.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||n).call(arguments[0],a)};
48return i.ancestor=this,i.extend=this.extend,i.forEach=this.forEach,i.implement=this.implement,i.prototype=a,i.toString=this.toString,i.valueOf=function(e){return"object"==e?i:r.valueOf()},n.call(i,t),"function"==typeof i.init&&i.init(),i},Base.prototype={extend:function(e,t){if(arguments.length>1){var n=this[e];if(n&&"function"==typeof t&&(!n.valueOf||n.valueOf()!=t.valueOf())&&/\bbase\b/.test(t)){var a=t.valueOf();t=function(){var e=this.base||Base.prototype.base;this.base=n;var t=a.apply(this,arguments);return this.base=e,t},t.valueOf=function(e){return"object"==e?t:a},t.toString=Base.toString}this[e]=t}else if(e){var r=Base.prototype.extend;Base._prototyping||"function"==typeof this||(r=this.extend||r);for(var i={toSource:null},s=["constructor","toString","valueOf"],o=Base._prototyping?0:1;l=s[o++];)e[l]!=i[l]&&r.call(this,l,e[l]);for(var l in e)i[l]||r.call(this,l,e[l])}return this},base:function(){}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(e,t,n){for(var a in e)void 0===this.prototype[a]&&t.call(n,e[a],a,e)},implement:function(){for(var e=0;e<arguments.length;e++)"function"==typeof arguments[e]?arguments[e](this.prototype):this.prototype.extend(arguments[e]);return this},toString:function(){return String(this.valueOf())}}),addEvent.guid=1,fixEvent.preventDefault=function(){this.returnValue=!1},fixEvent.stopPropagation=function(){this.cancelBubble=!0},"undefined"!=typeof v2&&null!==v2||(v2={}),v2.empty=function empty(e){return null==e||""===e},v2.array=function array(e){var t=[];if(e&&"function"==typeof e.item){for(var n=0;n<e.length;n++)t[n]=e[n];e=t}return v2.empty(e)?[]:void 0===e.shift?[e]:e},v2.Object={extend:function(e,t,n){for(var a in n=void 0!==n&&n,t)n&&void 0!==e[a]||t.hasOwnProperty(a)&&void 0!==t[a]&&(e[a]=t[a]);return e}},v2.Object.extend(String.prototype,{strip:function(){return this.replace(/^\s+|\s+$/,"")}}),v2.Object.extend(Array.prototype,{indexOf:function(e,t){for(var n=0;n<this.length;n++)if(this[n]===e)return n;return-1}}),v2.$=function(e,t){if("string"==typeof e&&(e=document.getElementById(e)),t=void 0===t||t,null===e||void 0!==e.hide||!t)return e;for(var n in v2.Element)v2.Element.hasOwnProperty(n)&&function(){var t=n,a={};a[t]=function(){for(var n=[e],a=0;a<arguments.length;a++)n.push(arguments[a]);return v2.Element[t].apply(v2.Element,n)},v2.Object.extend(e,a,!0)}();return e},v2.$$=function $$(e,t){if(t=t||document,document.querySelectorAll)return v2.$$=function(e,t){return(t||document).querySelectorAll(e)},v2.$$(e,t);var n,a,r,i,s,o,l,u,d,c,v,h,m=e.split(","),f=[];for(n=0;e=m[n];n++){for(i=e.strip().split(/[^a-zA-Z]/)[0]||"*",s=e.replace(/^\./,"_.").split(/\./),d=[],c=[],a=1;a<s.length;a++)d.push(s[a].split(/[^a-zA-Z\-_]/)[0]);for(s=e.replace("][","].[").split(/[\[\]]/),a=0;a<s.length-1;a+=2)(o=s[a+1].split("="))[1]=o[1]||!0,c.push(o);l=t.getElementsByTagName(i);e:for(a=0;u=l[a];a++){for(r=0;r<d.length;r++)if(!v2.Element.hasClassName(u,d[r]))continue e;for(r=0;r<c.length;r++)if(v=c[r][0],h=c[r][1],u.hasAttribute){if(!u.hasAttribute(v)||!0!==h&&u.getAttribute(v)!==h)continue e}else if(void 0===u[v="for"===v?"htmlFor":v]||!0!==h&&u[v]!==h)continue e;f.indexOf(u)<0&&f.push(u)}}return f},v2.Element={observe:function(e,t,n){addEvent(e,t,n)},computedStyle:function(e,t){var n="";return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,"").getPropertyValue(t):e.currentStyle&&(t=t.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}),n=e.currentStyle[t]),n},visible:function(e){return"none"!=v2.Element.computedStyle(e,"display")&&"hidden"!=v2.Element.computedStyle(e,"visibility")&&(null===e.parentNode||1!=e.parentNode.nodeType||v2.Element.visible(e.parentNode))},hasClassName:function(e,t){return new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},addClassName:function(e,t){return e.className+=v2.Element.hasClassName(e,t)?"":" "+t,e.className=e.className.replace("  "," ").replace(/^\s|\s$/,""),e},removeClassName:function(e,t){var n=new RegExp("(^|\\s)"+t+"(\\s|$)");return e.className=e.className.replace(n," ").replace("  "," ").replace(/^\s|\s$/,""),e},position:function(e){for(var t={x:0,y:0};null!==e;
48)t.x+=e.offsetLeft,t.y+=e.offsetTop,e=e.offsetParent;return t},scrollTo:function(e){var t=v2.Element.position(e);window.scrollTo(t.x,t.y)},previous:function(e){do{e=e.previousSibling}while(e&&1!==e.nodeType);return e}},void 0!==addDOMLoadEvent&&(v2.addDOMLoadEvent=addDOMLoadEvent),v2.CompositeFormItem=Base.extend({type:"generic",constructor:function(){v2.empty(this.__validators)&&(this.__validators=[]),v2.empty(this.__errors)&&(this.__errors=[]),this.__passOnAny=!1,this.__message=null,this.parent=null},add:function(e){this.__validators.push(e),e.parent=this},get:function(e){return v2.empty(e)?this.__validators:this.__validators[e]},validate:function(){this.__errors=[];var e=this.test("validate");return e?(this.__errors=[],this.onSuccess()):this.onFailure(),e},test:function(e){var t,n,a=0;for(e=e||"test",t=0;n=this.__validators[t];t++)n[e]()?a++:this.__errors.push(n);return this.passOnAny()&&a>0||!this.passOnAny()&&a===this.__validators.length},getInvalid:function(){return 0===this.__errors.length?null:this.__errors},setMessage:function(e){this.__message=e},getMessages:function(){if(!v2.empty(this.__message))return[this.__message];var e,t,n=[];for(e=0;t=this.__errors[e];e++)n=n.concat(t.getMessages());return n},passOnAny:function(e){return void 0!==e&&(this.__passOnAny=!!e),this.__passOnAny},onSuccess:function(){},onFailure:function(){}}),v2.InputElement=Base.extend({constructor:function(e,t){this.__name=null,this.__events=v2.empty(t)?["blur"]:v2.array(t),this.__elements=v2.array(e)},monitor:function(e){var t,n,a,r;for(this.__monitored=!0,t=0;a=this.__elements[t];t++)for(n=0;r=this.__events[n];n++)v2.Element.observe(a,r,e)},getValue:function(){return this.__elements[0].value},getLabel:function(){var e=this.__elements[0],t=v2.$$("label[for="+(e.id||e.name)+"]",e.form);return t&&t[0]},getName:function(){if(this.__name)return this.__name;var e=this.getLabel();if(e)return""!==e.title?e.title:e.innerHTML;var t=this.__elements[0];return t.id||t.name},setName:function(e){return this.__name=e||null,this},getParent:function(){return this.__elements[0].parentNode},getElements:function(){return this.__elements},visible:function(){if(!v2.$(this.getParent()).visible())return!1;for(var e,t=0;e=this.__elements[t];t++)if(v2.Element.visible(e))return!0;return!1}},{__fields:{},get:function(e){if(e&&e.constructor===v2.InputElement)return e;var t,n,a,r,i,s=v2.$(e);if(s||(s=(a=v2.$$("input$, select$, textarea$".replace(/\$/g,"[name="+e+"]")))[0]),!s)throw new TypeError(e+" does not resolve to an HTML element!");
48return t=s.name||s.id,(n=v2.InputElement.__fields[t])?n:(s.options?n=new v2.SelectElement(s):"textarea"===s.tagName.toLowerCase()?n=new v2.TextareaElement(s):s.type&&"radio"==s.type?(a=v2.$$("input[type=radio][name="+s.name+"]",s.form),n=new v2.RadioElement(a)):s.type&&"checkbox"==s.type?(r=s.className,a=(i=/\bg_([^\s]*)\b/).test(r)?v2.$$("input[type=checkbox].g_"+r.match(i)[1],s.form):[s],n=new v2.CheckboxElement(a)):n=new v2.InputElement(s),v2.InputElement.__fields[t]=n)}}),v2.$f=v2.InputElement.get,v2.RadioElement=v2.InputElement.extend({constructor:function(e){this.base(e,["click","change"])},getValue:function(){for(var e,t=0;e=this.__elements[t];t++)if(e.checked)return e.value;return null},getLabel:function(){var e=this.__elements[0].parentNode;return"li"===e.tagName.toLowerCase()?v2.$(e.parentNode).previous():v2.$(this.__elements[0]).previous()||this.base()},getParent:function(){var e=this.__elements[0].parentNode;return"li"===e.tagName.toLowerCase()?e.parentNode.parentNode:e}}),v2.SelectElement=v2.InputElement.extend({constructor:function(e){this.base([e],"change")},getValue:function(){var e=this.__elements[0];if(!e.multiple)return e.options[e.selectedIndex].value;for(var t,n=[],a=0;t=e.options[a];a++)t.selected&&n.push(t.value);return n}}),v2.TextareaElement=v2.InputElement.extend({}),v2.CheckboxElement=v2.RadioElement.extend({getValue:function(){var e,t,n=[];for(e=0;t=this.__elements[e];e++)t.checked&&n.push(t.value);return n}}),v2.Message=Base.extend({constructor:function(e,t,n){this.message=e,this.params=t||[],this.values=n||[]},copy:function(){return new v2.Message(this.message,this.params,this.values)},toString:function(){for(var e=this.message+"",t=0,n=null;n=this.params[t];t++)e=e.replace("${"+n+"}",this.values[t]);return e}}),v2.Validator=Base.extend({constructor:function(e,t,n,a,r){this.__name=e,this.__test=t,this.__message=new v2.Message(n||"${field} does not pass "+e+" validator",a),this.__aliases=v2.array(r),this.acceptEmpty=!0},test:function(e,t,n){n=void 0!==n&&n;var a=e.getValue(),r=this.acceptEmpty&&""===a||this.__test(e,a,t);return r&&!n||!r&&n},getName:function(){return this.__name},getMessage:function(){return this.__message},setMessage:function(e){this.__message.message=e}},{validators:{},add:function(e){if(!e.name||!e.fn)throw new TypeError("Options object should contain name and fn");e=v2.Object.extend({params:[],aliases:[],acceptEmpty:!0},e,!1);var t=v2.array(e.params),n=new v2.Validator(e.name,e.fn,e.message,t,e.aliases);n.acceptEmpty=e.acceptEmpty;for(var a,r=v2.array(e.aliases).concat([e.name]),i=0;a=r[i];i++)v2.Validator.validators[a]=n;return n},reg:function(e,t,n,a,r,i){return v2.Validator.add({name:e,fn:t,message:a,params:n,aliases:r,acceptEmpty:i})},get:function(e){var t;return e.constructor===v2.Validator?e:(t=v2.Validator.validators[e])?t:null}}),v2.$v=function(e){return v2.Validator.get(e)},v2.$msg=function(){if(2===arguments.length)return v2.Validator.get(arguments[0]).setMessage(arguments[1]);for(var e in arguments[0])try{v2.Validator.get(e).setMessage(arguments[0][e])}catch(e){}},v2.Field=v2.CompositeFormItem.extend({validateHidden:!1,instant:!1,instantWhenValidated:!0,type:"field",constructor:function(e,t,n){this.base(),this.__monitored=!1,this.element=v2.$f(e),this.instant=void 0!==t?t:this.instant,this.instantWhenValidated=void 0!==n?n:this.instantWhenValidated,this.__monitor(this.instant)},test:function(){return!this.validateHidden&&!this.element.visible()||this.base()},validate:function(){return this.__monitor(this.instantWhenValidated&&!this.__monitored),this.base()},addValidator:function(e,t,n){var a=v2.$v(e);if(null===a)throw new Error(e+" is not a valid validator");null!=n&&(n=new v2.Message(n,a.getMessage().params));var r=new v2.FieldValidator(this.element,a,v2.array(t),n);return this.add(r),r},getParent:function(){return this.element.getParent()},__monitor:function(e){if(e&&!this.__monitored){this.__monitored=!0;var t=(this.parent&&"fieldset"===this.parent.type?this.parent:this).validate.bind(this);this.element.monitor(function(e){t(e)})}}}),v2.Fieldset=v2.CompositeFormItem.extend({type:"fieldset",constructor:function(e){this.base(),this.element=e},getParent:function(){return this.element}}),v2.FieldValidator=Base.extend({invert:!1,constructor:function(e,t,n,a){this.__field=e,this.__validator=t,this.__params=v2.array(n),this.__message=a||t.__message.copy();var r=this.__message.params;(r.length<1||"field"!==r[0])&&(this.__message.params=["field"].concat(r)),this.__message.values=[this.__field.getName()].concat(this.__params)},test:function(){return this.__validator.test(this.__field,this.__params,this.invert)},validate:function(){return this.test()},getInvalid:function(){return this.test()?null:this},setMessage:function(e){this.__message.message=e},getMessages:function(){return[this.__message.toString()]},add:function(){},remove:function(){},get:function(){},passOnAny:function(){},onSuccess:function(){},onFailure:function(){}}),v2.Form=v2.CompositeFormItem.extend({type:"form",constructor:function(e){this.base(),this.__form=v2.$(e),this.__form.observe("submit",this.validate.bind(this)),this.__buttons=[],this.__activeButton=null},addButton:function(e){this.__buttons.push(e),v2.Element.observe(e,"click",function(t){this.__activeButton=e}.bind(this))},validate:function(){var e=arguments.length>0?arguments[0]:null,t=this.__buttons,n=this.__activeButton;if(this.__activeButton=null,t.length>0&&t.indexOf(n)<0)return!0;var a=this.base();return!a&&e&&(e.preventDefault(),e.returnValue=!1),a}},{forms:{},get:function(e){var t,n=v2.$(e);if(null===n||"form"!==n.tagName.toLowerCase())throw new ArgumentError("idOrElement should represent a form element");return v2.empty(t=v2.Form.forms[n.id])?v2.Form.forms[n.id]=new v2.Form(n):t}}),function(){var e=v2.Validator;e.reg("alpha",function(e,t,n){return/^[a-zA-Z\u00A1-\uFFFF]*$/.test(t)}),e.reg("alphanum",function(e,t,n){return/^([a-zA-Z\u00A1-\uFFFF0-9])*$/.test(t)}),e.reg("pan",function(e,t,n){return/^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/.test(t)}),e.reg("confirmation-of",function(e,t,n){return t===v2.$f(n[0]).getValue()},"field-id","${field} should be an exact match",null,!1),e.reg("email",function(e,t,n){return/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(t)}),e.reg("email2",function(e,t,n){return/^[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9+\/_-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(t)},"max"),e.reg("max-length",function(e,t,n){return t.length<=n[0]},"max"),e.reg("max-val",function(e,t,n){return t<=n[0]},"max"),e.reg("min-length",function(e,t,n){return t.length>=n[0]},"min"),e.reg("min-val",function(e,t,n){return t>=n[0]},"min"),e.reg("numeric",function(e,t,n){return/^[0-9]*(\.[0-9]+)?$/.test(t)}),e.reg("required",function(e,t,n){return!(v2.empty(t)||void 0!==t.length&&0===t.length)},null,null,"not-empty",!1),e.reg("url",function(e,t,n){return/^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(t)}),e.reg("word",function(e,t,n){return/^([a-zA-Z\u00A1-\uFFFF_\-\s\t'])*$/.test(t)}),e.reg("address",function(e,t,n){return/^([a-zA-Z\u00A1-\uFFFF_\.\-\s\t\d])*$/.test(t)}),e.reg("multiple-of",function(e,t,n){return+t%n[0]==0}),e.reg("min-value",function(e,t,n){return+t>=n[0]},"min"),e.reg("max-value",function(e,t,n){return+t<=n[0]},"max"),e.reg("pincode",function(e,t,n){return/^([123456789]{1})([0-9]{5})$/.test(t)}),e.reg("zipcode",function(e,t,n){return/^[0-9a-zA-Z]+$/.test(t)}),e.reg("pan-number",function(e,t,n){return/^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/.test(t)}),e.reg("gst",function(e,t,n){return/^[0-9]{2}[0-9A-Z]{2}[A-Z]{3}[0-9]{4}[0-9A-Z]{4}$/.test(t)}),e.reg("alphanumSpaceAllChar",function(e,t,n){return/^[A-Za-z0-9\r?\n -~]*$/.test(t)}),e.reg("alphanumWithSpace",function(e,t,n){return/^[a-zA-Z0-9\s]+$/.test(t)}),e.reg("alphaWithSpace",function(e,t,n){return/^[a-zA-Z\s]+$/.test(t)}),e.reg("no-zero",function(e,t,n){return 0!=t.charAt(0)}),e.reg("max-date",function(e,t,n){return t<=n[0]}),e.reg("gms-planid",function(e,t,n){return/^([a-zA-Z]){5}(-[bB])([0-9]){2}([a-zA-Z0-9]){5}?$/.test(t)}),e.reg("ifsc-code",function(e,t,n){return/^[A-Za-z]{4}[a-zA-Z0-9]{7}$/.test(t)}),e.reg("password",function(e,t,n){return/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/.test(t)}),e.reg("mobile-char",function(e,t,n){return t=t.replace(/\s/g,""),/^\+/.test(t=!1)?(t=t.slice(1),valid=!/\D/g.test(t)):valid=!/\D/g.test(t),valid}),e.reg("mobile-number",function(e,t,n){return 12==(t=t.replace(/\s/g,"")).length?"91"==t.slice(0,2):13==t.length?"+91"==t.slice(0,3):11==t.length?"0"==t.charAt(0):10==t.length?"+"!=t.charAt(0)&&"0"!=t.charAt(0):10==t.length}),e.reg("emailOrPhone",function(e,t,n){return/^(((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)|(^[0][1-9]\d{9}$|^[1-9]\d{9}$)$/.test(t)})}(),v2.$msg({alpha:"${field} should only contain letters",alphanum:"${field} should only contain letters and numbers","car-regnum-nor":"${field}
48 should be a valid norwegian auto registration number","confirmation-of":"${field} should be a confirmation of ${field-id}",email:"${field} should be a valid email address","max-length":"${field} should be no more than ${max} characters long","max-val":"${field} should be no bigger than ${min}","min-length":"${field} should be atleast ${min} characters long","min-val":"${field} should be atleast ${min}",numeric:"${field} should only contain numbers","phone-nor":"${field} should be a valid norwegian phone number",required:"${field} is required","ssn-nor":"${field} should be a valid norwegian social security number",url:"${field} should be a valid URL",word:"${field} should only contain letters",address:"${field} should contain a valid address",pan:"Please enter a valid PAN number","multiple-of":"Value should be multiple of 100","min-value":"${field} should be atleast ${min}","max-value":"${field} should not exceed ${max}","pan-number":"Please enter a valid PAN number",gst:"Please enter a valid GST number",alphanumSpaceAllChar:"${field} should only contain numbers & letters",alphanumWithSpace:"${field} should only contain numbers & letters",alphaWithSpace:"${field} should only contain numbers & letters",alphaWithSpace:"${field} should only contain letters","no-zero":"First letter cannot be 0","max-date":"Please pick a valid date","gms-planid":"Please enter a valid Plan ID","ifsc-code":"Please enter a valid ${field}",email2:"Please enter a valid email",password:"Password should match following criteria","mobile-char":"Mobile number should contain only numbers","mobile-number":"Mobile number should be 10 digits"}),v2.ErrorReporting={displayErrors:-1,positionErrorsAbove:!0,failureClass:"error",successClass:"",messagesClass:"messages",onFailure:function(){if(!this.parent||"fieldset"!==this.parent.type){var e,t,n,a=this.onSuccess(),r=[],i=this.getMessages();a.addClassName(this.failureClass),a.removeClassName(this.successClass);var s=this.displayErrors,o=this.__errors.length;if(0!==(s=s<0||s>o?o:s)){var l=document.createElement("ul");for(l.id=this.__getId(),l.className=this.messagesClass,e=0;e<s;e++)!(t=i[e])||r.indexOf(t.toString())>=0||(r.push(t.toString()),(n=document.createElement("li")).innerHTML=t.toString(),l.appendChild(n));this.positionErrorsAbove?a.insertBefore(l,a.firstChild):a.appendChild(l)}}},onSuccess:function(){if(this.parent&&"fieldset"===this.parent.type)return null;var e=v2.$(this.getParent()),t=v2.$(this.__getId());return t&&e===t.parentNode&&e.removeChild(t),e.removeClassName(this.failureClass),e.addClassName(this.successClass),e},__getId:function(){var e=(this.element.getElements?this.element.getElements()[0]:null)||this.getParent(),t=e.className;return((e.id||e.name||t.replace(this.failureClass,""))+"_"+this.failureClass).replace(" ","_").replace(/_+/,"_")}},v2.Object.extend(v2.Field.prototype,v2.ErrorReporting),v2.Object.extend(v2.Fieldset.prototype,v2.ErrorReporting),v2.Object.extend(v2.Form.prototype,{scrollToFirstWhenFail:!0,onFailure:function(){if(this.scrollToFirstWhenFail){var e,t,n,a=this.__form;for(n=a.all||a.getElementsByTagName("*"),e=0;t=n[e];e++)if(v2.Element.hasClassName(t,v2.ErrorReporting.failureClass))return void v2.Element.scrollTo(t)}}}),v2.Object.extend(v2.Validator,{prefix:""}),v2.Object.extend(v2.Form,{autoValidateClass:"validate",actionButtonClass:"action"}),v2.html={validateAnyClass:"validate_any",validateAllClass:"validate_all",validatorsFromString:function(e){var t,n,a,r,i,s=v2.Validator.prefix,o=new RegExp("^"+s,""),l=[];for(e=e.split(" "),t=0;n=e[t];t++)a=!1,(v2.empty(s)||o.test(n))&&(n=n.replace(o,""),/^not_/.test(n)&&(n=n.replace(/^not_/,""),a=!0),(i=(r=n.split("_")).shift())&&(i=v2.$v(i))&&l.push({validator:i,params:r,invert:a}));return l},applyValidators:function(e,t,n){v2.empty(n)||t.setMessage(n);for(var a,r=0;a=e[r];r++)t.addValidator(a.validator,a.params).invert=a.invert;return t}},v2.html.Form=Base.extend({constructor:function(e){this.form=v2.Form.get(e),this.__parsed={},this.parseElement(e,this.form),this.form.passOnAny(v2.$(e).hasClassName(v2.html.validateAnyClass))},parseElement:function(e,t,n){var a,r,i,s,o,l=v2.$$("div, fieldset, input, select, textarea",e);for(this.__parsed[e.id||e.name]=!0,n=n||[],a=0;r=l[a];a++)0===n.length&&(/^\s*$/.test(r.className)||this.__parsed[r.id||r.name])||("input"===(i=r.tagName.toLowerCase())&&v2.Element.hasClassName(r,v2.Form.actionButtonClass)?this.form.addButton(r):"div"!==i&&"fieldset"!==i?(o=n.concat(v2.html.validatorsFromString(r.className))).length>0&&(s=new v2.Field(r),v2.html.applyValidators(o,s,r.title),this.__parsed[r.id||r.name]=!0,t.add(s)):this.parseBlock(r,t))},parseBlock:function(e,t){var n=new v2.Fieldset(e),a=!0;if(v2.$(e),e.hasClassName(v2.html.validateAnyClass));else{if(!e.hasClassName(v2.html.validateAllClass))return;a=!1}n.passOnAny(a);var r=v2.html.validatorsFromString(e.className);this.parseElement(e,n,r),/^\s*$/.test(e.title)||n.setMessage(e.title),n.get(0)&&t.add(n)}}),v2.addDOMLoadEvent(function(){for(var e,t=document.getElementsByTagName("form"),n=0;e=t[n];n++)v2.Element.hasClassName(e,v2.Form.autoValidateClass)&&new v2.html.Form(e)}),v2.dsl={__validateTemplate:function(e){return function(){var t=arguments[0],n=t.element||(t.item?t.item.element:null)||null;if(null===n)for(;t&&!t.element;)t=t.get(0);var a=new v2.dsl.Form(n.getElements()[0].form);a.item.passOnAny(e);for(var r,i=0;r=arguments[i];i++)a.item.add(r.item||r);return a}},__andOr:function(e){return function(){var t=new v2.dsl.Collection;t.item.passOnAny(e);for(var n,a=0;n=arguments[a];a++)t.item.add(n.item);return t}}},v2.dsl.expose=function(){var e=v2.dsl;v2.Object.extend(window,{validate:e.validate,validateAll:e.validateAll,validateAny:e.validateAny,and:e.and,or:e.or},!1)}
48,v2.dsl.validateAll=v2.dsl.validate=v2.dsl.__validateTemplate(!1),v2.dsl.validateAny=v2.dsl.__validateTemplate(!0),v2.dsl.and=v2.dsl.__andOr(!1),v2.dsl.or=v2.dsl.__andOr(!0),v2.Object.extend(String.prototype,{is:function(e,t){return new v2.dsl.Field(this.toString()).addValidator(e,t)}}),function(){var e=String.prototype;e.isA=e.isAn=e.has=e.hasA=e.hasAn=e.is}(),v2.dsl.Field=Base.extend({__currentValidator:null,__and:null,constructor:function(e){this.item=new v2.Field(e)},addValidator:function(e,t,n){if(void 0!==n){if(null!==this.__and&&this.__and!==n)throw new Error("Field previously set up with "+(this.__and?"AND":"OR")+", unable to shift");this.__and=n,this.item.passOnAny(!n)}return this.__currentValidator=this.item.addValidator(e,t),this},and:function(e,t){if(!this.__currentValidator)throw new Error("Cannot add more validators when no validators are added yet");return this.addValidator(e,t,!0)},or:function(e,t){if(this.__currentValidator)throw new Error("Cannot add more validators when no validators are added yet");return this.addValidator(e,t,!1)},explain:function(e){if(!this.__currentValidator)throw new Error("No active field validator");return this.__currentValidator.setMessage(e),this},help:function(e){return this.item.setMessage(e),this},withName:function(e){return this.item.element.setName(e),this}}),function(){var e=v2.dsl.Field.prototype;e.orIs=e.orIsA=e.orIsAn=e.orHas=e.orHasA=e.orHasAn=e.or,e.andIs=e.andIsA=e.andIsAn=e.andHas=e.andHasA=e.andHasAn=e.and}(),v2.dsl.Collection=Base.extend({constructor:function(){this.item=new v2.CompositeFormItem},explain:function(e){this.item.setMessage(e)}}),v2.dsl.Form=Base.extend({constructor:function(e){this.item=v2.Form.get(e)},on:function(){var e,t;for(e=0;e<arguments.length;e++)t=v2.$(arguments[e]),this.item.addButton("input"!==t.tagName.toLowerCase()?t.getElementsByTagName("input")[0]:t)}});
49(function(){var n,r,t,e=[].indexOf||function(n){for(var r=0,t=this.length;r<t;r++)if(r in this&&this[r]===n)return r;return-1};t=function(){function Trie(){this.trie={}}return Trie.prototype.push=function(n){var r,t,e,i,a,l,u;for(n=n.toString(),a=this.trie,u=[],t=e=0,i=(l=n.split("")).length;e<i;t=++e)null==a[r=l[t]]&&(t===n.length-1?a[r]=null:a[r]={}),u.push(a=a[r]);return u},Trie.prototype.find=function(n){var r,t,e,i,a,l;for(n=n.toString(),a=this.trie,t=e=0,i=(l=n.split("")).length;e<i;t=++e){if(r=l[t],!a.hasOwnProperty(r))return!1;if(null===a[r])return!0;a=a[r]}},Trie}(),r=function(){function Range(n){if(this.trie=n,this.trie.constructor!==t)throw Error("Range constructor requires a Trie parameter")}return Range.rangeWithString=function(n){var r,e,i,a,l,u,o,c,h;if("string"!=typeof n)throw Error("rangeWithString requires a string parameter");for(n=(n=n.replace(/ /g,"")).split(","),h=new t,r=0,i=n.length;r<i;r++)if(l=(u=n[r]).match(/^(\d+)-(\d+)$/))for(a=e=o=l[1],c=l[2];o<=c?e<=c:e>=c;a=o<=c?++e:--e)h.push(a);else{if(!u.match(/^\d+$/))throw Error("Invalid range '"+l+"'");h.push(u)}return new Range(h)},Range.prototype.match=function(n){return this.trie.find(n)},Range}(),(n=jQuery).fn.validateCreditCard=function(t,i){var a,l,u,o,c,h,f,g,s,p,v,d,m,_;for(o=[{name:"amex",range:"34,37",valid_length:[15]},{name:"diners_club_carte_blanche",range:"300-305",valid_length:[14]},{name:"diners_club_international",range:"36",valid_length:[14]},{name:"visa",range:"4",valid_length:[16]},{name:"mastercard",range:"51-55,2221-2720",valid_length:[16]},{name:"rupay",range:"35,81,100,101,508,606,607,608,652",valid_length:[16]},{name:"maestro",range:"50, 56-69",valid_length:[12,13,14,15,16,17,18,19]}],a=!1,t&&("object"==typeof t?(i=t,a=!1,t=null):"function"==typeof t&&(a=!0)),null==i&&(i={}),null==i.accept&&(i.accept=function(){var n,r,t;for(t=[],n=0,r=o.length;n<r;n++)l=o[n],t.push(l.name);return t}()),g=0,s=(v=i.accept).length;g<s;g++)if(u=v[g],e.call(function(){var n,r,t;for(t=[],n=0,r=o.length;n<r;n++)l=o[n],t.push(l.name);return t}(),u)<0)throw Error("Credit card type '"+u+"' is not supported");return c=function(n){var t,a,c;for(c=function(){var n,r,t,a;for(a=[],n=0,r=o.length;n<r;n++)t=(l=o[n]).name,e.call(i.accept,t)>=0&&a.push(l);return a}(),t=0,a=c.length;t<a;t++)if(u=c[t],r.rangeWithString(u.range).match(n))return u;return null},f=function(n){var r,t,e,i,a,l;for(l=0,i=t=0,e=(a=n.split("").reverse()).length;t<e;i=++t)r=+(r=a[i]),l+=i%2?(r*=2)<10?r:r-9:r;return l%10==0},h=function(n,r){var t;return t=n.length,e.call(r.valid_length,t)>=0},m=function(n){var r,t;return t=!1,r=!1,null!=(u=c(n))&&(t=f(n),r=h(n,u)),{card_type:u,valid:t&&r,luhn_valid:t,length_valid:r}},_=this,d=function(){var r;return r=p(n(_).val()),m(r)},p=function(n){return n.replace(/[ -]/g,"")},a?(this.on("input.jccv",function(r){return function(){return n(r).off("keyup.jccv"),t.call(r,d())}}(this)),this.on("keyup.jccv",function(n){return function(){return t.call(n,d())}}(this)),t.call(this,d()),this):d()}}).call(this);
50var Swiper=function(){"use strict";function e(G){return null!==G&&"object"==typeof G&&"constructor"in G&&G.constructor===Object}function t(G,H){void 0===G&&(G={}),void 0===H&&(H={}
vendor: 6,559 bytes, line 50
50),Object.keys(H).forEach(X=>{void 0===G[X]?G[X]=H[X]:e(H[X])&&e(G[X])&&Object.keys(H[X]).length>0&&t(G[X],H[X])})}const G={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function a(){const H="undefined"!=typeof document?document:{};return t(H,G),H}const H={document:G,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:G=>"undefined"==typeof setTimeout?(G(),null):setTimeout(G,0),cancelAnimationFrame(G){"undefined"!=typeof setTimeout&&clearTimeout(G)}};function r(){const G="undefined"!=typeof window?window:{};return t(G,H),G}function n(G){return void 0===G&&(G=""),G.trim().split(" ").filter(G=>!!G.trim())}function l(G,H){return void 0===H&&(H=0),setTimeout(G,H)}function o(){return Date.now()}function d(G,H){void 0===H&&(H="x");const X=r();let Y,Q,ee;const te=function(G){const H=r();let X;return H.getComputedStyle&&(X=H.getComputedStyle(G,null)),!X&&G.currentStyle&&(X=G.currentStyle),X||(X=G.style),X}(G);return X.WebKitCSSMatrix?(Q=te.transform||te.webkitTransform,Q.split(",").length>6&&(Q=Q.split(", ").map(G=>G.replace(",",".")).join(", ")),ee=new X.WebKitCSSMatrix("none"===Q?"":Q)):(ee=te.MozTransform||te.OTransform||te.MsTransform||te.msTransform||te.transform||te.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),Y=ee.toString().split(",")),"x"===H&&(Q=X.WebKitCSSMatrix?ee.m41:16===Y.length?parseFloat(Y[12]):parseFloat(Y[4])),"y"===H&&(Q=X.WebKitCSSMatrix?ee.m42:16===Y.length?parseFloat(Y[13]):parseFloat(Y[5])),Q||0}function c(G){return"object"==typeof G&&null!==G&&G.constructor&&"Object"===Object.prototype.toString.call(G).slice(8,-1)}function p(){const G=Object(arguments.length<=0?void 0:arguments[0]),H=["__proto__","constructor","prototype"];for(let Y=1;Y<arguments.length;Y+=1){const Q=Y<0||arguments.length<=Y?void 0:arguments[Y];if(null!=Q&&(X=Q,!("undefined"!=typeof window&&void 0!==window.HTMLElement?X instanceof HTMLElement:X&&(1===X.nodeType||11===X.nodeType)))){const X=Object.keys(Object(Q)).filter(G=>H.indexOf(G)<0);for(let H=0,Y=X.length;H<Y;H+=1){const Y=X[H],ee=Object.getOwnPropertyDescriptor(Q,Y);void 0!==ee&&ee.enumerable&&(c(G[Y])&&c(Q[Y])?Q[Y].__swiper__?G[Y]=Q[Y]:p(G[Y],Q[Y]):!c(G[Y])&&c(Q[Y])?(G[Y]={},Q[Y].__swiper__?G[Y]=Q[Y]:p(G[Y],Q[Y])):G[Y]=Q[Y])}}}var X;return G}function u(G,H,X){G.style.setProperty(H,X)}function m(G){let{swiper:H,targetPosition:X,side:Y}=G;const Q=r(),ee=-H.translate;let te,he=null;const fe=H.params.speed;H.wrapperEl.style.scrollSnapType="none",Q.cancelAnimationFrame(H.cssModeFrameID);const ge=X>ee?"next":"prev",p=(G,H)=>"next"===ge&&G>=H||"prev"===ge&&G<=H,u=()=>{te=(new Date).getTime(),null===he&&(he=te);const G=Math.max(Math.min((te-he)/fe,1),0),ge=.5-Math.cos(G*Math.PI)/2;let ve=ee+ge*(X-ee);if(p(ve,X)&&(ve=X),H.wrapperEl.scrollTo({[Y]:ve}),p(ve,X))return H.wrapperEl.style.overflow="hidden",H.wrapperEl.style.scrollSnapType="",setTimeout(()=>{H.wrapperEl.style.overflow="",H.wrapperEl.scrollTo({[Y]:ve})}),void Q.cancelAnimationFrame(H.cssModeFrameID);H.cssModeFrameID=Q.requestAnimationFrame(u)};u()}function h(G){return G.querySelector(".swiper-slide-transform")||G.shadowRoot&&G.shadowRoot.querySelector(".swiper-slide-transform")||G}function f(G,H){return void 0===H&&(H=""),[...G.children].filter(G=>G.matches(H))}function g(G){try{return}catch(G){}}function v(G,H){void 0===H&&(H=[]);const X=document.createElement(G);return X.classList.add(...Array.isArray(H)?H:n(H)),X}function w(G){const H=r(),X=a(),Y=G.getBoundingClientRect(),Q=X.body,ee=G.clientTop||Q.clientTop||0,te=G.clientLeft||Q.clientLeft||0,he=G===H?H.scrollY:G.scrollTop,fe=G===H?H.scrollX:G.scrollLeft;return{top:Y.top+he-ee,left:Y.left+fe-te}}function b(G,H){return r().getComputedStyle(G,null).getPropertyValue(H)}function y(G){let H,X=G;if(X){for(H=0;null!==(X=X.previousSibling);)1===X.nodeType&&(H+=1);return H}}function E(G,H){const X=[];let Y=G.parentElement;for(;Y;)H?Y.matches(H)&&X.push(Y):X.push(Y),Y=Y.parentElement;return X}function x(G,H){H&&G.addEventListener("transitionend",function s(X){X.target===G&&(H.call(G,X),G.removeEventListener("transitionend",s))})}function S(G,H,X){const Y=r();return X?G["width"===H?"offsetWidth":"offsetHeight"]+parseFloat(Y.getComputedStyle(G,null).getPropertyValue("width"===H?"margin-right":"margin-top"))+parseFloat(Y.getComputedStyle(G,null).getPropertyValue("width"===H?"margin-left":"margin-bottom")):G.offsetWidth}function T(G){return(Array.isArray(G)?G:[G]).filter(G=>!!G)}let X,Y,Q;function L(){return X||(X=function(){const G=r(),H=a();return{smoothScroll:H.documentElement&&H.documentElement.style&&"scrollBehavior"in H.documentElement.style,touch:!!("ontouchstart"in G||G.DocumentTouch&&H instanceof G.DocumentTouch)}}()),X}function I(G){return void 0===G&&(G={}),Y||(Y=function(G){let{userAgent:H}=void 0===G?{}:G;const X=L(),Y=r(),Q=Y.navigator.platform,ee=H||Y.navigator.userAgent,te={ios:!1,android:!1},he=Y.screen.width,fe=Y.screen.height,ge=ee.match(/(Android);?[\s\/]+([\d.]+)?/);let ve=ee.match(/(iPad).*OS\s([\d_]+)/);const we=ee.match(/(iPod)(.*OS\s([\d_]+))?/),be=!ve&&ee.match(/(iPhone\sOS|iOS)\s([\d_]+)/),ye="Win32"===Q;let Ee="MacIntel"===Q;return!ve&&Ee&&X.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${he}x${fe}`)>=0&&(ve=ee.match(/(Version)\/([\d.]+)/),ve||(ve=[0,1,"13_0_0"]),Ee=!1),ge&&!ye&&(te.os="android",te.android=!0),(ve||be||we)&&(te.os="ios",te.ios=!0),te}(G)),Y}function z(){return Q||(Q=function(){const G=r(),H=I();let X=!1;function a(){const H=G.navigator.userAgent.toLowerCase();return H.indexOf("safari")>=0&&H.indexOf("chrome")<0&&H.indexOf("android")<0}if(a()){const H=String(G.navigator.userAgent);if(H.includes("Version/")){const[G,Y]=H.split("Version/")[1].split(" ")[0].split(".").map(G=>Number(G));X=G<16||16===G&&Y<2}}
vendor: 14,191 bytes, line 50
50const Y=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(G.navigator.userAgent),Q=a();return{isSafari:X||Q,needPerspectiveFix:X,need3dFix:Q||Y&&H.ios,isWebView:Y}}()),Q}var ee={on(G,H,X){const Y=this;if(!Y.eventsListeners||Y.destroyed)return Y;if("function"!=typeof H)return Y;const Q=X?"unshift":"push";return G.split(" ").forEach(G=>{Y.eventsListeners[G]||(Y.eventsListeners[G]=[]),Y.eventsListeners[G][Q](H)}),Y},once(G,H,X){const Y=this;if(!Y.eventsListeners||Y.destroyed)return Y;if("function"!=typeof H)return Y;function i(){Y.off(G,i),i.__emitterProxy&&delete i.__emitterProxy;for(var X=arguments.length,Q=new Array(X),ee=0;ee<X;ee++)Q[ee]=arguments[ee];H.apply(Y,Q)}return i.__emitterProxy=H,Y.on(G,i,X)},onAny(G,H){const X=this;if(!X.eventsListeners||X.destroyed)return X;if("function"!=typeof G)return X;const Y=H?"unshift":"push";return X.eventsAnyListeners.indexOf(G)<0&&X.eventsAnyListeners[Y](G),X},offAny(G){const H=this;if(!H.eventsListeners||H.destroyed)return H;if(!H.eventsAnyListeners)return H;const X=H.eventsAnyListeners.indexOf(G);return X>=0&&H.eventsAnyListeners.splice(X,1),H},off(G,H){const X=this;return!X.eventsListeners||X.destroyed?X:X.eventsListeners?(G.split(" ").forEach(G=>{void 0===H?X.eventsListeners[G]=[]:X.eventsListeners[G]&&X.eventsListeners[G].forEach((Y,Q)=>{(Y===H||Y.__emitterProxy&&Y.__emitterProxy===H)&&X.eventsListeners[G].splice(Q,1)})}),X):X},emit(){const G=this;if(!G.eventsListeners||G.destroyed)return G;if(!G.eventsListeners)return G;let H,X,Y;for(var Q=arguments.length,ee=new Array(Q),te=0;te<Q;te++)ee[te]=arguments[te];return"string"==typeof ee[0]||Array.isArray(ee[0])?(H=ee[0],X=ee.slice(1,ee.length),Y=G):(H=ee[0].events,X=ee[0].data,Y=ee[0].context||G),X.unshift(Y),(Array.isArray(H)?H:H.split(" ")).forEach(H=>{G.eventsAnyListeners&&G.eventsAnyListeners.length&&G.eventsAnyListeners.forEach(G=>{G.apply(Y,[H,...X])}),G.eventsListeners&&G.eventsListeners[H]&&G.eventsListeners[H].forEach(G=>{G.apply(Y,X)})}),G}};const $=(G,H,X)=>{H&&!G.classList.contains(X)?G.classList.add(X):!H&&G.classList.contains(X)&&G.classList.remove(X)},k=(G,H)=>{if(!G||G.destroyed||!G.params)return;const X=H.closest(G.isElement?"swiper-slide":`.${G.params.slideClass}`);if(X){let H=X.querySelector(`.${G.params.lazyPreloaderClass}`);!H&&G.isElement&&(X.shadowRoot?H=X.shadowRoot.querySelector(`.${G.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{X.shadowRoot&&(H=X.shadowRoot.querySelector(`.${G.params.lazyPreloaderClass}`),H&&H.remove())})),H&&H.remove()}},O=(G,H)=>{if(!G.slides[H])return;const X=G.slides[H].querySelector('[loading="lazy"]');X&&X.removeAttribute("loading")},D=G=>{if(!G||G.destroyed||!G.params)return;let H=G.params.lazyPreloadPrevNext;const X=G.slides.length;if(!X||!H||H<0)return;H=Math.min(H,X);const Y="auto"===G.params.slidesPerView?G.slidesPerViewDynamic():Math.ceil(G.params.slidesPerView),Q=G.activeIndex;if(G.params.grid&&G.params.grid.rows>1){const X=Q,ee=[X-H];return ee.push(...Array.from({length:H}).map((G,H)=>X+Y+H)),void G.slides.forEach((H,X)=>{ee.includes(H.column)&&O(G,X)})}const ee=Q+Y-1;if(G.params.rewind||G.params.loop)for(let Y=Q-H;Y<=ee+H;Y+=1){const H=(Y%X+X)%X;(H<Q||H>ee)&&O(G,H)}else for(let Y=Math.max(Q-H,0);Y<=Math.min(ee+H,X-1);Y+=1)Y!==Q&&(Y>ee||Y<Q)&&O(G,Y)};var te={updateSize:function(){const G=this;let H,X;const Y=G.el;H=void 0!==G.params.width&&null!==G.params.width?G.params.width:Y.clientWidth,X=void 0!==G.params.height&&null!==G.params.height?G.params.height:Y.clientHeight,0===H&&G.isHorizontal()||0===X&&G.isVertical()||(H=H-parseInt(b(Y,"padding-left")||0,10)-parseInt(b(Y,"padding-right")||0,10),X=X-parseInt(b(Y,"padding-top")||0,10)-parseInt(b(Y,"padding-bottom")||0,10),Number.isNaN(H)&&(H=0),Number.isNaN(X)&&(X=0),Object.assign(G,{width:H,height:X,size:G.isHorizontal()?H:X}))},updateSlides:function(){const G=this;function t(H,X){return parseFloat(H.getPropertyValue(G.getDirectionLabel(X))||0)}const H=G.params,{wrapperEl:X,slidesEl:Y,size:Q,rtlTranslate:ee,wrongRTL:te}=G,he=G.virtual&&H.virtual.enabled,fe=he?G.virtual.slides.length:G.slides.length,ge=f(Y,`.${G.params.slideClass}, swiper-slide`),ve=he?G.virtual.slides.length:ge.length;let we=[];const be=[],ye=[];let Ee=H.slidesOffsetBefore;"function"==typeof Ee&&(Ee=H.slidesOffsetBefore.call(G));let xe=H.slidesOffsetAfter;"function"==typeof xe&&(xe=H.slidesOffsetAfter.call(G));const Se=G.snapGrid.length,Te=G.slidesGrid.length;let Me=H.spaceBetween,Ce=-Ee,Pe=0,Le=0;if(void 0===Q)return;"string"==typeof Me&&Me.indexOf("%")>=0?Me=parseFloat(Me.replace("%",""))/100*Q:"string"==typeof Me&&(Me=parseFloat(Me)),G.virtualSize=-Me,ge.forEach(G=>{ee?G.style.marginLeft="":G.style.marginRight="",G.style.marginBottom="",G.style.marginTop=""}),H.centeredSlides&&H.cssMode&&(u(X,"--swiper-centered-offset-before",""),u(X,"--swiper-centered-offset-after",""));const Ie=H.grid&&H.grid.rows>1&&G.grid;let ze;Ie?G.grid.initSlides(ge):G.grid&&G.grid.unsetSlides();const Ae="auto"===H.slidesPerView&&H.breakpoints&&Object.keys(H.breakpoints).filter(G=>void 0!==H.breakpoints[G].slidesPerView).length>0;for(let X=0;X<ve;X+=1){let Y;if(ze=0,ge[X]&&(Y=ge[X]),Ie&&G.grid.updateSlide(X,Y,ge),!ge[X]||"none"!==b(Y,"display")){if("auto"===H.slidesPerView){Ae&&(ge[X].style[G.getDirectionLabel("width")]="");const Q=getComputedStyle(Y),ee=Y.style.transform,te=Y.style.webkitTransform;if(ee&&(Y.style.transform="none"),te&&(Y.style.webkitTransform="none"),H.roundLengths)ze=G.isHorizontal()?S(Y,"width",!0):S(Y,"height",!0);else{const G=t(Q,"width"),H=t(Q,"padding-left"),X=t(Q,"padding-right"),ee=t(Q,"margin-left"),te=t(Q,"margin-right"),he=Q.getPropertyValue("box-sizing");if(he&&"border-box"===he)ze=G+ee+te;else{const{clientWidth:Q,offsetWidth:he}=Y;ze=G+H+X+ee+te+(he-Q)}}ee&&(Y.style.transform=ee),te&&(Y.style.webkitTransform=te),H.roundLengths&&(ze=Math.floor(ze))}else ze=(Q-(H.slidesPerView-1)*Me)/H.slidesPerView,H.roundLengths&&(ze=Math.floor(ze)),ge[X]&&(ge[X].style[G.getDirectionLabel("width")]=`${ze}px`);ge[X]&&(ge[X].swiperSlideSize=ze),ye.push(ze),H.centeredSlides?(Ce=Ce+ze/2+Pe/2+Me,0===Pe&&0!==X&&(Ce=Ce-Q/2-Me),0===X&&(Ce=Ce-Q/2-Me),Math.abs(Ce)<.001&&(Ce=0),H.roundLengths&&(Ce=Math.floor(Ce)),Le%H.slidesPerGroup==0&&we.push(Ce),be.push(Ce)):(H.roundLengths&&(Ce=Math.floor(Ce)),(Le-Math.min(G.params.slidesPerGroupSkip,Le))%G.params.slidesPerGroup==0&&we.push(Ce),be.push(Ce),Ce=Ce+ze+Me),G.virtualSize+=ze+Me,Pe=ze,Le+=1}}if(G.virtualSize=Math.max(G.virtualSize,Q)+xe,ee&&te&&("slide"===H.effect||"coverflow"===H.effect)&&(X.style.width=`${G.virtualSize+Me}px`),H.setWrapperSize&&(X.style[G.getDirectionLabel("width")]=`${G.virtualSize+Me}px`),Ie&&G.grid.updateWrapperSize(ze,we),!H.centeredSlides){const X=[];for(let Y=0;Y<we.length;Y+=1){let ee=we[Y];H.roundLengths&&(ee=Math.floor(ee)),we[Y]<=G.virtualSize-Q&&X.push(ee)}we=X,Math.floor(G.virtualSize-Q)-Math.floor(we[we.length-1])>1&&we.push(G.virtualSize-Q)}if(he&&H.loop){const X=ye[0]+Me;if(H.slidesPerGroup>1){const Y=Math.ceil((G.virtual.slidesBefore+G.virtual.slidesAfter)/H.slidesPerGroup),Q=X*H.slidesPerGroup;for(let G=0;G<Y;G+=1)we.push(we[we.length-1]+Q)}for(let Y=0;Y<G.virtual.slidesBefore+G.virtual.slidesAfter;Y+=1)1===H.slidesPerGroup&&we.push(we[we.length-1]+X),be.push(be[be.length-1]+X),G.virtualSize+=X}if(0===we.length&&(we=[0]),0!==Me){const X=G.isHorizontal()&&ee?"marginLeft":G.getDirectionLabel("marginRight");ge.filter((G,X)=>!(H.cssMode&&!H.loop)||X!==ge.length-1).forEach(G=>{G.style[X]=`${Me}px`})}if(H.centeredSlides&&H.centeredSlidesBounds){let G=0;ye.forEach(H=>{G+=H+(Me||0)}),G-=Me;const H=G-Q;we=we.map(G=>G<=0?-Ee:G>H?H+xe:G)}if(H.centerInsufficientSlides){let G=0;if(ye.forEach(H=>{G+=H+(Me||0)}),G-=Me,G<Q){const H=(Q-G)/2;we.forEach((G,X)=>{we[X]=G-H}),be.forEach((G,X)=>{be[X]=G+H})}}if(Object.assign(G,{slides:ge,snapGrid:we,slidesGrid:be,slidesSizesGrid:ye}),H.centeredSlides&&H.cssMode&&!H.centeredSlidesBounds){u(X,"--swiper-centered-offset-before",-we[0]+"px"),u(X,"--swiper-centered-offset-after",G.size/2-ye[ye.length-1]/2+"px");const H=-G.snapGrid[0],Y=-G.slidesGrid[0];G.snapGrid=G.snapGrid.map(G=>G+H),G.slidesGrid=G.slidesGrid.map(G=>G+Y)}if(ve!==fe&&G.emit("slidesLengthChange"),we.length!==Se&&(G.params.watchOverflow&&G.checkOverflow(),G.emit("snapGridLengthChange")),be.length!==Te&&G.emit("slidesGridLengthChange"),H.watchSlidesProgress&&G.updateSlidesOffset(),G.emit("slidesUpdated"),!(he||H.cssMode||"slide"!==H.effect&&"fade"!==H.effect)){const X=`${H.containerModifierClass}backface-hidden`,Y=G.el.classList.contains(X);ve<=H.maxBackfaceHiddenSlides?Y||G.el.classList.add(X):Y&&G.el.classList.remove(X)}},updateAutoHeight:function(G){const H=this,X=[],Y=H.virtual&&H.params.virtual.enabled;let Q,ee=0;"number"==typeof G?H.setTransition(G):!0===G&&H.setTransition(H.params.speed);const n=G=>Y?H.slides[H.getSlideIndexByData(G)]:H.slides[G];if("auto"!==H.params.slidesPerView&&H.params.slidesPerView>1)if(H.params.centeredSlides)(H.visibleSlides||[]).forEach(G=>{X.push(G)});else for(Q=0;Q<Math.ceil(H.params.slidesPerView);Q+=1){const G=H.activeIndex+Q;if(G>H.slides.length&&!Y)break;X.push(n(G))}else X.push(n(H.activeIndex));for(Q=0;Q<X.length;Q+=1)if(void 0!==X[Q]){const G=X[Q].offsetHeight;ee=G>ee?G:ee}(ee||0===ee)&&(H.wrapperEl.style.height=`${ee}px`)},updateSlidesOffset:function(){const G=this,H=G.slides,X=G.isElement?G.isHorizontal()?G.wrapperEl.offsetLeft:G.wrapperEl.offsetTop:0;for(let Y=0;Y<H.length;Y+=1)H[Y].swiperSlideOffset=(G.isHorizontal()?H[Y].offsetLeft:H[Y].offsetTop)-X-G.cssOverflowAdjustment()},updateSlidesProgress:function(G){void 0===G&&(G=this&&this.translate||0);const H=this,X=H.params,{slides:Y,rtlTranslate:Q,snapGrid:ee}=H;if(0===Y.length)return;void 0===Y[0].swiperSlideOffset&&H.updateSlidesOffset();let te=-G;Q&&(te=G),Y.forEach(G=>{G.classList.remove(X.slideVisibleClass,X.slideFullyVisibleClass)}),H.visibleSlidesIndexes=[],H.visibleSlides=[];let he=X.spaceBetween;"string"==typeof he&&he.indexOf("%")>=0?he=parseFloat(he.replace("%",""))/100*H.size:"string"==typeof he&&(he=parseFloat(he));for(let G=0;G<Y.length;G+=1){const fe=Y[G];let ge=fe.swiperSlideOffset;X.cssMode&&X.centeredSlides&&(ge-=Y[0].swiperSlideOffset);const ve=(te+(X.centeredSlides?H.minTranslate():0)-ge)/(fe.swiperSlideSize+he),we=(te-ee[0]+(X.centeredSlides?H.minTranslate():0)-ge)/(fe.swiperSlideSize+he),be=-(te-ge),ye=be+H.slidesSizesGrid[G],Ee=be>=0&&be<=H.size-H.slidesSizesGrid[G];(be>=0&&be<H.size-1||ye>1&&ye<=H.size||be<=0&&ye>=H.size)&&(H.visibleSlides.push(fe),H.visibleSlidesIndexes.push(G),Y[G].classList.add(X.slideVisibleClass)),Ee&&Y[G].classList.add(X.slideFullyVisibleClass),fe.progress=Q?-ve:ve,fe.originalProgress=Q?-we:we}},updateProgress:function(G){const H=this;if(void 0===G){const X=H.rtlTranslate?-1:1;G=H&&H.translate&&H.translate*X||0}const X=H.params,Y=H.maxTranslate()-H.minTranslate();let{progress:Q,isBeginning:ee,isEnd:te,progressLoop:he}=H;const fe=ee,ge=te;if(0===Y)Q=0,ee=!0,te=!0;else{Q=(G-H.minTranslate())/Y;const X=Math.abs(G-H.minTranslate())<1,he=Math.abs(G-H.maxTranslate())<1;ee=X||Q<=0,te=he||Q>=1,X&&(Q=0),he&&(Q=1)}if(X.loop){const X=H.getSlideIndexByData(0),Y=H.getSlideIndexByData(H.slides.length-1),Q=H.slidesGrid[X],ee=H.slidesGrid[Y],te=H.slidesGrid[H.slidesGrid.length-1],fe=Math.abs(G);he=fe>=Q?(fe-Q)/te:(fe+te-ee)/te,he>1&&(he-=1)}Object.assign(H,{progress:Q,progressLoop:he,isBeginning:ee,isEnd:te}),(X.watchSlidesProgress||X.centeredSlides&&X.autoHeight)&&H.updateSlidesProgress(G),ee&&!fe&&H.emit("reachBeginning toEdge"),te&&!ge&&H.emit("reachEnd toEdge"),(fe&&!ee||ge&&!te)&&H.emit("fromEdge"),H.emit("progress",Q)},updateSlidesClasses:function(){const G=this,{slides:H,params:X,slidesEl:Y,activeIndex:Q}=G,ee=G.virtual&&X.virtual.enabled,te=G.grid&&X.grid&&X.grid.rows>1,l=G=>f(Y,`.${X.slideClass}${G}, swiper-slide${G}`)[0];let he,fe,ge;if(ee)if(X.loop){let H=Q-G.virtual.slidesBefore;H<0&&(H=G.virtual.slides.length+H),H>=G.virtual.slides.length&&(H-=G.virtual.slides.length),he=l(`[data-swiper-slide-index="${H}"]`)}else he=l(`[data-swiper-slide-index="${Q}"]`);else te?(he=H.filter(G=>G.column===Q)[0],ge=H.filter(G=>G.column===Q+1)[0],fe=H.filter(G=>G.column===Q-1)[0]):he=H[Q];he&&(te||(ge=function(G,H){const X=[];for(;G.nextElementSibling;){const Y=G.nextElementSibling;H?Y.matches(H)&&X.push(Y):X.push(Y),G=Y}return X}(he,`.${X.slideClass}, swiper-slide`)[0],X.loop&&!ge&&(ge=H[0]),fe=function(G,H){const X=[];for(;G.previousElementSibling;){const Y=G.previousElementSibling;H?Y.matches(H)&&X.push(Y):X.push(Y),G=Y}return X}(he,`.${X.slideClass}, swiper-slide`)[0],X.loop&&0===!fe&&(fe=H[H.length-1]))),H.forEach(G=>{$(G,G===he,X.slideActiveClass),$(G,G===ge,X.slideNextClass),$(G,G===fe,X.slidePrevClass)}),G.emitSlidesClasses()},updateActiveIndex:function(G){const H=this,X=H.rtlTranslate?H.translate:-H.translate,{snapGrid:Y,params:Q,activeIndex:ee,realIndex:te,snapIndex:he}=H;let fe,ge=G;const c=G=>{let X=G-H.virtual.slidesBefore;return X<0&&(X=H.virtual.slides.length+X),X>=H.virtual.slides.length&&(X-=H.virtual.slides.length),X};if(void 0===ge&&(ge=function(G){const{slidesGrid:H,params:X}=G,Y=G.rtlTranslate?G.translate:-G.translate;let Q;for(let G=0;G<H.length;G+=1)void 0!==H[G+1]?Y>=H[G]&&Y<H[G+1]-(H[G+1]-H[G])/2?Q=G:Y>=H[G]&&Y<H[G+1]&&(Q=G+1):Y>=H[G]&&(Q=G);return X.normalizeSlideIndex&&(Q<0||void 0===Q)&&(Q=0),Q}(H)),Y.indexOf(X)>=0)fe=Y.indexOf(X);else{const G=Math.min(Q.slidesPerGroupSkip,ge);fe=G+Math.floor((ge-G)/Q.slidesPerGroup)}if(fe>=Y.length&&(fe=Y.length-1),ge===ee&&!H.params.loop)return void(fe!==he&&(H.snapIndex=fe,H.emit("snapIndexChange")));if(ge===ee&&H.params.loop&&H.virtual&&H.params.virtual.enabled)return void(H.realIndex=c(ge));const ve=H.grid&&Q.grid&&Q.grid.rows>1;let we;if(H.virtual&&Q.virtual.enabled&&Q.loop)we=c(ge);else if(ve){const G=H.slides.filter(G=>G.column===ge)[0];let X=parseInt(G.getAttribute("data-swiper-slide-index"),10);Number.isNaN(X)&&(X=Math.max(H.slides.indexOf(G),0)),we=Math.floor(X/Q.grid.rows)}else if(H.slides[ge]){const G=H.slides[ge].getAttribute("data-swiper-slide-index");we=G?parseInt(G,10):ge}else we=ge;Object.assign(H,{previousSnapIndex:he,snapIndex:fe,previousRealIndex:te,realIndex:we,previousIndex:ee,activeIndex:ge}
vendor: 13,241 bytes, line 50
50),H.initialized&&D(H),H.emit("activeIndexChange"),H.emit("snapIndexChange"),(H.initialized||H.params.runCallbacksOnInit)&&(te!==we&&H.emit("realIndexChange"),H.emit("slideChange"))},updateClickedSlide:function(G,H){const X=this,Y=X.params;let Q=G.closest(`.${Y.slideClass}, swiper-slide`);!Q&&X.isElement&&H&&H.length>1&&H.includes(G)&&[...H.slice(H.indexOf(G)+1,H.length)].forEach(G=>{!Q&&G.matches&&G.matches(`.${Y.slideClass}, swiper-slide`)&&(Q=G)});let ee,te=!1;if(Q)for(let G=0;G<X.slides.length;G+=1)if(X.slides[G]===Q){te=!0,ee=G;break}if(!Q||!te)return X.clickedSlide=void 0,void(X.clickedIndex=void 0);X.clickedSlide=Q,X.virtual&&X.params.virtual.enabled?X.clickedIndex=parseInt(Q.getAttribute("data-swiper-slide-index"),10):X.clickedIndex=ee,Y.slideToClickedSlide&&void 0!==X.clickedIndex&&X.clickedIndex!==X.activeIndex&&X.slideToClickedSlide()}},he={getTranslate:function(G){void 0===G&&(G=this.isHorizontal()?"x":"y");const{params:H,rtlTranslate:X,translate:Y,wrapperEl:Q}=this;if(H.virtualTranslate)return X?-Y:Y;if(H.cssMode)return Y;let ee=d(Q,G);return ee+=this.cssOverflowAdjustment(),X&&(ee=-ee),ee||0},setTranslate:function(G,H){const X=this,{rtlTranslate:Y,params:Q,wrapperEl:ee,progress:te}=X;let he,fe=0,ge=0;X.isHorizontal()?fe=Y?-G:G:ge=G,Q.roundLengths&&(fe=Math.floor(fe),ge=Math.floor(ge)),X.previousTranslate=X.translate,X.translate=X.isHorizontal()?fe:ge,Q.cssMode?ee[X.isHorizontal()?"scrollLeft":"scrollTop"]=X.isHorizontal()?-fe:-ge:Q.virtualTranslate||(X.isHorizontal()?fe-=X.cssOverflowAdjustment():ge-=X.cssOverflowAdjustment(),ee.style.transform=`translate3d(${fe}px, ${ge}px, 0px)`);const ve=X.maxTranslate()-X.minTranslate();he=0===ve?0:(G-X.minTranslate())/ve,he!==te&&X.updateProgress(G),X.emit("setTranslate",X.translate,H)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(G,H,X,Y,Q){void 0===G&&(G=0),void 0===H&&(H=this.params.speed),void 0===X&&(X=!0),void 0===Y&&(Y=!0);const ee=this,{params:te,wrapperEl:he}=ee;if(ee.animating&&te.preventInteractionOnTransition)return!1;const fe=ee.minTranslate(),ge=ee.maxTranslate();let ve;if(ve=Y&&G>fe?fe:Y&&G<ge?ge:G,ee.updateProgress(ve),te.cssMode){const G=ee.isHorizontal();if(0===H)he[G?"scrollLeft":"scrollTop"]=-ve;else{if(!ee.support.smoothScroll)return m({swiper:ee,targetPosition:-ve,side:G?"left":"top"}),!0;he.scrollTo({[G?"left":"top"]:-ve,behavior:"smooth"})}return!0}return 0===H?(ee.setTransition(0),ee.setTranslate(ve),X&&(ee.emit("beforeTransitionStart",H,Q),ee.emit("transitionEnd"))):(ee.setTransition(H),ee.setTranslate(ve),X&&(ee.emit("beforeTransitionStart",H,Q),ee.emit("transitionStart")),ee.animating||(ee.animating=!0,ee.onTranslateToWrapperTransitionEnd||(ee.onTranslateToWrapperTransitionEnd=function(G){ee&&!ee.destroyed&&G.target===this&&(ee.wrapperEl.removeEventListener("transitionend",ee.onTranslateToWrapperTransitionEnd),ee.onTranslateToWrapperTransitionEnd=null,delete ee.onTranslateToWrapperTransitionEnd,ee.animating=!1,X&&ee.emit("transitionEnd"))}),ee.wrapperEl.addEventListener("transitionend",ee.onTranslateToWrapperTransitionEnd))),!0}};function N(G){let{swiper:H,runCallbacks:X,direction:Y,step:Q}=G;const{activeIndex:ee,previousIndex:te}=H;let he=Y;if(he||(he=ee>te?"next":ee<te?"prev":"reset"),H.emit(`transition${Q}`),X&&ee!==te){if("reset"===he)return void H.emit(`slideResetTransition${Q}`);H.emit(`slideChangeTransition${Q}`),"next"===he?H.emit(`slideNextTransition${Q}`):H.emit(`slidePrevTransition${Q}`)}}var fe={slideTo:function(G,H,X,Y,Q){void 0===G&&(G=0),void 0===X&&(X=!0),"string"==typeof G&&(G=parseInt(G,10));const ee=this;let te=G;te<0&&(te=0);const{params:he,snapGrid:fe,slidesGrid:ge,previousIndex:ve,activeIndex:we,rtlTranslate:be,wrapperEl:ye,enabled:Ee}=ee;if(!Ee&&!Y&&!Q||ee.destroyed||ee.animating&&he.preventInteractionOnTransition)return!1;void 0===H&&(H=ee.params.speed);const xe=Math.min(ee.params.slidesPerGroupSkip,te);let Se=xe+Math.floor((te-xe)/ee.params.slidesPerGroup);Se>=fe.length&&(Se=fe.length-1);const Te=-fe[Se];if(he.normalizeSlideIndex)for(let G=0;G<ge.length;G+=1){const H=-Math.floor(100*Te),X=Math.floor(100*ge[G]),Y=Math.floor(100*ge[G+1]);void 0!==ge[G+1]?H>=X&&H<Y-(Y-X)/2?te=G:H>=X&&H<Y&&(te=G+1):H>=X&&(te=G)}if(ee.initialized&&te!==we){if(!ee.allowSlideNext&&(be?Te>ee.translate&&Te>ee.minTranslate():Te<ee.translate&&Te<ee.minTranslate()))return!1;if(!ee.allowSlidePrev&&Te>ee.translate&&Te>ee.maxTranslate()&&(we||0)!==te)return!1}let Me;if(te!==(ve||0)&&X&&ee.emit("beforeSlideChangeStart"),ee.updateProgress(Te),Me=te>we?"next":te<we?"prev":"reset",be&&-Te===ee.translate||!be&&Te===ee.translate)return ee.updateActiveIndex(te),he.autoHeight&&ee.updateAutoHeight(),ee.updateSlidesClasses(),"slide"!==he.effect&&ee.setTranslate(Te),"reset"!==Me&&(ee.transitionStart(X,Me),ee.transitionEnd(X,Me)),!1;if(he.cssMode){const G=ee.isHorizontal(),X=be?Te:-Te;if(0===H){const H=ee.virtual&&ee.params.virtual.enabled;H&&(ee.wrapperEl.style.scrollSnapType="none",ee._immediateVirtual=!0),H&&!ee._cssModeVirtualInitialSet&&ee.params.initialSlide>0?(ee._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{ye[G?"scrollLeft":"scrollTop"]=X})):ye[G?"scrollLeft":"scrollTop"]=X,H&&requestAnimationFrame(()=>{ee.wrapperEl.style.scrollSnapType="",ee._immediateVirtual=!1})}else{if(!ee.support.smoothScroll)return m({swiper:ee,targetPosition:X,side:G?"left":"top"}),!0;ye.scrollTo({[G?"left":"top"]:X,behavior:"smooth"})}return!0}return ee.setTransition(H),ee.setTranslate(Te),ee.updateActiveIndex(te),ee.updateSlidesClasses(),ee.emit("beforeTransitionStart",H,Y),ee.transitionStart(X,Me),0===H?ee.transitionEnd(X,Me):ee.animating||(ee.animating=!0,ee.onSlideToWrapperTransitionEnd||(ee.onSlideToWrapperTransitionEnd=function(G){ee&&!ee.destroyed&&G.target===this&&(ee.wrapperEl.removeEventListener("transitionend",ee.onSlideToWrapperTransitionEnd),ee.onSlideToWrapperTransitionEnd=null,delete ee.onSlideToWrapperTransitionEnd,ee.transitionEnd(X,Me))}),ee.wrapperEl.addEventListener("transitionend",ee.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(G,H,X,Y){void 0===G&&(G=0),void 0===X&&(X=!0),"string"==typeof G&&(G=parseInt(G,10));const Q=this;if(Q.destroyed)return;void 0===H&&(H=Q.params.speed);const ee=Q.grid&&Q.params.grid&&Q.params.grid.rows>1;let te=G;if(Q.params.loop)if(Q.virtual&&Q.params.virtual.enabled)te+=Q.virtual.slidesBefore;else{let G;if(ee){const H=te*Q.params.grid.rows;G=Q.slides.filter(G=>1*G.getAttribute("data-swiper-slide-index")===H)[0].column}else G=Q.getSlideIndexByData(te);const H=ee?Math.ceil(Q.slides.length/Q.params.grid.rows):Q.slides.length,{centeredSlides:X}=Q.params;let he=Q.params.slidesPerView;"auto"===he?he=Q.slidesPerViewDynamic():(he=Math.ceil(parseFloat(Q.params.slidesPerView,10)),X&&he%2==0&&(he+=1));let fe=H-G<he;if(X&&(fe=fe||G<Math.ceil(he/2)),Y&&X&&"auto"!==Q.params.slidesPerView&&!ee&&(fe=!1),fe){const Y=X?G<Q.activeIndex?"prev":"next":G-Q.activeIndex-1<Q.params.slidesPerView?"next":"prev";Q.loopFix({direction:Y,slideTo:!0,activeSlideIndex:"next"===Y?G+1:G-H+1,slideRealIndex:"next"===Y?Q.realIndex:void 0})}if(ee){const G=te*Q.params.grid.rows;te=Q.slides.filter(H=>1*H.getAttribute("data-swiper-slide-index")===G)[0].column}else te=Q.getSlideIndexByData(te)}return requestAnimationFrame(()=>{Q.slideTo(te,H,X,Y)}),Q},slideNext:function(G,H,X){void 0===H&&(H=!0);const Y=this,{enabled:Q,params:ee,animating:te}=Y;if(!Q||Y.destroyed)return Y;void 0===G&&(G=Y.params.speed);let he=ee.slidesPerGroup;"auto"===ee.slidesPerView&&1===ee.slidesPerGroup&&ee.slidesPerGroupAuto&&(he=Math.max(Y.slidesPerViewDynamic("current",!0),1));const fe=Y.activeIndex<ee.slidesPerGroupSkip?1:he,ge=Y.virtual&&ee.virtual.enabled;if(ee.loop){if(te&&!ge&&ee.loopPreventsSliding)return!1;if(Y.loopFix({direction:"next"}),Y._clientLeft=Y.wrapperEl.clientLeft,Y.activeIndex===Y.slides.length-1&&ee.cssMode)return requestAnimationFrame(()=>{Y.slideTo(Y.activeIndex+fe,G,H,X)}),!0}return ee.rewind&&Y.isEnd?Y.slideTo(0,G,H,X):Y.slideTo(Y.activeIndex+fe,G,H,X)},slidePrev:function(G,H,X){void 0===H&&(H=!0);const Y=this,{params:Q,snapGrid:ee,slidesGrid:te,rtlTranslate:he,enabled:fe,animating:ge}=Y;if(!fe||Y.destroyed)return Y;void 0===G&&(G=Y.params.speed);const ve=Y.virtual&&Q.virtual.enabled;if(Q.loop){if(ge&&!ve&&Q.loopPreventsSliding)return!1;Y.loopFix({direction:"prev"}),Y._clientLeft=Y.wrapperEl.clientLeft}function p(G){return G<0?-Math.floor(Math.abs(G)):Math.floor(G)}const we=p(he?Y.translate:-Y.translate),be=ee.map(G=>p(G));let ye=ee[be.indexOf(we)-1];if(void 0===ye&&Q.cssMode){let G;ee.forEach((H,X)=>{we>=H&&(G=X)}),void 0!==G&&(ye=ee[G>0?G-1:G])}let Ee=0;if(void 0!==ye&&(Ee=te.indexOf(ye),Ee<0&&(Ee=Y.activeIndex-1),"auto"===Q.slidesPerView&&1===Q.slidesPerGroup&&Q.slidesPerGroupAuto&&(Ee=Ee-Y.slidesPerViewDynamic("previous",!0)+1,Ee=Math.max(Ee,0))),Q.rewind&&Y.isBeginning){const Q=Y.params.virtual&&Y.params.virtual.enabled&&Y.virtual?Y.virtual.slides.length-1:Y.slides.length-1;return Y.slideTo(Q,G,H,X)}return Q.loop&&0===Y.activeIndex&&Q.cssMode?(requestAnimationFrame(()=>{Y.slideTo(Ee,G,H,X)}),!0):Y.slideTo(Ee,G,H,X)},slideReset:function(G,H,X){void 0===H&&(H=!0);const Y=this;if(!Y.destroyed)return void 0===G&&(G=Y.params.speed),Y.slideTo(Y.activeIndex,G,H,X)},slideToClosest:function(G,H,X,Y){void 0===H&&(H=!0),void 0===Y&&(Y=.5);const Q=this;if(Q.destroyed)return;void 0===G&&(G=Q.params.speed);let ee=Q.activeIndex;const te=Math.min(Q.params.slidesPerGroupSkip,ee),he=te+Math.floor((ee-te)/Q.params.slidesPerGroup),fe=Q.rtlTranslate?Q.translate:-Q.translate;if(fe>=Q.snapGrid[he]){const G=Q.snapGrid[he];fe-G>(Q.snapGrid[he+1]-G)*Y&&(ee+=Q.params.slidesPerGroup)}else{const G=Q.snapGrid[he-1];fe-G<=(Q.snapGrid[he]-G)*Y&&(ee-=Q.params.slidesPerGroup)}return ee=Math.max(ee,0),ee=Math.min(ee,Q.slidesGrid.length-1),Q.slideTo(ee,G,H,X)},slideToClickedSlide:function(){const G=this;if(G.destroyed)return;const{params:H,slidesEl:X}=G,Y="auto"===H.slidesPerView?G.slidesPerViewDynamic():H.slidesPerView;let Q,ee=G.clickedIndex;const te=G.isElement?"swiper-slide":`.${H.slideClass}`;if(H.loop){if(G.animating)return;Q=parseInt(G.clickedSlide.getAttribute("data-swiper-slide-index"),10),H.centeredSlides?ee<G.loopedSlides-Y/2||ee>G.slides.length-G.loopedSlides+Y/2?(G.loopFix(),ee=G.getSlideIndex(f(X,`${te}[data-swiper-slide-index="${Q}"]`)[0]),l(()=>{G.slideTo(ee)})):G.slideTo(ee):ee>G.slides.length-Y?(G.loopFix(),ee=G.getSlideIndex(f(X,`${te}[data-swiper-slide-index="${Q}"]`)[0]),l(()=>{G.slideTo(ee)})):G.slideTo(ee)}else G.slideTo(ee)}},ge={loopCreate:function(G){const H=this,{params:X,slidesEl:Y}=H;if(!X.loop||H.virtual&&H.params.virtual.enabled)return;const i=()=>{f(Y,`.${X.slideClass}, swiper-slide`).forEach((G,H)=>{G.setAttribute("data-swiper-slide-index",H)})},Q=H.grid&&X.grid&&X.grid.rows>1,ee=X.slidesPerGroup*(Q?X.grid.rows:1),te=H.slides.length%ee!=0,he=Q&&H.slides.length%X.grid.rows!=0,d=G=>{for(let Y=0;Y<G;Y+=1){const G=H.isElement?v("swiper-slide",[X.slideBlankClass]):v("div",[X.slideClass,X.slideBlankClass]);H.slidesEl.append(G)}};te?(X.loopAddBlankSlides?(d(ee-H.slides.length%ee),H.recalcSlides(),H.updateSlides()):g(),i()):he?(X.loopAddBlankSlides?(d(X.grid.rows-H.slides.length%X.grid.rows),H.recalcSlides(),H.updateSlides()):g(),i()):i(),H.loopFix({slideRealIndex:G,direction:X.centeredSlides?void 0:"next"})},loopFix:function(G){let{slideRealIndex:H,slideTo:X=!0,direction:Y,setTranslate:Q,activeSlideIndex:ee,byController:te,byMousewheel:he}=void 0===G?{}:G;const fe=this;if(!fe.params.loop)return;fe.emit("beforeLoopFix");const{slides:ge,allowSlidePrev:ve,allowSlideNext:we,slidesEl:be,params:ye}=fe,{centeredSlides:Ee}=ye;if(fe.allowSlidePrev=!0,fe.allowSlideNext=!0,fe.virtual&&ye.virtual.enabled)return X&&(ye.centeredSlides||0!==fe.snapIndex?ye.centeredSlides&&fe.snapIndex<ye.slidesPerView?fe.slideTo(fe.virtual.slides.length+fe.snapIndex,0,!1,!0):fe.snapIndex===fe.snapGrid.length-1&&fe.slideTo(fe.virtual.slidesBefore,0,!1,!0):fe.slideTo(fe.virtual.slides.length,0,!1,!0)),fe.allowSlidePrev=ve,fe.allowSlideNext=we,void fe.emit("loopFix");let xe=ye.slidesPerView;"auto"===xe?xe=fe.slidesPerViewDynamic():(xe=Math.ceil(parseFloat(ye.slidesPerView,10)),Ee&&xe%2==0&&(xe+=1));const Se=ye.slidesPerGroupAuto?xe:ye.slidesPerGroup;let Te=Se;Te%Se!=0&&(Te+=Se-Te%Se),Te+=ye.loopAdditionalSlides,fe.loopedSlides=Te;const Me=fe.grid&&ye.grid&&ye.grid.rows>1;(ge.length<xe+Te||Me&&"row"===ye.grid.fill)&&g();const Ce=[],Pe=[];let Le=fe.activeIndex;void 0===ee?ee=fe.getSlideIndex(ge.filter(G=>G.classList.contains(ye.slideActiveClass))[0]):Le=ee;const Ie="next"===Y||!Y,ze="prev"===Y||!Y;let Ae=0,$e=0;const ke=Me?Math.ceil(ge.length/ye.grid.rows):ge.length,Oe=(Me?ge[ee].column:ee)+(Ee&&void 0===Q?-xe/2+.5:0);if(Oe<Te){Ae=Math.max(Te-Oe,Se);for(let G=0;G<Te-Oe;G+=1){const H=G-Math.floor(G/ke)*ke;if(Me){const G=ke-H-1;for(let H=ge.length-1;H>=0;H-=1)ge[H].column===G&&Ce.push(H)}else Ce.push(ke-H-1)}}else if(Oe+xe>ke-Te){$e=Math.max(Oe-(ke-2*Te),Se);for(let G=0;G<$e;G+=1){const H=G-Math.floor(G/ke)*ke;Me?ge.forEach((G,X)=>{G.column===H&&Pe.push(X)}):Pe.push(H)}}if(fe.__preventObserver__=!0,requestAnimationFrame(()=>{fe.__preventObserver__=!1}),ze&&Ce.forEach(G=>
vendor: 4,534 bytes, line 50
50{ge[G].swiperLoopMoveDOM=!0,be.prepend(ge[G]),ge[G].swiperLoopMoveDOM=!1}),Ie&&Pe.forEach(G=>{ge[G].swiperLoopMoveDOM=!0,be.append(ge[G]),ge[G].swiperLoopMoveDOM=!1}),fe.recalcSlides(),"auto"===ye.slidesPerView?fe.updateSlides():Me&&(Ce.length>0&&ze||Pe.length>0&&Ie)&&fe.slides.forEach((G,H)=>{fe.grid.updateSlide(H,G,fe.slides)}),ye.watchSlidesProgress&&fe.updateSlidesOffset(),X)if(Ce.length>0&&ze){if(void 0===H){const G=fe.slidesGrid[Le],H=fe.slidesGrid[Le+Ae]-G;he?fe.setTranslate(fe.translate-H):(fe.slideTo(Le+Math.ceil(Ae),0,!1,!0),Q&&(fe.touchEventsData.startTranslate=fe.touchEventsData.startTranslate-H,fe.touchEventsData.currentTranslate=fe.touchEventsData.currentTranslate-H))}else if(Q){const G=Me?Ce.length/ye.grid.rows:Ce.length;fe.slideTo(fe.activeIndex+G,0,!1,!0),fe.touchEventsData.currentTranslate=fe.translate}}else if(Pe.length>0&&Ie)if(void 0===H){const G=fe.slidesGrid[Le],H=fe.slidesGrid[Le-$e]-G;he?fe.setTranslate(fe.translate-H):(fe.slideTo(Le-$e,0,!1,!0),Q&&(fe.touchEventsData.startTranslate=fe.touchEventsData.startTranslate-H,fe.touchEventsData.currentTranslate=fe.touchEventsData.currentTranslate-H))}else{const G=Me?Pe.length/ye.grid.rows:Pe.length;fe.slideTo(fe.activeIndex-G,0,!1,!0)}if(fe.allowSlidePrev=ve,fe.allowSlideNext=we,fe.controller&&fe.controller.control&&!te){const G={slideRealIndex:H,direction:Y,setTranslate:Q,activeSlideIndex:ee,byController:!0};Array.isArray(fe.controller.control)?fe.controller.control.forEach(H=>{!H.destroyed&&H.params.loop&&H.loopFix({...G,slideTo:H.params.slidesPerView===ye.slidesPerView&&X})}):fe.controller.control instanceof fe.constructor&&fe.controller.control.params.loop&&fe.controller.control.loopFix({...G,slideTo:fe.controller.control.params.slidesPerView===ye.slidesPerView&&X})}fe.emit("loopFix")},loopDestroy:function(){const G=this,{params:H,slidesEl:X}=G;if(!H.loop||G.virtual&&G.params.virtual.enabled)return;G.recalcSlides();const Y=[];G.slides.forEach(G=>{const H=void 0===G.swiperSlideIndex?1*G.getAttribute("data-swiper-slide-index"):G.swiperSlideIndex;Y[H]=G}),G.slides.forEach(G=>{G.removeAttribute("data-swiper-slide-index")}),Y.forEach(G=>{X.append(G)}),G.recalcSlides(),G.slideTo(G.realIndex,0)}};function B(G,H,X){const Y=r(),{params:Q}=G,ee=Q.edgeSwipeDetection,te=Q.edgeSwipeThreshold;return!ee||!(X<=te||X>=Y.innerWidth-te)||"prevent"===ee&&(H.preventDefault(),!0)}function R(G){const H=this,X=a();let Y=G;Y.originalEvent&&(Y=Y.originalEvent);const Q=H.touchEventsData;if("pointerdown"===Y.type){if(null!==Q.pointerId&&Q.pointerId!==Y.pointerId)return;Q.pointerId=Y.pointerId}else"touchstart"===Y.type&&1===Y.targetTouches.length&&(Q.touchId=Y.targetTouches[0].identifier);if("touchstart"===Y.type)return void B(H,Y,Y.targetTouches[0].pageX);const{params:ee,touches:te,enabled:he}=H;if(!he)return;if(!ee.simulateTouch&&"mouse"===Y.pointerType)return;if(H.animating&&ee.preventInteractionOnTransition)return;!H.animating&&ee.cssMode&&ee.loop&&H.loopFix();let fe=Y.target;if("wrapper"===ee.touchEventsTarget&&!H.wrapperEl.contains(fe))return;if("which"in Y&&3===Y.which)return;if("button"in Y&&Y.button>0)return;if(Q.isTouched&&Q.isMoved)return;const ge=!!ee.noSwipingClass&&""!==ee.noSwipingClass,ve=Y.composedPath?Y.composedPath():Y.path;ge&&Y.target&&Y.target.shadowRoot&&ve&&(fe=ve[0]);const we=ee.noSwipingSelector?ee.noSwipingSelector:`.${ee.noSwipingClass}`,be=!(!Y.target||!Y.target.shadowRoot);if(ee.noSwiping&&(be?function(G,H){return void 0===H&&(H=this),function t(H){if(!H||H===a()||H===r())return null;H.assignedSlot&&(H=H.assignedSlot);const X=H.closest(G);return X||H.getRootNode?X||t(H.getRootNode().host):null}(H)}(we,fe):fe.closest(we)))return void(H.allowClick=!0);if(ee.swipeHandler&&!fe.closest(ee.swipeHandler))return;te.currentX=Y.pageX,te.currentY=Y.pageY;const ye=te.currentX,Ee=te.currentY;if(!B(H,Y,ye))return;Object.assign(Q,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),te.startX=ye,te.startY=Ee,Q.touchStartTime=o(),H.allowClick=!0,H.updateSize(),H.swipeDirection=void 0,ee.threshold>0&&(Q.allowThresholdMove=!1);let xe=!0;fe.matches(Q.focusableElements)&&(xe=!1,"SELECT"===fe.nodeName&&(Q.isTouched=!1)),X.activeElement&&X.activeElement.matches(Q.focusableElements)&&X.activeElement!==fe&&X.activeElement.blur();const Se=xe&&H.allowTouchMove&&ee.touchStartPreventDefault;!ee.touchStartForcePreventDefault&&!Se||fe.isContentEditable||Y.preventDefault(),ee.freeMode&&ee.freeMode.enabled&&H.freeMode&&H.animating&&!ee.cssMode&&H.freeMode.onTouchStart(),H.emit
vendor: 4,719 bytes, line 50
50("touchStart",Y)}function F(G){const H=a(),X=this,Y=X.touchEventsData,{params:Q,touches:ee,rtlTranslate:te,enabled:he}=X;if(!he)return;if(!Q.simulateTouch&&"mouse"===G.pointerType)return;let fe,ge=G;if(ge.originalEvent&&(ge=ge.originalEvent),"pointermove"===ge.type){if(null!==Y.touchId)return;if(ge.pointerId!==Y.pointerId)return}if("touchmove"===ge.type){if(fe=[...ge.changedTouches].filter(G=>G.identifier===Y.touchId)[0],!fe||fe.identifier!==Y.touchId)return}else fe=ge;if(!Y.isTouched)return void(Y.startMoving&&Y.isScrolling&&X.emit("touchMoveOpposite",ge));const ve=fe.pageX,we=fe.pageY;if(ge.preventedByNestedSwiper)return ee.startX=ve,void(ee.startY=we);if(!X.allowTouchMove)return ge.target.matches(Y.focusableElements)||(X.allowClick=!1),void(Y.isTouched&&(Object.assign(ee,{startX:ve,startY:we,currentX:ve,currentY:we}),Y.touchStartTime=o()));if(Q.touchReleaseOnEdges&&!Q.loop)if(X.isVertical()){if(we<ee.startY&&X.translate<=X.maxTranslate()||we>ee.startY&&X.translate>=X.minTranslate())return Y.isTouched=!1,void(Y.isMoved=!1)}else if(ve<ee.startX&&X.translate<=X.maxTranslate()||ve>ee.startX&&X.translate>=X.minTranslate())return;if(H.activeElement&&ge.target===H.activeElement&&ge.target.matches(Y.focusableElements))return Y.isMoved=!0,void(X.allowClick=!1);Y.allowTouchCallbacks&&X.emit("touchMove",ge),ee.previousX=ee.currentX,ee.previousY=ee.currentY,ee.currentX=ve,ee.currentY=we;const be=ee.currentX-ee.startX,ye=ee.currentY-ee.startY;if(X.params.threshold&&Math.sqrt(be**2+ye**2)<X.params.threshold)return;if(void 0===Y.isScrolling){let G;X.isHorizontal()&&ee.currentY===ee.startY||X.isVertical()&&ee.currentX===ee.startX?Y.isScrolling=!1:be*be+ye*ye>=25&&(G=180*Math.atan2(Math.abs(ye),Math.abs(be))/Math.PI,Y.isScrolling=X.isHorizontal()?G>Q.touchAngle:90-G>Q.touchAngle)}if(Y.isScrolling&&X.emit("touchMoveOpposite",ge),void 0===Y.startMoving&&(ee.currentX===ee.startX&&ee.currentY===ee.startY||(Y.startMoving=!0)),Y.isScrolling||"touchmove"===ge.type&&Y.preventTouchMoveFromPointerMove)return void(Y.isTouched=!1);if(!Y.startMoving)return;X.allowClick=!1,!Q.cssMode&&ge.cancelable&&ge.preventDefault(),Q.touchMoveStopPropagation&&!Q.nested&&ge.stopPropagation();let Ee=X.isHorizontal()?be:ye,xe=X.isHorizontal()?ee.currentX-ee.previousX:ee.currentY-ee.previousY;Q.oneWayMovement&&(Ee=Math.abs(Ee)*(te?1:-1),xe=Math.abs(xe)*(te?1:-1)),ee.diff=Ee,Ee*=Q.touchRatio,te&&(Ee=-Ee,xe=-xe);const Se=X.touchesDirection;X.swipeDirection=Ee>0?"prev":"next",X.touchesDirection=xe>0?"prev":"next";const Te=X.params.loop&&!Q.cssMode,Me="next"===X.touchesDirection&&X.allowSlideNext||"prev"===X.touchesDirection&&X.allowSlidePrev;if(!Y.isMoved){if(Te&&Me&&X.loopFix({direction:X.swipeDirection}),Y.startTranslate=X.getTranslate(),X.setTransition(0),X.animating){const G=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});X.wrapperEl.dispatchEvent(G)}Y.allowMomentumBounce=!1,!Q.grabCursor||!0!==X.allowSlideNext&&!0!==X.allowSlidePrev||X.setGrabCursor(!0),X.emit("sliderFirstMove",ge)}if((new Date).getTime(),Y.isMoved&&Y.allowThresholdMove&&Se!==X.touchesDirection&&Te&&Me&&Math.abs(Ee)>=1)return Object.assign(ee,{startX:ve,startY:we,currentX:ve,currentY:we,startTranslate:Y.currentTranslate}),Y.loopSwapReset=!0,void(Y.startTranslate=Y.currentTranslate);X.emit("sliderMove",ge),Y.isMoved=!0,Y.currentTranslate=Ee+Y.startTranslate;let Ce=!0,Pe=Q.resistanceRatio;if(Q.touchReleaseOnEdges&&(Pe=0),Ee>0?(Te&&Me&&Y.allowThresholdMove&&Y.currentTranslate>(Q.centeredSlides?X.minTranslate()-X.slidesSizesGrid[X.activeIndex+1]:X.minTranslate())&&X.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),Y.currentTranslate>X.minTranslate()&&(Ce=!1,Q.resistance&&(Y.currentTranslate=X.minTranslate()-1+(-X.minTranslate()+Y.startTranslate+Ee)**Pe))):Ee<0&&(Te&&Me&&Y.allowThresholdMove&&Y.currentTranslate<(Q.centeredSlides?X.maxTranslate()+X.slidesSizesGrid[X.slidesSizesGrid.length-1]:X.maxTranslate())&&X.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:X.slides.length-("auto"===Q.slidesPerView?X.slidesPerViewDynamic():Math.ceil(parseFloat(Q.slidesPerView,10)))}),Y.currentTranslate<X.maxTranslate()&&(Ce=!1,Q.resistance&&(Y.currentTranslate=X.maxTranslate()+1-(X.maxTranslate()-Y.startTranslate-Ee)**Pe))),Ce&&(ge.preventedByNestedSwiper=!0),!X.allowSlideNext&&"next"===X.swipeDirection&&Y.currentTranslate<Y.startTranslate&&(Y.currentTranslate=Y.startTranslate),!X.allowSlidePrev&&"prev"===X.swipeDirection&&Y.currentTranslate>Y.startTranslate&&(Y.currentTranslate=Y.startTranslate),X.allowSlidePrev||X.allowSlideNext||(Y.currentTranslate=Y.startTranslate),Q.threshold>0){if(!(Math.abs(Ee)>Q.threshold||Y.allowThresholdMove))return void(Y.currentTranslate=Y.startTranslate);
vendor: 4,894 bytes, line 50
50if(!Y.allowThresholdMove)return Y.allowThresholdMove=!0,ee.startX=ee.currentX,ee.startY=ee.currentY,Y.currentTranslate=Y.startTranslate,void(ee.diff=X.isHorizontal()?ee.currentX-ee.startX:ee.currentY-ee.startY)}Q.followFinger&&!Q.cssMode&&((Q.freeMode&&Q.freeMode.enabled&&X.freeMode||Q.watchSlidesProgress)&&(X.updateActiveIndex(),X.updateSlidesClasses()),Q.freeMode&&Q.freeMode.enabled&&X.freeMode&&X.freeMode.onTouchMove(),X.updateProgress(Y.currentTranslate),X.setTranslate(Y.currentTranslate))}function q(G){const H=this,X=H.touchEventsData;let Y,Q=G;if(Q.originalEvent&&(Q=Q.originalEvent),"touchend"===Q.type||"touchcancel"===Q.type){if(Y=[...Q.changedTouches].filter(G=>G.identifier===X.touchId)[0],!Y||Y.identifier!==X.touchId)return}else{if(null!==X.touchId)return;if(Q.pointerId!==X.pointerId)return;Y=Q}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(Q.type)&&(!["pointercancel","contextmenu"].includes(Q.type)||!H.browser.isSafari&&!H.browser.isWebView))return;X.pointerId=null,X.touchId=null;const{params:ee,touches:te,rtlTranslate:he,slidesGrid:fe,enabled:ge}=H;if(!ge)return;if(!ee.simulateTouch&&"mouse"===Q.pointerType)return;if(X.allowTouchCallbacks&&H.emit("touchEnd",Q),X.allowTouchCallbacks=!1,!X.isTouched)return X.isMoved&&ee.grabCursor&&H.setGrabCursor(!1),X.isMoved=!1,void(X.startMoving=!1);ee.grabCursor&&X.isMoved&&X.isTouched&&(!0===H.allowSlideNext||!0===H.allowSlidePrev)&&H.setGrabCursor(!1);const ve=o(),we=ve-X.touchStartTime;if(H.allowClick){const G=Q.path||Q.composedPath&&Q.composedPath();H.updateClickedSlide(G&&G[0]||Q.target,G),H.emit("tap click",Q),we<300&&ve-X.lastClickTime<300&&H.emit("doubleTap doubleClick",Q)}if(X.lastClickTime=o(),l(()=>{H.destroyed||(H.allowClick=!0)}),!X.isTouched||!X.isMoved||!H.swipeDirection||0===te.diff&&!X.loopSwapReset||X.currentTranslate===X.startTranslate&&!X.loopSwapReset)return X.isTouched=!1,X.isMoved=!1,void(X.startMoving=!1);let be;if(X.isTouched=!1,X.isMoved=!1,X.startMoving=!1,be=ee.followFinger?he?H.translate:-H.translate:-X.currentTranslate,ee.cssMode)return;if(ee.freeMode&&ee.freeMode.enabled)return void H.freeMode.onTouchEnd({currentPos:be});const ye=be>=-H.maxTranslate()&&!H.params.loop;let Ee=0,xe=H.slidesSizesGrid[0];for(let G=0;G<fe.length;G+=G<ee.slidesPerGroupSkip?1:ee.slidesPerGroup){const H=G<ee.slidesPerGroupSkip-1?1:ee.slidesPerGroup;void 0!==fe[G+H]?(ye||be>=fe[G]&&be<fe[G+H])&&(Ee=G,xe=fe[G+H]-fe[G]):(ye||be>=fe[G])&&(Ee=G,xe=fe[fe.length-1]-fe[fe.length-2])}let Se=null,Te=null;ee.rewind&&(H.isBeginning?Te=ee.virtual&&ee.virtual.enabled&&H.virtual?H.virtual.slides.length-1:H.slides.length-1:H.isEnd&&(Se=0));const Me=(be-fe[Ee])/xe,Ce=Ee<ee.slidesPerGroupSkip-1?1:ee.slidesPerGroup;if(we>ee.longSwipesMs){if(!ee.longSwipes)return void H.slideTo(H.activeIndex);"next"===H.swipeDirection&&(Me>=ee.longSwipesRatio?H.slideTo(ee.rewind&&H.isEnd?Se:Ee+Ce):H.slideTo(Ee)),"prev"===H.swipeDirection&&(Me>1-ee.longSwipesRatio?H.slideTo(Ee+Ce):null!==Te&&Me<0&&Math.abs(Me)>ee.longSwipesRatio?H.slideTo(Te):H.slideTo(Ee))}else{if(!ee.shortSwipes)return void H.slideTo(H.activeIndex);!H.navigation||Q.target!==H.navigation.nextEl&&Q.target!==H.navigation.prevEl?("next"===H.swipeDirection&&H.slideTo(null!==Se?Se:Ee+Ce),"prev"===H.swipeDirection&&H.slideTo(null!==Te?Te:Ee)):Q.target===H.navigation.nextEl?H.slideTo(Ee+Ce):H.slideTo(Ee)}}function V(){const G=this,{params:H,el:X}=G;if(X&&0===X.offsetWidth)return;H.breakpoints&&G.setBreakpoint();const{allowSlideNext:Y,allowSlidePrev:Q,snapGrid:ee}=G,te=G.virtual&&G.params.virtual.enabled;G.allowSlideNext=!0,G.allowSlidePrev=!0,G.updateSize(),G.updateSlides(),G.updateSlidesClasses();const he=te&&H.loop;!("auto"===H.slidesPerView||H.slidesPerView>1)||!G.isEnd||G.isBeginning||G.params.centeredSlides||he?G.params.loop&&!te?G.slideToLoop(G.realIndex,0,!1,!0):G.slideTo(G.activeIndex,0,!1,!0):G.slideTo(G.slides.length-1,0,!1,!0),G.autoplay&&G.autoplay.running&&G.autoplay.paused&&(clearTimeout(G.autoplay.resizeTimeout),G.autoplay.resizeTimeout=setTimeout(()=>{G.autoplay&&G.autoplay.running&&G.autoplay.paused&&G.autoplay.resume()},500)),G.allowSlidePrev=Q,G.allowSlideNext=Y,G.params.watchOverflow&&ee!==G.snapGrid&&G.checkOverflow()}function _(G){const H=this;H.enabled&&(H.allowClick||(H.params.preventClicks&&G.preventDefault(),H.params.preventClicksPropagation&&H.animating&&(G.stopPropagation(),G.stopImmediatePropagation())))}function W(){const G=this,{wrapperEl:H,rtlTranslate:X,enabled:Y}=G;if(!Y)return;let Q;G.previousTranslate=G.translate,G.isHorizontal()?G.translate=-H.scrollLeft:G.translate=-H.scrollTop,0===G.translate&&(G.translate=0),G.updateActiveIndex(),G.updateSlidesClasses();const ee=G.maxTranslate()-G.minTranslate();Q=0===ee?0:(G.translate-G.minTranslate())/ee,Q!==G.progress&&G.updateProgress(X?-G.translate:G.translate),G.emit("setTranslate",G.translate,!1)}function j(G){const H=this;
vendor: 5,453 bytes, line 50
50k(H,G.target),H.params.cssMode||"auto"!==H.params.slidesPerView&&!H.params.autoHeight||H.update()}function U(){const G=this;G.documentTouchHandlerProceeded||(G.documentTouchHandlerProceeded=!0,G.params.touchReleaseOnEdges&&(G.el.style.touchAction="auto"))}const K=(G,H)=>{const X=a(),{params:Y,el:Q,wrapperEl:ee,device:te}=G,he=!!Y.nested,fe="on"===H?"addEventListener":"removeEventListener",ge=H;X[fe]("touchstart",G.onDocumentTouchStart,{passive:!1,capture:he}),Q[fe]("touchstart",G.onTouchStart,{passive:!1}),Q[fe]("pointerdown",G.onTouchStart,{passive:!1}),X[fe]("touchmove",G.onTouchMove,{passive:!1,capture:he}),X[fe]("pointermove",G.onTouchMove,{passive:!1,capture:he}),X[fe]("touchend",G.onTouchEnd,{passive:!0}),X[fe]("pointerup",G.onTouchEnd,{passive:!0}),X[fe]("pointercancel",G.onTouchEnd,{passive:!0}),X[fe]("touchcancel",G.onTouchEnd,{passive:!0}),X[fe]("pointerout",G.onTouchEnd,{passive:!0}),X[fe]("pointerleave",G.onTouchEnd,{passive:!0}),X[fe]("contextmenu",G.onTouchEnd,{passive:!0}),(Y.preventClicks||Y.preventClicksPropagation)&&Q[fe]("click",G.onClick,!0),Y.cssMode&&ee[fe]("scroll",G.onScroll),Y.updateOnWindowResize?G[ge](te.ios||te.android?"resize orientationchange observerUpdate":"resize observerUpdate",V,!0):G[ge]("observerUpdate",V,!0),Q[fe]("load",G.onLoad,{capture:!0})},Z=(G,H)=>G.grid&&H.grid&&H.grid.rows>1;var ve={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function J(G,H){return function(X){void 0===X&&(X={});const Y=Object.keys(X)[0],Q=X[Y];"object"==typeof Q&&null!==Q?(!0===G[Y]&&(G[Y]={enabled:!0}),"navigation"===Y&&G[Y]&&G[Y].enabled&&!G[Y].prevEl&&!G[Y].nextEl&&(G[Y].auto=!0),["pagination","scrollbar"].indexOf(Y)>=0&&G[Y]&&G[Y].enabled&&!G[Y].el&&(G[Y].auto=!0),Y in G&&"enabled"in Q?("object"!=typeof G[Y]||"enabled"in G[Y]||(G[Y].enabled=!0),G[Y]||(G[Y]={enabled:!1}),p(H,X)):p(H,X)):p(H,X)}}const we={eventsEmitter:ee,update:te,translate:he,transition:{setTransition:function(G,H){const X=this;X.params.cssMode||(X.wrapperEl.style.transitionDuration=`${G}ms`,X.wrapperEl.style.transitionDelay=0===G?"0ms":""),X.emit("setTransition",G,H)},transitionStart:function(G,H){void 0===G&&(G=!0);const X=this,{params:Y}=X;Y.cssMode||(Y.autoHeight&&X.updateAutoHeight(),N({swiper:X,runCallbacks:G,direction:H,step:"Start"}))},transitionEnd:function(G,H){void 0===G&&(G=!0);const X=this,{params:Y}=X;X.animating=!1,Y.cssMode||(X.setTransition(0),N({swiper:X,runCallbacks:G,direction:H,step:"End"}))}},slide:fe,loop:ge,grabCursor:{setGrabCursor:function(G){const H=this;if(!H.params.simulateTouch||H.params.watchOverflow&&H.isLocked||H.params.cssMode)return;const X="container"===H.params.touchEventsTarget?H.el:H.wrapperEl;H.isElement&&(H.__preventObserver__=!0),X.style.cursor="move",X.style.cursor=G?"grabbing":"grab",H.isElement&&requestAnimationFrame(()=>{H.__preventObserver__=!1})},unsetGrabCursor:function(){const G=this;G.params.watchOverflow&&G.isLocked||G.params.cssMode||(G.isElement&&(G.__preventObserver__=!0),G["container"===G.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",G.isElement&&requestAnimationFrame(()=>{G.__preventObserver__=!1}))}},events:{attachEvents:function(){const G=this,{params:H}=G;G.onTouchStart=R.bind(G),G.onTouchMove=F.bind(G),G.onTouchEnd=q.bind(G),G.onDocumentTouchStart=U.bind(G),H.cssMode&&(G.onScroll=W.bind(G)),G.onClick=_.bind(G),G.onLoad=j.bind(G),K(G,"on")},detachEvents:function(){K(this,"off")}},breakpoints:{setBreakpoint:function(){const G=this,{realIndex:H,initialized:X,params:Y,el:Q}=G,ee=Y.breakpoints;if(!ee||ee&&0===Object.keys(ee).length)return;
vendor: 8,721 bytes, line 50
50const te=G.getBreakpoint(ee,G.params.breakpointsBase,G.el);if(!te||G.currentBreakpoint===te)return;const he=(te in ee?ee[te]:void 0)||G.originalParams,fe=Z(G,Y),ge=Z(G,he),ve=G.params.grabCursor,we=he.grabCursor,be=Y.enabled;fe&&!ge?(Q.classList.remove(`${Y.containerModifierClass}grid`,`${Y.containerModifierClass}grid-column`),G.emitContainerClasses()):!fe&&ge&&(Q.classList.add(`${Y.containerModifierClass}grid`),(he.grid.fill&&"column"===he.grid.fill||!he.grid.fill&&"column"===Y.grid.fill)&&Q.classList.add(`${Y.containerModifierClass}grid-column`),G.emitContainerClasses()),ve&&!we?G.unsetGrabCursor():!ve&&we&&G.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(H=>{if(void 0===he[H])return;const X=Y[H]&&Y[H].enabled,Q=he[H]&&he[H].enabled;X&&!Q&&G[H].disable(),!X&&Q&&G[H].enable()});const ye=he.direction&&he.direction!==Y.direction,Ee=Y.loop&&(he.slidesPerView!==Y.slidesPerView||ye),xe=Y.loop;ye&&X&&G.changeDirection(),p(G.params,he);const Se=G.params.enabled,Te=G.params.loop;Object.assign(G,{allowTouchMove:G.params.allowTouchMove,allowSlideNext:G.params.allowSlideNext,allowSlidePrev:G.params.allowSlidePrev}),be&&!Se?G.disable():!be&&Se&&G.enable(),G.currentBreakpoint=te,G.emit("_beforeBreakpoint",he),X&&(Ee?(G.loopDestroy(),G.loopCreate(H),G.updateSlides()):!xe&&Te?(G.loopCreate(H),G.updateSlides()):xe&&!Te&&G.loopDestroy()),G.emit("breakpoint",he)},getBreakpoint:function(G,H,X){if(void 0===H&&(H="window"),!G||"container"===H&&!X)return;let Y=!1;const Q=r(),ee="window"===H?Q.innerHeight:X.clientHeight,te=Object.keys(G).map(G=>{if("string"==typeof G&&0===G.indexOf("@")){const H=parseFloat(G.substr(1));return{value:ee*H,point:G}}return{value:G,point:G}});te.sort((G,H)=>parseInt(G.value,10)-parseInt(H.value,10));for(let G=0;G<te.length;G+=1){const{point:ee,value:he}=te[G];"window"===H?Q.matchMedia(`(min-width: ${he}px)`).matches&&(Y=ee):he<=X.clientWidth&&(Y=ee)}return Y||"max"}},checkOverflow:{checkOverflow:function(){const G=this,{isLocked:H,params:X}=G,{slidesOffsetBefore:Y}=X;if(Y){const H=G.slides.length-1,X=G.slidesGrid[H]+G.slidesSizesGrid[H]+2*Y;G.isLocked=G.size>X}else G.isLocked=1===G.snapGrid.length;!0===X.allowSlideNext&&(G.allowSlideNext=!G.isLocked),!0===X.allowSlidePrev&&(G.allowSlidePrev=!G.isLocked),H&&H!==G.isLocked&&(G.isEnd=!1),H!==G.isLocked&&G.emit(G.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const G=this,{classNames:H,params:X,rtl:Y,el:Q,device:ee}=G,te=function(G,H){const X=[];return G.forEach(G=>{"object"==typeof G?Object.keys(G).forEach(Y=>{G[Y]&&X.push(H+Y)}):"string"==typeof G&&X.push(H+G)}),X}(["initialized",X.direction,{"free-mode":G.params.freeMode&&X.freeMode.enabled},{autoheight:X.autoHeight},{rtl:Y},{grid:X.grid&&X.grid.rows>1},{"grid-column":X.grid&&X.grid.rows>1&&"column"===X.grid.fill},{android:ee.android},{ios:ee.ios},{"css-mode":X.cssMode},{centered:X.cssMode&&X.centeredSlides},{"watch-progress":X.watchSlidesProgress}],X.containerModifierClass);H.push(...te),Q.classList.add(...H),G.emitContainerClasses()},removeClasses:function(){const{el:G,classNames:H}=this;G.classList.remove(...H),this.emitContainerClasses()}}},be={};class se{constructor(){let G,H;for(var X=arguments.length,Y=new Array(X),Q=0;Q<X;Q++)Y[Q]=arguments[Q];1===Y.length&&Y[0].constructor&&"Object"===Object.prototype.toString.call(Y[0]).slice(8,-1)?H=Y[0]:[G,H]=Y,H||(H={}),H=p({},H),G&&!H.el&&(H.el=G);const ee=a();if(H.el&&"string"==typeof H.el&&ee.querySelectorAll(H.el).length>1){const G=[];return ee.querySelectorAll(H.el).forEach(X=>{const Y=p({},H,{el:X});G.push(new se(Y))}),G}const te=this;te.__swiper__=!0,te.support=L(),te.device=I({userAgent:H.userAgent}),te.browser=z(),te.eventsListeners={},te.eventsAnyListeners=[],te.modules=[...te.__modules__],H.modules&&Array.isArray(H.modules)&&te.modules.push(...H.modules);const he={};te.modules.forEach(G=>{G({params:H,swiper:te,extendParams:J(H,he),on:te.on.bind(te),once:te.once.bind(te),off:te.off.bind(te),emit:te.emit.bind(te)})});const fe=p({},ve,he);return te.params=p({},fe,be,H),te.originalParams=p({},te.params),te.passedParams=p({},H),te.params&&te.params.on&&Object.keys(te.params.on).forEach(G=>{te.on(G,te.params.on[G])}),te.params&&te.params.onAny&&te.onAny(te.params.onAny),Object.assign(te,{enabled:te.params.enabled,el:G,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===te.params.direction,isVertical:()=>"vertical"===te.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:te.params.allowSlideNext,allowSlidePrev:te.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:te.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:te.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),te.emit("_swiper"),te.params.init&&te.init(),te}getDirectionLabel(G){return this.isHorizontal()?G:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[G]}getSlideIndex(G){const{slidesEl:H,params:X}=this,Y=y(f(H,`.${X.slideClass}, swiper-slide`)[0]);return y(G)-Y}getSlideIndexByData(G){return this.getSlideIndex(this.slides.filter(H=>1*H.getAttribute("data-swiper-slide-index")===G)[0])}recalcSlides(){const{slidesEl:G,params:H}=this;this.slides=f(G,`.${H.slideClass}, swiper-slide`)}enable(){const G=this;G.enabled||(G.enabled=!0,G.params.grabCursor&&G.setGrabCursor(),G.emit("enable"))}disable(){const G=this;G.enabled&&(G.enabled=!1,G.params.grabCursor&&G.unsetGrabCursor(),G.emit("disable"))}setProgress(G,H){const X=this;G=Math.min(Math.max(G,0),1);const Y=X.minTranslate(),Q=(X.maxTranslate()-Y)*G+Y;X.translateTo(Q,void 0===H?0:H),X.updateActiveIndex(),X.updateSlidesClasses()}emitContainerClasses(){const G=this;if(!G.params._emitClasses||!G.el)return;const H=G.el.className.split(" ").filter(H=>0===H.indexOf("swiper")||0===H.indexOf(G.params.containerModifierClass));G.emit("_containerClasses",H.join(" "))}getSlideClasses(G){const H=this;return H.destroyed?"":G.className.split(" ").filter(G=>0===G.indexOf("swiper-slide")||0===G.indexOf(H.params.slideClass)).join(" ")}emitSlidesClasses(){const G=this;if(!G.params._emitClasses||!G.el)return;const H=[];G.slides.forEach(X=>{const Y=G.getSlideClasses(X);H.push({slideEl:X,classNames:Y}),G.emit("_slideClass",X,Y)}),G.emit("_slideClasses",H)}slidesPerViewDynamic(G,H){void 0===G&&(G="current"),void 0===H&&(H=!1);const{params:X,slides:Y,slidesGrid:Q,slidesSizesGrid:ee,size:te,activeIndex:he}=this;let fe=1;if("number"==typeof X.slidesPerView)return X.slidesPerView;if(X.centeredSlides){let G,H=Y[he]?Math.ceil(Y[he].swiperSlideSize):0;for(let X=he+1;X<Y.length;X+=1)Y[X]&&!G&&(H+=Math.ceil(Y[X].swiperSlideSize),fe+=1,H>te&&(G=!0));for(let X=he-1;X>=0;X-=1)Y[X]&&!G&&(H+=Y[X].swiperSlideSize,fe+=1,H>te&&(G=!0))}else if("current"===G)for(let G=he+1;G<Y.length;G+=1)(H?Q[G]+ee[G]-Q[he]<te:Q[G]-Q[he]<te)&&(fe+=1);else for(let G=he-1;G>=0;G-=1)Q[he]-Q[G]<te&&(fe+=1);return fe}update(){const G=this;if(!G||G.destroyed)return;const{snapGrid:H,params:X}=G;function a(){const H=G.rtlTranslate?-1*G.translate:G.translate,X=Math.min(Math.max(H,G.maxTranslate()),G.minTranslate());G.setTranslate(X),G.updateActiveIndex(),G.updateSlidesClasses()}let Y;if(X.breakpoints&&G.setBreakpoint(),[...G.el.querySelectorAll('[loading="lazy"]')].forEach(H=>{H.complete&&k(G,H)}),G.updateSize(),G.updateSlides(),G.updateProgress(),G.updateSlidesClasses(),X.freeMode&&X.freeMode.enabled&&!X.cssMode)a(),X.autoHeight&&G.updateAutoHeight();else{if(("auto"===X.slidesPerView||X.slidesPerView>1)&&G.isEnd&&!X.centeredSlides){const H=G.virtual&&X.virtual.enabled?G.virtual.slides:G.slides;Y=G.slideTo(H.length-1,0,!1,!0)}else Y=G.slideTo(G.activeIndex,0,!1,!0);Y||a()}X.watchOverflow&&H!==G.snapGrid&&G.checkOverflow(),G.emit("update")}changeDirection(G,H){void 0===H&&(H=!0);const X=this,Y=X.params.direction;return G||(G="horizontal"===Y?"vertical":"horizontal"),G===Y||"horizontal"!==G&&"vertical"!==G||(X.el.classList.remove(`${X.params.containerModifierClass}${Y}`),X.el.classList.add(`${X.params.containerModifierClass}${G}`),X.emitContainerClasses(),X.params.direction=G,X.slides.forEac
vendor: 6,272 bytes, line 50
50h(H=>{"vertical"===G?H.style.width="":H.style.height=""}),X.emit("changeDirection"),H&&X.update()),X}changeLanguageDirection(G){const H=this;H.rtl&&"rtl"===G||!H.rtl&&"ltr"===G||(H.rtl="rtl"===G,H.rtlTranslate="horizontal"===H.params.direction&&H.rtl,H.rtl?(H.el.classList.add(`${H.params.containerModifierClass}rtl`),H.el.dir="rtl"):(H.el.classList.remove(`${H.params.containerModifierClass}rtl`),H.el.dir="ltr"),H.update())}mount(G){const H=this;if(H.mounted)return!0;let X=G||H.params.el;if("string"==typeof X&&(X=document.querySelector(X)),!X)return!1;X.swiper=H,X.parentNode&&X.parentNode.host&&X.parentNode.host.nodeName===H.params.swiperElementNodeName.toUpperCase()&&(H.isElement=!0);const a=()=>`.${(H.params.wrapperClass||"").trim().split(" ").join(".")}`;let Y=X&&X.shadowRoot&&X.shadowRoot.querySelector?X.shadowRoot.querySelector(a()):f(X,a())[0];return!Y&&H.params.createElements&&(Y=v("div",H.params.wrapperClass),X.append(Y),f(X,`.${H.params.slideClass}`).forEach(G=>{Y.append(G)})),Object.assign(H,{el:X,wrapperEl:Y,slidesEl:H.isElement&&!X.parentNode.host.slideSlots?X.parentNode.host:Y,hostEl:H.isElement?X.parentNode.host:X,mounted:!0,rtl:"rtl"===X.dir.toLowerCase()||"rtl"===b(X,"direction"),rtlTranslate:"horizontal"===H.params.direction&&("rtl"===X.dir.toLowerCase()||"rtl"===b(X,"direction")),wrongRTL:"-webkit-box"===b(Y,"display")}),!0}init(G){const H=this;if(H.initialized)return H;if(!1===H.mount(G))return H;H.emit("beforeInit"),H.params.breakpoints&&H.setBreakpoint(),H.addClasses(),H.updateSize(),H.updateSlides(),H.params.watchOverflow&&H.checkOverflow(),H.params.grabCursor&&H.enabled&&H.setGrabCursor(),H.params.loop&&H.virtual&&H.params.virtual.enabled?H.slideTo(H.params.initialSlide+H.virtual.slidesBefore,0,H.params.runCallbacksOnInit,!1,!0):H.slideTo(H.params.initialSlide,0,H.params.runCallbacksOnInit,!1,!0),H.params.loop&&H.loopCreate(),H.attachEvents();const X=[...H.el.querySelectorAll('[loading="lazy"]')];return H.isElement&&X.push(...H.hostEl.querySelectorAll('[loading="lazy"]')),X.forEach(G=>{G.complete?k(H,G):G.addEventListener("load",G=>{k(H,G.target)})}),D(H),H.initialized=!0,D(H),H.emit("init"),H.emit("afterInit"),H}destroy(G,H){void 0===G&&(G=!0),void 0===H&&(H=!0);const X=this,{params:Y,el:Q,wrapperEl:ee,slides:te}=X;return void 0===X.params||X.destroyed||(X.emit("beforeDestroy"),X.initialized=!1,X.detachEvents(),Y.loop&&X.loopDestroy(),H&&(X.removeClasses(),Q.removeAttribute("style"),ee.removeAttribute("style"),te&&te.length&&te.forEach(G=>{G.classList.remove(Y.slideVisibleClass,Y.slideFullyVisibleClass,Y.slideActiveClass,Y.slideNextClass,Y.slidePrevClass),G.removeAttribute("style"),G.removeAttribute("data-swiper-slide-index")})),X.emit("destroy"),Object.keys(X.eventsListeners).forEach(G=>{X.off(G)}),!1!==G&&(X.el.swiper=null,function(G){const H=G;Object.keys(H).forEach(G=>{try{H[G]=null}catch(G){}try{delete H[G]}catch(G){}})}(X)),X.destroyed=!0),null}static extendDefaults(G){p(be,G)}static get extendedDefaults(){return be}static get defaults(){return ve}static installModule(G){se.prototype.__modules__||(se.prototype.__modules__=[]);const H=se.prototype.__modules__;"function"==typeof G&&H.indexOf(G)<0&&H.push(G)}static use(G){return Array.isArray(G)?(G.forEach(G=>se.installModule(G)),se):(se.installModule(G),se)}}function ae(G,H,X,Y){return G.params.createElements&&Object.keys(Y).forEach(Q=>{if(!X[Q]&&!0===X.auto){let ee=f(G.el,`.${Y[Q]}`)[0];ee||(ee=v("div",Y[Q]),ee.className=Y[Q],G.el.append(ee)),X[Q]=ee,H[Q]=ee}}),X}function ie(G){return void 0===G&&(G=""),`.${G.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function re(G){const H=this,{params:X,slidesEl:Y}=H;X.loop&&H.loopDestroy();const i=G=>{if("string"==typeof G){const H=document.createElement("div");H.innerHTML=G,Y.append(H.children[0]),H.innerHTML=""}else Y.append(G)};if("object"==typeof G&&"length"in G)for(let H=0;H<G.length;H+=1)G[H]&&i(G[H]);else i(G);H.recalcSlides(),X.loop&&H.loopCreate(),X.observer&&!H.isElement||H.update()}function ne(G){const H=this,{params:X,activeIndex:Y,slidesEl:Q}=H;X.loop&&H.loopDestroy();let ee=Y+1;const n=G=>{if("string"==typeof G){const H=document.createElement("div");H.innerHTML=G,Q.prepend(H.children[0]),H.innerHTML=""}else Q.prepend(G)};if("object"==typeof G&&"length"in G){for(let H=0;H<G.length;H+=1)G[H]&&n(G[H]);ee=Y+G.length}else n(G);H.recalcSlides(),X.loop&&H.loopCreate(),X.observer&&!H.isElement||H.update(),H.slideTo(ee,0,!1)}function le(G,H){const X=this,{params:Y,activeIndex:Q,slidesEl:ee}=X;let te=Q;Y.loop&&(te-=X.loopedSlides,X.loopDestroy(),X.recalcSlides());const he=X.slides.length;if(G<=0)return void X.prependSlide(H);if(G>=he)return void X.appendSlide(H);let fe=te>G?te+1:te;const ge=[];for(let H=he-1;H>=G;H-=1){const G=X.slides[H];G.remove(),ge.unshift(G)}if("object"==typeof H&&"length"in H){for(let G=0;G<H.length;G+=1)H[G]&&ee.append(H[G]);fe=te>G?te+H.length:te}else ee.append(H);for(let G=0;G<ge.length;G+=1)ee.append(ge[G]);X.recalcSlides(),Y.loop&&X.loopCreate(),Y.observer&&!X.isElement||X.update(),Y.loop?X.slideTo(fe+X.loopedSlides,0,!1):X.slideTo(fe,0,!1)}function oe(G){const H=this,{params:X,activeIndex:Y}=H;let Q=Y;X.loop&&(Q-=H.loopedSlides,H.loopDestroy());let ee,te=Q;if("object"==typeof G&&"length"in G){for(let X=0;X<G.length;X+=1)ee=G[X],H.slides[ee]&&H.slides[ee].remove(),ee<te&&(te-=1);te=Math.max(te,0)}else ee=G,H.slides[ee]&&H.slides[ee].remove(),ee<te&&(te-=1),te=Math.max(te,0);H.recalcSlides(),X.loop&&H.loopCreate(),X.observer&&!H.isElement||H.update(),X.loop?H.slideTo(te+H.loopedSlides,0,!1):H.slideTo(te,0,!1)}function de(){const G=this,H=[];for(let X=0;X<G.slides.length;X+=1)H.push(X);G.removeSlide(H)}function ce(G){const{effect:H,swiper:X,on:Y,setTranslate:Q,setTransition:ee,overwriteParams:te,perspective:he,recreateShadows:fe,getEffectParams:ge}=G;let ve;Y("beforeInit",()=>{if(X.params.effect!==H)return;X.classNames.push(`${X.params.containerModifierClass}${H}`),he&&he()&&X.classNames.push(`${X.params.containerModifierClass}3d`);const G=te?te():{};Object.assign(X.params,G),Object.assign(X.originalParams,G)}),Y("setTranslate",()=>{X.params.effect===H&&Q()}),Y("setTransition",(G,Y)=>{X.params.effect===H&&ee(Y)}),Y("transitionEnd",()=>{if(X.params.effect===H&&fe){if(!ge||!ge().slideShadows)return;
50X.slides.forEach(G=>{G.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(G=>G.remove())}),fe()}}),Y("virtualUpdate",()=>{X.params.effect===H&&(X.slides.length||(ve=!0),requestAnimationFrame(()=>{ve&&X.slides&&X.slides.length&&(Q(),ve=!1)}))})}function pe(G,H){const X=h(H);return X!==H&&(X.style.backfaceVisibility="hidden",X.style["-webkit-backface-visibility"]="hidden"),X}function ue(G){let{swiper:H,duration:X,transformElements:Y,allSlides:Q}=G;const{activeIndex:ee}=H;if(H.params.virtualTranslate&&0!==X){let G,X=!1;G=Q?Y:Y.filter(G=>{const X=G.classList.contains("swiper-slide-transform")?(G=>G.parentElement?G.parentElement:H.slides.filter(H=>H.shadowRoot&&H.shadowRoot===G.parentNode)[0])(G):G;return H.getSlideIndex(X)===ee}),G.forEach(G=>{x(G,()=>{if(X)return;if(!H||H.destroyed)return;X=!0,H.animating=!1;const G=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});H.wrapperEl.dispatchEvent(G)})})}}function me(G,H,X){const Y=`swiper-slide-shadow${X?`-${X}`:""}${G?` swiper-slide-shadow-${G}`:""}`,Q=h(H);let ee=Q.querySelector(`.${Y.split(" ").join(".")}`);return ee||(ee=v("div",Y.split(" ")),Q.append(ee)),ee}Object.keys(we).forEach(G=>{Object.keys(we[G]).forEach(H=>{se.prototype[H]=we[G][H]})}),se.use([function(G){let{swiper:H,on:X,emit:Y}=G;const Q=r();let ee=null,te=null;const o=()=>{H&&!H.destroyed&&H.initialized&&(Y("beforeResize"),Y("resize"))},d=()=>{H&&!H.destroyed&&H.initialized&&Y("orientationchange")};X("init",()=>{H.params.resizeObserver&&void 0!==Q.ResizeObserver?H&&!H.destroyed&&H.initialized&&(ee=new ResizeObserver(G=>{te=Q.requestAnimationFrame(()=>{const{width:X,height:Y}=H;let Q=X,ee=Y;G.forEach(G=>{let{contentBoxSize:X,contentRect:Y,target:te}=G;te&&te!==H.el||(Q=Y?Y.width:(X[0]||X).inlineSize,ee=Y?Y.height:(X[0]||X).blockSize)}),Q===X&&ee===Y||o()})}),ee.observe(H.el)):(Q.addEventListener("resize",o),Q.addEventListener("orientationchange",d))}),X("destroy",()=>{te&&Q.cancelAnimationFrame(te),ee&&ee.unobserve&&H.el&&(ee.unobserve(H.el),ee=null),Q.removeEventListener("resize",o),Q.removeEventListener("orientationchange",d)})},function(G){let{swiper:H,extendParams:X,on:Y,emit:Q}=G;const ee=[],te=r(),o=function(G,X){void 0===X&&(X={});const Y=new(te.MutationObserver||te.WebkitMutationObserver)(G=>{if(H.__preventObserver__)return;if(1===G.length)return void Q("observerUpdate",G[0]);const s=function(){Q("observerUpdate",G[0])};te.requestAnimationFrame?te.requestAnimationFrame(s):te.setTimeout(s,0)});Y.observe(G,{attributes:void 0===X.attributes||X.attributes,childList:void 0===X.childList||X.childList,characterData:void 0===X.characterData||X.characterData}),ee.push(Y)};X({observer:!1,observeParents:!1,observeSlideChildren:!1}),Y("init",()=>{if(H.params.observer){if(H.params.observeParents){const G=E(H.hostEl);for(let H=0;H<G.length;H+=1)o(G[H])}o(H.hostEl,{childList:H.params.observeSlideChildren}),o(H.wrapperEl,{attributes:!1})}}),Y("destroy",()=>{ee.forEach(G=>{G.disconnect()}),ee.splice(0,ee.length)})}]);const ye=[function(G){let H,{swiper:X,extendParams:Y,on:Q,emit:ee}=G;Y({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});const te=a();X.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const he=te.createElement("div");function d(G,H){const Y=X.params.virtual;if(Y.cache&&X.virtual.cache[H])return X.virtual.cache[H];let Q;return Y.renderSlide?(Q=Y.renderSlide.call(X,G,H),"string"==typeof Q&&(he.innerHTML=Q,Q=he.children[0])):Q=X.isElement?v("swiper-slide"):v("div",X.params.slideClass),Q.setAttribute("data-swiper-slide-index",H),Y.renderSlide||(Q.innerHTML=G),Y.cache&&(X.virtual.cache[H]=Q),Q}function c(G,H){const{slidesPerView:Y,slidesPerGroup:Q,centeredSlides:te,loop:he,initialSlide:fe}=X.params;if(H&&!he&&fe>0)return;const{addSlidesBefore:ge,addSlidesAfter:ve}=X.params.virtual,{from:we,to:be,slides:ye,slidesGrid:Ee,offset:xe}=X.virtual;X.params.cssMode||X.updateActiveIndex();const Se=X.activeIndex||0;let Te,Me,Ce;Te=X.rtlTranslate?"right":X.isHorizontal()?"left":"top",te?(Me=Math.floor(Y/2)+Q+ve,Ce=Math.floor(Y/2)+Q+ge):(Me=Y+(Q-1)+ve,Ce=(he?Y:Q)+ge);let Pe=Se-Ce,Le=Se+Me;he||(Pe=Math.max(Pe,0),Le=Math.min(Le,ye.length-1));let Ie=(X.slidesGrid[Pe]||0)-(X.slidesGrid[0]||0);function M(){X.updateSlides(),X.updateProgress(),X.updateSlidesClasses(),ee("virtualUpdate")}if(he&&Se>=Ce?(Pe-=Ce,te||(Ie+=X.slidesGrid[0])):he&&Se<Ce&&(Pe=-Ce,te&&(Ie+=X.slidesGrid[0])),Object.assign(X.virtual,{from:Pe,to:Le,offset:Ie,slidesGrid:X.slidesGrid,slidesBefore:Ce,slidesAfter:Me}),we===Pe&&be===Le&&!G)return X.slidesGrid!==Ee&&Ie!==xe&&X.slides.forEac
50h(G=>{G.style[Te]=Ie-Math.abs(X.cssOverflowAdjustment())+"px"}),X.updateProgress(),void ee("virtualUpdate");if(X.params.virtual.renderExternal)return X.params.virtual.renderExternal.call(X,{offset:Ie,from:Pe,to:Le,slides:function(){const G=[];for(let H=Pe;H<=Le;H+=1)G.push(ye[H]);return G}()}),void(X.params.virtual.renderExternalUpdate?M():ee("virtualUpdate"));const ze=[],Ae=[],L=G=>{let H=G;return G<0?H=ye.length+G:H>=ye.length&&(H-=ye.length),H};if(G)X.slides.filter(G=>G.matches(`.${X.params.slideClass}, swiper-slide`)).forEach(G=>{G.remove()});else for(let G=we;G<=be;G+=1)if(G<Pe||G>Le){const H=L(G);X.slides.filter(G=>G.matches(`.${X.params.slideClass}[data-swiper-slide-index="${H}"], swiper-slide[data-swiper-slide-index="${H}"]`)).forEach(G=>{G.remove()})}const $e=he?-ye.length:0,ke=he?2*ye.length:ye.length;for(let H=$e;H<ke;H+=1)if(H>=Pe&&H<=Le){const X=L(H);void 0===be||G?Ae.push(X):(H>be&&Ae.push(X),H<we&&ze.push(X))}if(Ae.forEach(G=>{X.slidesEl.append(d(ye[G],G))}),he)for(let G=ze.length-1;G>=0;G-=1){const H=ze[G];X.slidesEl.prepend(d(ye[H],H))}else ze.sort((G,H)=>H-G),ze.forEach(G=>{X.slidesEl.prepend(d(ye[G],G))});f(X.slidesEl,".swiper-slide, swiper-slide").forEach(G=>{G.style[Te]=Ie-Math.abs(X.cssOverflowAdjustment())+"px"}),M()}Q("beforeInit",()=>{if(!X.params.virtual.enabled)return;let G;if(void 0===X.passedParams.virtual.slides){const H=[...X.slidesEl.children].filter(G=>G.matches(`.${X.params.slideClass}, swiper-slide`));H&&H.length&&(X.virtual.slides=[...H],G=!0,H.forEach((G,H)=>{G.setAttribute("data-swiper-slide-index",H),X.virtual.cache[H]=G,G.remove()}))}G||(X.virtual.slides=X.params.virtual.slides),X.classNames.push(`${X.params.containerModifierClass}virtual`),X.params.watchSlidesProgress=!0,X.originalParams.watchSlidesProgress=!0,c(!1,!0)}),Q("setTranslate",()=>{X.params.virtual.enabled&&(X.params.cssMode&&!X._immediateVirtual?(clearTimeout(H),H=setTimeout(()=>{c()},100)):c())}),Q("init update resize",()=>{X.params.virtual.enabled&&X.params.cssMode&&u(X.wrapperEl,"--swiper-virtual-size",`${X.virtualSize}px`)}),Object.assign(X.virtual,{appendSlide:function(G){if("object"==typeof G&&"length"in G)for(let H=0;H<G.length;H+=1)G[H]&&X.virtual.slides.push(G[H]);else X.virtual.slides.push(G);c(!0)},prependSlide:function(G){const H=X.activeIndex;let Y=H+1,Q=1;if(Array.isArray(G)){for(let H=0;H<G.length;H+=1)G[H]&&X.virtual.slides.unshift(G[H]);Y=H+G.length,Q=G.length}else X.virtual.slides.unshift(G);if(X.params.virtual.cache){const G=X.virtual.cache,H={};Object.keys(G).forEach(X=>{const Y=G[X],ee=Y.getAttribute("data-swiper-slide-index");ee&&Y.setAttribute("data-swiper-slide-index",parseInt(ee,10)+Q),H[parseInt(X,10)+Q]=Y}),X.virtual.cache=H}c(!0),X.slideTo(Y,0)},removeSlide:function(G){if(null==G)return;let H=X.activeIndex;if(Array.isArray(G))for(let Y=G.length-1;Y>=0;Y-=1)X.params.virtual.cache&&(delete X.virtual.cache[G[Y]],Object.keys(X.virtual.cache).forEach(H=>{H>G&&(X.virtual.cache[H-1]=X.virtual.cache[H],X.virtual.cache[H-1].setAttribute("data-swiper-slide-index",H-1),delete X.virtual.cache[H])})),X.virtual.slides.splice(G[Y],1),G[Y]<H&&(H-=1),H=Math.max(H,0);else X.params.virtual.cache&&(delete X.virtual.cache[G],Object.keys(X.virtual.cache).forEach(H=>{H>G&&(X.virtual.cache[H-1]=X.virtual.cache[H],X.virtual.cache[H-1].setAttribute("data-swiper-slide-index",H-1),delete X.virtual.cache[H])})),X.virtual.slides.splice(G,1),G<H&&(H-=1),H=Math.max(H,0);c(!0),X.slideTo(H,0)},removeAllSlides:function(){X.virtual.slides=[],X.params.virtual.cache&&(X.virtual.cache={}),c(!0),X.slideTo(0,0)},update:c})},function(G){let{swiper:H,extendParams:X,on:Y,emit:Q}=G;const ee=a(),te=r();function d(G){if(!H.enabled)return;const{rtlTranslate:X}=H;let Y=G;Y.originalEvent&&(Y=Y.originalEvent);const he=Y.keyCode||Y.charCode,fe=H.params.keyboard.pageUpDown,ge=fe&&33===he,ve=fe&&34===he,we=37===he,be=39===he,ye=38===he,Ee=40===he;if(!H.allowSlideNext&&(H.isHorizontal()&&be||H.isVertical()&&Ee||ve))return!1;if(!H.allowSlidePrev&&(H.isHorizontal()&&we||H.isVertical()&&ye||ge))return!1;if(!(Y.shiftKey||Y.altKey||Y.ctrlKey||Y.metaKey||ee.activeElement&&ee.activeElement.nodeName&&("input"===ee.activeElement.nodeName.toLowerCase()||"textarea"===ee.activeElement.nodeName.toLowerCase()))){if(H.params.keyboard.onlyInViewport&&(ge||ve||we||be||ye||Ee)){let G=!1;if(E(H.el,`.${H.params.slideClass}, swiper-slide`).length>0&&0===E(H.el,`.${H.params.slideActiveClass}`).length)return;const Y=H.el,Q=Y.clientWidth,ee=Y.clientHeight,he=te.innerWidth,fe=te.innerHe
vendor: 5,347 bytes, line 50
50ight,ge=w(Y);X&&(ge.left-=Y.scrollLeft);const ve=[[ge.left,ge.top],[ge.left+Q,ge.top],[ge.left,ge.top+ee],[ge.left+Q,ge.top+ee]];for(let H=0;H<ve.length;H+=1){const X=ve[H];if(X[0]>=0&&X[0]<=he&&X[1]>=0&&X[1]<=fe){if(0===X[0]&&0===X[1])continue;G=!0}}if(!G)return}H.isHorizontal()?((ge||ve||we||be)&&(Y.preventDefault?Y.preventDefault():Y.returnValue=!1),((ve||be)&&!X||(ge||we)&&X)&&H.slideNext(),((ge||we)&&!X||(ve||be)&&X)&&H.slidePrev()):((ge||ve||ye||Ee)&&(Y.preventDefault?Y.preventDefault():Y.returnValue=!1),(ve||Ee)&&H.slideNext(),(ge||ye)&&H.slidePrev()),Q("keyPress",he)}}function c(){H.keyboard.enabled||(ee.addEventListener("keydown",d),H.keyboard.enabled=!0)}function p(){H.keyboard.enabled&&(ee.removeEventListener("keydown",d),H.keyboard.enabled=!1)}H.keyboard={enabled:!1},X({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),Y("init",()=>{H.params.keyboard.enabled&&c()}),Y("destroy",()=>{H.keyboard.enabled&&p()}),Object.assign(H.keyboard,{enable:c,disable:p})},function(G){let{swiper:H,extendParams:X,on:Y,emit:Q}=G;const ee=r();let te;X({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),H.mousewheel={enabled:!1};let he,fe=o();const ge=[];function m(){H.enabled&&(H.mouseEntered=!0)}function h(){H.enabled&&(H.mouseEntered=!1)}function f(G){return!(H.params.mousewheel.thresholdDelta&&G.delta<H.params.mousewheel.thresholdDelta||H.params.mousewheel.thresholdTime&&o()-fe<H.params.mousewheel.thresholdTime||!(G.delta>=6&&o()-fe<60)&&(G.direction<0?H.isEnd&&!H.params.loop||H.animating||(H.slideNext(),Q("scroll",G.raw)):H.isBeginning&&!H.params.loop||H.animating||(H.slidePrev(),Q("scroll",G.raw)),fe=(new ee.Date).getTime(),1))}function g(G){let X=G,Y=!0;if(!H.enabled)return;if(G.target.closest(`.${H.params.mousewheel.noMousewheelClass}`))return;const ee=H.params.mousewheel;H.params.cssMode&&X.preventDefault();let fe=H.el;"container"!==H.params.mousewheel.eventsTarget&&(fe=document.querySelector(H.params.mousewheel.eventsTarget));const ve=fe&&fe.contains(X.target);if(!H.mouseEntered&&!ve&&!ee.releaseOnEdges)return!0;X.originalEvent&&(X=X.originalEvent);let we=0;const be=H.rtlTranslate?-1:1,ye=function(G){let H=0,X=0,Y=0,Q=0;return"detail"in G&&(X=G.detail),"wheelDelta"in G&&(X=-G.wheelDelta/120),"wheelDeltaY"in G&&(X=-G.wheelDeltaY/120),"wheelDeltaX"in G&&(H=-G.wheelDeltaX/120),"axis"in G&&G.axis===G.HORIZONTAL_AXIS&&(H=X,X=0),Y=10*H,Q=10*X,"deltaY"in G&&(Q=G.deltaY),"deltaX"in G&&(Y=G.deltaX),G.shiftKey&&!Y&&(Y=Q,Q=0),(Y||Q)&&G.deltaMode&&(1===G.deltaMode?(Y*=40,Q*=40):(Y*=800,Q*=800)),Y&&!H&&(H=Y<1?-1:1),Q&&!X&&(X=Q<1?-1:1),{spinX:H,spinY:X,pixelX:Y,pixelY:Q}}(X);if(ee.forceToAxis)if(H.isHorizontal()){if(!(Math.abs(ye.pixelX)>Math.abs(ye.pixelY)))return!0;we=-ye.pixelX*be}else{if(!(Math.abs(ye.pixelY)>Math.abs(ye.pixelX)))return!0;we=-ye.pixelY}else we=Math.abs(ye.pixelX)>Math.abs(ye.pixelY)?-ye.pixelX*be:-ye.pixelY;if(0===we)return!0;ee.invert&&(we=-we);let Ee=H.getTranslate()+we*ee.sensitivity;if(Ee>=H.minTranslate()&&(Ee=H.minTranslate()),Ee<=H.maxTranslate()&&(Ee=H.maxTranslate()),Y=!!H.params.loop||!(Ee===H.minTranslate()||Ee===H.maxTranslate()),Y&&H.params.nested&&X.stopPropagation(),H.params.freeMode&&H.params.freeMode.enabled){const G={time:o(),delta:Math.abs(we),direction:Math.sign(we)},Y=he&&G.time<he.time+500&&G.delta<=he.delta&&G.direction===he.direction;if(!Y){he=void 0;let fe=H.getTranslate()+we*ee.sensitivity;const ve=H.isBeginning,be=H.isEnd;if(fe>=H.minTranslate()&&(fe=H.minTranslate()),fe<=H.maxTranslate()&&(fe=H.maxTranslate()),H.setTransition(0),H.setTranslate(fe),H.updateProgress(),H.updateActiveIndex(),H.updateSlidesClasses(),(!ve&&H.isBeginning||!be&&H.isEnd)&&H.updateSlidesClasses(),H.params.loop&&H.loopFix({direction:G.direction<0?"next":"prev",byMousewheel:!0}),H.params.freeMode.sticky){clearTimeout(te),te=void 0,ge.length>=15&&ge.shift();const X=ge.length?ge[ge.length-1]:void 0,Y=ge[0];if(ge.push(G),X&&(G.delta>X.delta||G.direction!==X.direction))ge.splice(0);else if(ge.length>=15&&G.time-Y.time<500&&Y.delta-G.delta>=1&&G.delta<=6){const X=we>0?.8:.2;he=G,ge.splice(0),te=l(()=>{H.slideToClosest(H.params.speed,!0,void 0,X)},0)}te||(te=l(()=>{he=G,ge.splice(0),H.slideToClosest(H.params.speed,!0,void 0,.5)},500))}if(Y||Q("scroll",X),H.params.autoplay&&H.params.autoplayDisableOnInteraction&&H.autoplay.stop(),ee.releaseOnEdges&&(fe===H.minTranslate()||fe===H.maxTranslate()))return!0}}else{const X={time:o(),delta:Math.abs(we),direction:Math.sign(we),raw:G};ge.length>=2&&ge.shift();const Y=ge.length?ge[ge.length-1]:void 0;if(ge.push(X),Y?(X.direction!==Y.direction||X.delta>Y.delta||X.time>Y.time+150)&&f(X):f(X),function(G){const X=H.params.mousewheel;if(G.direction<0){if(H.isEnd&&!H.params.loop&&X.releaseOnEdges)return!0}else if(H.isBeginning&&!H.params.loop&&X.releaseOnEdges)return!0;return!1}(X))return!0}return X.preventDefault?X.preventDefault():X.returnValue=!1,!1}function v(G){let X=H.el;"container"!==H.params.mousewheel.eventsTarget&&(X=document.querySelector(H.params.mousewheel.eventsTarget)),X[G]("mouseenter",m),X[G]("mouseleave",h),X[G]("wheel",g)}function w(){return H.params.cssMode?(H.wrapperEl.removeEventListener("wheel",g),!0):!H.mousewheel.enabled&&(v("addEventListener"),H.mou
50sewheel.enabled=!0,!0)}function b(){return H.params.cssMode?(H.wrapperEl.addEventListener(event,g),!0):!!H.mousewheel.enabled&&(v("removeEventListener"),H.mousewheel.enabled=!1,!0)}Y("init",()=>{!H.params.mousewheel.enabled&&H.params.cssMode&&b(),H.params.mousewheel.enabled&&w()}),Y("destroy",()=>{H.params.cssMode&&w(),H.mousewheel.enabled&&b()}),Object.assign(H.mousewheel,{enable:w,disable:b})},function(G){let{swiper:H,extendParams:X,on:Y,emit:Q}=G;function r(G){let X;return G&&"string"==typeof G&&H.isElement&&(X=H.el.querySelector(G),X)?X:(G&&("string"==typeof G&&(X=[...document.querySelectorAll(G)]),H.params.uniqueNavElements&&"string"==typeof G&&X&&X.length>1&&1===H.el.querySelectorAll(G).length?X=H.el.querySelector(G):X&&1===X.length&&(X=X[0])),G&&!X?G:X)}function n(G,X){const Y=H.params.navigation;(G=T(G)).forEach(G=>{G&&(G.classList[X?"add":"remove"](...Y.disabledClass.split(" ")),"BUTTON"===G.tagName&&(G.disabled=X),H.params.watchOverflow&&H.enabled&&G.classList[H.isLocked?"add":"remove"](Y.lockClass))})}function l(){const{nextEl:G,prevEl:X}=H.navigation;if(H.params.loop)return n(X,!1),void n(G,!1);
vendor: 4,113 bytes, line 50
50n(X,H.isBeginning&&!H.params.rewind),n(G,H.isEnd&&!H.params.rewind)}function o(G){G.preventDefault(),(!H.isBeginning||H.params.loop||H.params.rewind)&&(H.slidePrev(),Q("navigationPrev"))}function d(G){G.preventDefault(),(!H.isEnd||H.params.loop||H.params.rewind)&&(H.slideNext(),Q("navigationNext"))}function c(){const G=H.params.navigation;if(H.params.navigation=ae(H,H.originalParams.navigation,H.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!G.nextEl&&!G.prevEl)return;let X=r(G.nextEl),Y=r(G.prevEl);Object.assign(H.navigation,{nextEl:X,prevEl:Y}),X=T(X),Y=T(Y);const i=(X,Y)=>{X&&X.addEventListener("click","next"===Y?d:o),!H.enabled&&X&&X.classList.add(...G.lockClass.split(" "))};X.forEach(G=>i(G,"next")),Y.forEach(G=>i(G,"prev"))}function p(){let{nextEl:G,prevEl:X}=H.navigation;G=T(G),X=T(X);const a=(G,X)=>{G.removeEventListener("click","next"===X?d:o),G.classList.remove(...H.params.navigation.disabledClass.split(" "))};G.forEach(G=>a(G,"next")),X.forEach(G=>a(G,"prev"))}X({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),H.navigation={nextEl:null,prevEl:null},Y("init",()=>{!1===H.params.navigation.enabled?u():(c(),l())}),Y("toEdge fromEdge lock unlock",()=>{l()}),Y("destroy",()=>{p()}),Y("enable disable",()=>{let{nextEl:G,prevEl:X}=H.navigation;G=T(G),X=T(X),H.enabled?l():[...G,...X].filter(G=>!!G).forEach(G=>G.classList.add(H.params.navigation.lockClass))}),Y("click",(G,X)=>{let{nextEl:Y,prevEl:ee}=H.navigation;Y=T(Y),ee=T(ee);const te=X.target;if(H.params.navigation.hideOnClick&&!ee.includes(te)&&!Y.includes(te)){if(H.pagination&&H.params.pagination&&H.params.pagination.clickable&&(H.pagination.el===te||H.pagination.el.contains(te)))return;let G;Y.length?G=Y[0].classList.contains(H.params.navigation.hiddenClass):ee.length&&(G=ee[0].classList.contains(H.params.navigation.hiddenClass)),Q(!0===G?"navigationShow":"navigationHide"),[...Y,...ee].filter(G=>!!G).forEach(G=>G.classList.toggle(H.params.navigation.hiddenClass))}});const u=()=>{H.el.classList.add(...H.params.navigation.navigationDisabledClass.split(" ")),p()};Object.assign(H.navigation,{enable:()=>{H.el.classList.remove(...H.params.navigation.navigationDisabledClass.split(" ")),c(),l()},disable:u,update:l,init:c,destroy:p})},function(G){let{swiper:H,extendParams:X,on:Y,emit:Q}=G;const ee="swiper-pagination";let te;X({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:G=>G,formatFractionTotal:G=>G,bulletClass:`${ee}-bullet`,bulletActiveClass:`${ee}-bullet-active`,modifierClass:`${ee}-`,currentClass:`${ee}-current`,totalClass:`${ee}-total`,hiddenClass:`${ee}-hidden`,progressbarFillClass:`${ee}-progressbar-fill`,progressbarOppositeClass:`${ee}-progressbar-opposite`,clickableClass:`${ee}-clickable`,lockClass:`${ee}-lock`,horizontalClass:`${ee}-horizontal`,verticalClass:`${ee}-vertical`,paginationDisabledClass:`${ee}-disabled`}}),H.pagination={el:null,bullets:[]};let he=0;function o(){return!H.params.pagination.el||!H.pagination.el||Array.isArray(H.pagination.el)&&0===H.pagination.el.length}function d(G,X){const{bulletActiveClass:Y}=H.params.pagination;G&&(G=G[("prev"===X?"previous":"next")+"ElementSibling"])&&(G.classList.add(`${Y}-${X}`),(G=G[("prev"===X?"previous":"next")+"ElementSibling"])&&G.classList.add(`${Y}-${X}-${X}`))}function c(G){const X=G.target.closest(ie(H.params.pagination.bulletClass));if(!X)return;G.preventDefault();const Y=y(X)*H.params.slidesPerGroup;if(H.params.loop){if(H.realIndex===Y)return;H.slideToLoop(Y)}else H.slideTo(Y)}function p(){const G=H.rtl,X=H.params.pagination;if(o())return;let Y,ee,fe=H.pagination.el;fe=T(fe);const ge=H.virtual&&H.params.virtual.enabled?H.virtual.slides.length:H.slides.length,ve=H.params.loop?Math.ceil(ge/H.params.slidesPerGroup):H.snapGrid.length;
50if(H.params.loop?(ee=H.previousRealIndex||0,Y=H.params.slidesPerGroup>1?Math.floor(H.realIndex/H.params.slidesPerGroup):H.realIndex):void 0!==H.snapIndex?(Y=H.snapIndex,ee=H.previousSnapIndex):(ee=H.previousIndex||0,Y=H.activeIndex||0),"bullets"===X.type&&H.pagination.bullets&&H.pagination.bullets.length>0){const Q=H.pagination.bullets;let ge,ve,we;if(X.dynamicBullets&&(te=S(Q[0],H.isHorizontal()?"width":"height",!0),fe.forEach(G=>{G.style[H.isHorizontal()?"width":"height"]=te*(X.dynamicMainBullets+4)+"px"}),X.dynamicMainBullets>1&&void 0!==ee&&(he+=Y-(ee||0),he>X.dynamicMainBullets-1?he=X.dynamicMainBullets-1:he<0&&(he=0)),ge=Math.max(Y-he,0),ve=ge+(Math.min(Q.length,X.dynamicMainBullets)-1),we=(ve+ge)/2),Q.forEach(G=>{const H=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(G=>`${X.bulletActiveClass}${G}`)].map(G=>"string"==typeof G&&G.includes(" ")?G.split(" "):G).flat();G.classList.remove(...H)}),fe.length>1)Q.forEach(G=>{const Q=y(G);Q===Y?G.classList.add(...X.bulletActiveClass.split(" ")):H.isElement&&G.setAttribute("part","bullet"),X.dynamicBullets&&(Q>=ge&&Q<=ve&&G.classList.add(...`${X.bulletActiveClass}-main`.split(" ")),Q===ge&&d(G,"prev"),Q===ve&&d(G,"next"))});else{const G=Q[Y];if(G&&G.classList.add(...X.bulletActiveClass.split(" ")),H.isElement&&Q.forEach((G,H)=>{G.setAttribute("part",H===Y?"bullet-active":"bullet")}),X.dynamicBullets){const G=Q[ge],H=Q[ve];for(let G=ge;G<=ve;G+=1)Q[G]&&Q[G].classList.add(...`${X.bulletActiveClass}-main`.split(" "));d(G,"prev"),d(H,"next")}}if(X.dynamicBullets){const Y=Math.min(Q.length,X.dynamicMainBullets+4),ee=(te*Y-te)/2-we*te,he=G?"right":"left";Q.forEach(G=>{G.style[H.isHorizontal()?he:"top"]=`${ee}px`})}}fe.forEach((G,ee)=>{if("fraction"===X.type&&(G.querySelectorAll(ie(X.currentClass)).forEach(G=>{G.textContent=X.formatFractionCurrent(Y+1)}),G.querySelectorAll(ie(X.totalClass)).forEach(G=>{G.textContent=X.formatFractionTotal(ve)})),"progressbar"===X.type){let Q;Q=X.progressbarOpposite?H.isHorizontal()?"vertical":"horizontal":H.isHorizontal()?"horizontal":"vertical";const ee=(Y+1)/ve;let te=1,he=1;"horizontal"===Q?te=ee:he=ee,G.querySelectorAll(ie(X.progressbarFillClass)).forEach(G=>{G.style.transform=`translate3d(0,0,0) scaleX(${te}) scaleY(${he})`,G.style.transitionDuration=`${H.params.speed}ms`})}"custom"===X.type&&X.renderCustom?(G.innerHTML=X.renderCustom(H,Y+1,ve),0===ee&&Q("paginationRender",G)):(0===ee&&Q("paginationRender",G),Q("paginationUpdate",G)),H.params.watchOverflow&&H.enabled&&G.classList[H.isLocked?"add":"remove"](X.lockClass)})}function u(){const G=H.params.pagination;if(o())return;const X=H.virtual&&H.params.virtual.enabled?H.virtual.slides.length:H.grid&&H.params.grid.rows>1?H.slides.length/Math.ceil(H.params.grid.rows):H.slides.length;let Y=H.pagination.el;Y=T(Y);let ee="";if("bullets"===G.type){let Y=H.params.loop?Math.ceil(X/H.params.slidesPerGroup):H.snapGrid.length;H.params.freeMode&&H.params.freeMode.enabled&&Y>X&&(Y=X);for(let X=0;X<Y;X+=1)G.renderBullet?ee+=G.renderBullet.call(H,X,G.bulletClass):ee+=`<${G.bulletElement} ${H.isElement?'part="bullet"':""} class="${G.bulletClass}"></${G.bulletElement}>`}"fraction"===G.type&&(ee=G.renderFraction?G.renderFraction.call(H,G.currentClass,G.totalClass):`<span class="${G.currentClass}"></span> / <span class="${G.totalClass}"></span>`),"progressbar"===G.type&&(ee=G.renderProgressbar?G.renderProgressbar.call(H,G.progressbarFillClass):`<span class="${G.progressbarFillClass}"></span>`),H.pagination.bullets=[],Y.forEach(X=>{"custom"!==G.type&&(X.innerHTML=ee||""),"bullets"===G.type&&H.pagination.bullets.push(...X.querySelectorAll(ie(G.bulletClass)))}),"custom"!==G.type&&Q("paginationRender",Y[0])}function m(){H.params.pagination=ae(H,H.originalParams.pagination,H.params.pagination,{el:"swiper-pagination"});const G=H.params.pagination;if(!G.el)return;let X;"string"==typeof G.el&&H.isElement&&(X=H.el.querySelector(G.el)),X||"string"!=typeof G.el||(X=[...document.querySelectorAll(G.el)]),X||(X=G.el),X&&0!==X.length&&(H.params.uniqueNavElements&&"string"==typeof G.el&&Array.isArray(X)&&X.length>1&&(X=[...H.el.querySelectorAll(G.el)],X.length>1&&(X=X.filter(G=>E(G,".swiper")[0]===H.el)[0])),Array.isArray(X)&&1===X.length&&(X=X[0]),Object.assign(H.pagination,{el:X}
vendor: 7,211 bytes, line 50
50),X=T(X),X.forEach(X=>{"bullets"===G.type&&G.clickable&&X.classList.add(...(G.clickableClass||"").split(" ")),X.classList.add(G.modifierClass+G.type),X.classList.add(H.isHorizontal()?G.horizontalClass:G.verticalClass),"bullets"===G.type&&G.dynamicBullets&&(X.classList.add(`${G.modifierClass}${G.type}-dynamic`),he=0,G.dynamicMainBullets<1&&(G.dynamicMainBullets=1)),"progressbar"===G.type&&G.progressbarOpposite&&X.classList.add(G.progressbarOppositeClass),G.clickable&&X.addEventListener("click",c),H.enabled||X.classList.add(G.lockClass)}))}function h(){const G=H.params.pagination;if(o())return;let X=H.pagination.el;X&&(X=T(X),X.forEach(X=>{X.classList.remove(G.hiddenClass),X.classList.remove(G.modifierClass+G.type),X.classList.remove(H.isHorizontal()?G.horizontalClass:G.verticalClass),G.clickable&&(X.classList.remove(...(G.clickableClass||"").split(" ")),X.removeEventListener("click",c))})),H.pagination.bullets&&H.pagination.bullets.forEach(H=>H.classList.remove(...G.bulletActiveClass.split(" ")))}Y("changeDirection",()=>{if(!H.pagination||!H.pagination.el)return;const G=H.params.pagination;let{el:X}=H.pagination;X=T(X),X.forEach(X=>{X.classList.remove(G.horizontalClass,G.verticalClass),X.classList.add(H.isHorizontal()?G.horizontalClass:G.verticalClass)})}),Y("init",()=>{!1===H.params.pagination.enabled?f():(m(),u(),p())}),Y("activeIndexChange",()=>{void 0===H.snapIndex&&p()}),Y("snapIndexChange",()=>{p()}),Y("snapGridLengthChange",()=>{u(),p()}),Y("destroy",()=>{h()}),Y("enable disable",()=>{let{el:G}=H.pagination;G&&(G=T(G),G.forEach(G=>G.classList[H.enabled?"remove":"add"](H.params.pagination.lockClass)))}),Y("lock unlock",()=>{p()}),Y("click",(G,X)=>{const Y=X.target,ee=T(H.pagination.el);if(H.params.pagination.el&&H.params.pagination.hideOnClick&&ee&&ee.length>0&&!Y.classList.contains(H.params.pagination.bulletClass)){if(H.navigation&&(H.navigation.nextEl&&Y===H.navigation.nextEl||H.navigation.prevEl&&Y===H.navigation.prevEl))return;const G=ee[0].classList.contains(H.params.pagination.hiddenClass);Q(!0===G?"paginationShow":"paginationHide"),ee.forEach(G=>G.classList.toggle(H.params.pagination.hiddenClass))}});const f=()=>{H.el.classList.add(H.params.pagination.paginationDisabledClass);let{el:G}=H.pagination;G&&(G=T(G),G.forEach(G=>G.classList.add(H.params.pagination.paginationDisabledClass))),h()};Object.assign(H.pagination,{enable:()=>{H.el.classList.remove(H.params.pagination.paginationDisabledClass);let{el:G}=H.pagination;G&&(G=T(G),G.forEach(G=>G.classList.remove(H.params.pagination.paginationDisabledClass))),m(),u(),p()},disable:f,render:u,update:p,init:m,destroy:h})},function(G){let{swiper:H,extendParams:X,on:Y,emit:Q}=G;const ee=a();let te,he,fe,ge,ve=!1,we=null,be=null;function g(){if(!H.params.scrollbar.el||!H.scrollbar.el)return;const{scrollbar:G,rtlTranslate:X}=H,{dragEl:Y,el:Q}=G,ee=H.params.scrollbar,te=H.params.loop?H.progressLoop:H.progress;let ge=he,ve=(fe-he)*te;X?(ve=-ve,ve>0?(ge=he-ve,ve=0):-ve+he>fe&&(ge=fe+ve)):ve<0?(ge=he+ve,ve=0):ve+he>fe&&(ge=fe-ve),H.isHorizontal()?(Y.style.transform=`translate3d(${ve}px, 0, 0)`,Y.style.width=`${ge}px`):(Y.style.transform=`translate3d(0px, ${ve}px, 0)`,Y.style.height=`${ge}px`),ee.hide&&(clearTimeout(we),Q.style.opacity=1,we=setTimeout(()=>{Q.style.opacity=0,Q.style.transitionDuration="400ms"},1e3))}function b(){if(!H.params.scrollbar.el||!H.scrollbar.el)return;const{scrollbar:G}=H,{dragEl:X,el:Y}=G;X.style.width="",X.style.height="",fe=H.isHorizontal()?Y.offsetWidth:Y.offsetHeight,ge=H.size/(H.virtualSize+H.params.slidesOffsetBefore-(H.params.centeredSlides?H.snapGrid[0]:0)),he="auto"===H.params.scrollbar.dragSize?fe*ge:parseInt(H.params.scrollbar.dragSize,10),H.isHorizontal()?X.style.width=`${he}px`:X.style.height=`${he}px`,Y.style.display=ge>=1?"none":"",H.params.scrollbar.hide&&(Y.style.opacity=0),H.params.watchOverflow&&H.enabled&&G.el.classList[H.isLocked?"add":"remove"](H.params.scrollbar.lockClass)}function y(G){return H.isHorizontal()?G.clientX:G.clientY}function E(G){const{scrollbar:X,rtlTranslate:Y}=H,{el:Q}=X;let ee;ee=(y(G)-w(Q)[H.isHorizontal()?"left":"top"]-(null!==te?te:he/2))/(fe-he),ee=Math.max(Math.min(ee,1),0),Y&&(ee=1-ee);const ge=H.minTranslate()+(H.maxTranslate()-H.minTranslate())*ee;H.updateProgress(ge),H.setTranslate(ge),H.updateActiveIndex(),H.updateSlidesClasses()}function x(G){const X=H.params.scrollbar,{scrollbar:Y,wrapperEl:ee}=H,{el:he,dragEl:fe}=Y;ve=!0,te=G.target===fe?y(G)-G.target.getBoundingClientRect()[H.isHorizontal()?"left":"top"]:null,G.preventDefault(),G.stopPropagation(),ee.style.transitionDuration="100ms",fe.style.transitionDuration="100ms",E(G),clearTimeout(be),he.style.transitionDuration="0ms",X.hide&&(he.style.opacity=1),H.params.cssMode&&(H.wrapperEl.style["scroll-snap-type"]="none"),Q("scrollbarDragStart",G)}function S(G){const{scrollbar:X,wrapperEl:Y}=H,{el:ee,dragEl:te}=X;ve&&(G.preventDefault&&G.cancelable?G.preventDefault():G.returnValue=!1,E(G),Y.style.transitionDuration="0ms",ee.style.transitionDuration="0ms",te.style.transitionDuration="0ms",Q("scrollbarDragMove",G))}function M(G){const X=H.params.scrollbar,{scrollbar:Y,wrapperEl:ee}=H,{el:te}=Y;ve&&(ve=!1,H.params.cssMode&&(H.wrapperEl.style["scroll-snap-type"]="",ee.style.transitionDuration=""),X.hide&&(clearTimeout(be),be=l(()=>{te.style.opacity=0,te.style.transitionDuration="400ms"},1e3)),Q("scrollbarDragEnd",G),X.snapOnRelease&&H.slideToClosest())}function C(G){const{scrollbar:X,params:Y}=H,Q=X.el;if(!Q)return;const te=Q,he=!!Y.passiveListeners&&{passive:!1,capture:!1},fe=!!Y.passiveListeners&&{passive:!0,capture:!1};if(!te)return;const ge="on"===G?"addEventListener":"removeEventListener";te[ge]("pointerdown",x,he),ee[ge]("pointermove",S,he),ee[ge]("pointerup",M,fe)}function P(){const{scrollbar:G,el:X}=H;H.params.scrollbar=ae(H,H.originalParams.scrollbar,H.params.scrollbar,{el:"swiper-scrollbar"});const Y=H.params.scrollbar;if(!Y.el)return;let Q,te;if("string"==typeof Y.el&&H.isElement&&(Q=H.el.querySelector(Y.el)),Q||"string"!=typeof Y.el)Q||(Q=Y.el);else if(Q=ee.querySelectorAll(Y.el),!Q.length)return;H.params.uniqueNavElements&&"string"==typeof Y.el&&Q.length>1&&1===X.querySelectorAll(Y.el).length&&(Q=X.querySelector(Y.el)),Q.length>0&&(Q=Q[0]),Q.classList.add(H.isHorizontal()?Y.horizontalClass:Y.verticalClass),Q&&(te=Q.querySelector(ie(H.params.scrollbar.dragClass)),te||(te=v("div",H.params.scrollbar.dragClass),Q.append(te))),Object.assign(G,{el:Q,dragEl:te}),Y.draggable&&H.params.scrollbar.el&&H.scrollbar.el&&C("on"),Q&&Q.classList[H.enabled?"remove":"add"](...n(H.params.scrollbar.lockClass))}function L(){const G=H.params.scrollbar,X=H.scrollbar.el;X&&X.classList.remove(...n(H.isHorizontal()?G.horizontalClass:G.verticalClass)),H.params.scrollbar.el&&H.scrollbar.el&&C("off")}X({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),H.scrollbar={el:null,dragEl:null},Y("changeDirection",()=>{if(!H.scrollbar||!H.scrollbar.el)return;const G=H.params.scrollbar;let{el:X}=H.scrollbar;
50X=T(X),X.forEach(X=>{X.classList.remove(G.horizontalClass,G.verticalClass),X.classList.add(H.isHorizontal()?G.horizontalClass:G.verticalClass)})}),Y("init",()=>{!1===H.params.scrollbar.enabled?I():(P(),b(),g())}),Y("update resize observerUpdate lock unlock changeDirection",()=>{b()}),Y("setTranslate",()=>{g()}),Y("setTransition",(G,X)=>{!function(G){H.params.scrollbar.el&&H.scrollbar.el&&(H.scrollbar.dragEl.style.transitionDuration=`${G}ms`)}(X)}),Y("enable disable",()=>{const{el:G}=H.scrollbar;G&&G.classList[H.enabled?"remove":"add"](...n(H.params.scrollbar.lockClass))}),Y("destroy",()=>{L()});const I=()=>{H.el.classList.add(...n(H.params.scrollbar.scrollbarDisabledClass)),H.scrollbar.el&&H.scrollbar.el.classList.add(...n(H.params.scrollbar.scrollbarDisabledClass)),L()};Object.assign(H.scrollbar,{enable:()=>{H.el.classList.remove(...n(H.params.scrollbar.scrollbarDisabledClass)),H.scrollbar.el&&H.scrollbar.el.classList.remove(...n(H.params.scrollbar.scrollbarDisabledClass)),P(),b(),g()},disable:I,updateSize:b,setTranslate:g,init:P,destroy:L})},function(G){let{swiper:H,extendParams:X,on:Y}=G;X({parallax:{enabled:!1}});const Q="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",r=(G,X)=>{const{rtl:Y}=H,Q=Y?-1:1,ee=G.getAttribute("data-swiper-parallax")||"0";let te=G.getAttribute("data-swiper-parallax-x"),he=G.getAttribute("data-swiper-parallax-y");const fe=G.getAttribute("data-swiper-parallax-scale"),ge=G.getAttribute("data-swiper-parallax-opacity"),ve=G.getAttribute("data-swiper-parallax-rotate");if(te||he?(te=te||"0",he=he||"0"):H.isHorizontal()?(te=ee,he="0"):(he=ee,te="0"),te=te.indexOf("%")>=0?parseInt(te,10)*X*Q+"%":te*X*Q+"px",he=he.indexOf("%")>=0?parseInt(he,10)*X+"%":he*X+"px",null!=ge){const H=ge-(ge-1)*(1-Math.abs(X));G.style.opacity=H}let we=`translate3d(${te}, ${he}, 0px)`;null!=fe&&(we+=` scale(${fe-(fe-1)*(1-Math.abs(X))})`),ve&&null!=ve&&(we+=` rotate(${ve*X*-1}deg)`),G.style.transform=we},n=()=>{const{el:G,slides:X,progress:Y,snapGrid:ee,isElement:te}=H,he=f(G,Q);H.isElement&&he.push(...f(H.hostEl,Q)),he.forEach(G=>{r(G,Y)}),X.forEach((G,X)=>{let te=G.progress;H.params.slidesPerGroup>1&&"auto"!==H.params.slidesPerView&&(te+=Math.ceil(X/2)-Y*(ee.length-1)),te=Math.min(Math.max(te,-1),1),G.querySelectorAll(`${Q}, [data-swiper-parallax-rotate]`).forEach(G=>{r(G,te)})})};Y("beforeInit",()=>{H.params.parallax.enabled&&(H.params.watchSlidesProgress=!0,H.originalParams.watchSlidesProgress=!0)}),Y("init",()=>{H.params.parallax.enabled&&n()}),Y("setTranslate",()=>{H.params.parallax.enabled&&n()}),Y("setTransition",(G,X)=>{H.params.parallax.enabled&&function(G){void 0===G&&(G=H.params.speed);const{el:X,hostEl:Y}=H,ee=[...X.querySelectorAll(Q)];H.isElement&&ee.push(...Y.querySelectorAll(Q)),ee.forEach(H=>{let X=parseInt(H.getAttribute("data-swiper-parallax-duration"),10)||G;0===G&&(X=0),H.style.transitionDuration=`${X}ms`})}(X)})},function(G){let{swiper:H,extendParams:X,on:Y,emit:Q}=G;const ee=r();X({zoom:{enabled:!1,limitToOriginalSize:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),H.zoom={enabled:!1};let te,he,fe=1,ge=!1;const ve=[],we={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},be={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},ye={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let Ee,xe=1;function y(){if(ve.length<2)return 1;const G=ve[0].pageX,H=ve[0].pageY,X=ve[1].pageX,Y=ve[1].pageY;return Math.sqrt((X-G)**2+(Y-H)**2)}function x(){const G=H.params.zoom,X=we.imageWrapEl.getAttribute("data-swiper-zoom")||G.maxRatio;if(G.limitToOriginalSize&&we.imageEl&&we.imageEl.naturalWidth){const G=we.imageEl.naturalWidth/we.imageEl.offsetWidth;return Math.min(G,X)}return X}function S(G){const X=H.isElement?"swiper-slide":`.${H.params.slideClass}`;return!!G.target.matches(X)||H.slides.filter(H=>H.contains(G.target)).length>0}function T(G){if("mouse"===G.pointerType&&ve.splice(0,ve.length),!S(G))return;const X=H.params.zoom;if(te=!1,he=!1,ve.push(G),!(ve.length<2)){if(te=!0,we.scaleStart=y(),!we.slideEl){we.slideEl=G.target.closest(`.${H.params.slideClass}, swiper-slide`),we.slideEl||(we.slideEl=H.slides[H.activeIndex]);let Y=we.slideEl.querySelector(`.${X.containerClass}`);
vendor: 4,593 bytes, line 50
50if(Y&&(Y=Y.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),we.imageEl=Y,we.imageWrapEl=Y?E(we.imageEl,`.${X.containerClass}`)[0]:void 0,!we.imageWrapEl)return void(we.imageEl=void 0);we.maxRatio=x()}if(we.imageEl){const[G,H]=function(){if(ve.length<2)return{x:null,y:null};const G=we.imageEl.getBoundingClientRect();return[(ve[0].pageX+(ve[1].pageX-ve[0].pageX)/2-G.x-ee.scrollX)/fe,(ve[0].pageY+(ve[1].pageY-ve[0].pageY)/2-G.y-ee.scrollY)/fe]}();we.originX=G,we.originY=H,we.imageEl.style.transitionDuration="0ms"}ge=!0}}function M(G){if(!S(G))return;const X=H.params.zoom,Y=H.zoom,Q=ve.findIndex(H=>H.pointerId===G.pointerId);Q>=0&&(ve[Q]=G),ve.length<2||(he=!0,we.scaleMove=y(),we.imageEl&&(Y.scale=we.scaleMove/we.scaleStart*fe,Y.scale>we.maxRatio&&(Y.scale=we.maxRatio-1+(Y.scale-we.maxRatio+1)**.5),Y.scale<X.minRatio&&(Y.scale=X.minRatio+1-(X.minRatio-Y.scale+1)**.5),we.imageEl.style.transform=`translate3d(0,0,0) scale(${Y.scale})`))}function C(G){if(!S(G))return;if("mouse"===G.pointerType&&"pointerout"===G.type)return;const X=H.params.zoom,Y=H.zoom,Q=ve.findIndex(H=>H.pointerId===G.pointerId);Q>=0&&ve.splice(Q,1),te&&he&&(te=!1,he=!1,we.imageEl&&(Y.scale=Math.max(Math.min(Y.scale,we.maxRatio),X.minRatio),we.imageEl.style.transitionDuration=`${H.params.speed}ms`,we.imageEl.style.transform=`translate3d(0,0,0) scale(${Y.scale})`,fe=Y.scale,ge=!1,Y.scale>1&&we.slideEl?we.slideEl.classList.add(`${X.zoomedSlideClass}`):Y.scale<=1&&we.slideEl&&we.slideEl.classList.remove(`${X.zoomedSlideClass}`),1===Y.scale&&(we.originX=0,we.originY=0,we.slideEl=void 0)))}function P(){H.touchEventsData.preventTouchMoveFromPointerMove=!1}function L(G){if(!S(G)||!function(G){const X=`.${H.params.zoom.containerClass}`;return!!G.target.matches(X)||[...H.hostEl.querySelectorAll(X)].filter(H=>H.contains(G.target)).length>0}(G))return;const X=H.zoom;if(!we.imageEl)return;if(!be.isTouched||!we.slideEl)return;be.isMoved||(be.width=we.imageEl.offsetWidth||we.imageEl.clientWidth,be.height=we.imageEl.offsetHeight||we.imageEl.clientHeight,be.startX=d(we.imageWrapEl,"x")||0,be.startY=d(we.imageWrapEl,"y")||0,we.slideWidth=we.slideEl.offsetWidth,we.slideHeight=we.slideEl.offsetHeight,we.imageWrapEl.style.transitionDuration="0ms");const Y=be.width*X.scale,Q=be.height*X.scale;if(Y<we.slideWidth&&Q<we.slideHeight)return void P();if(be.minX=Math.min(we.slideWidth/2-Y/2,0),be.maxX=-be.minX,be.minY=Math.min(we.slideHeight/2-Q/2,0),be.maxY=-be.minY,be.touchesCurrent.x=ve.length>0?ve[0].pageX:G.pageX,be.touchesCurrent.y=ve.length>0?ve[0].pageY:G.pageY,Math.max(Math.abs(be.touchesCurrent.x-be.touchesStart.x),Math.abs(be.touchesCurrent.y-be.touchesStart.y))>5&&(H.allowClick=!1),!be.isMoved&&!ge){if(H.isHorizontal()&&(Math.floor(be.minX)===Math.floor(be.startX)&&be.touchesCurrent.x<be.touchesStart.x||Math.floor(be.maxX)===Math.floor(be.startX)&&be.touchesCurrent.x>be.touchesStart.x))return be.isTouched=!1,void P();if(!H.isHorizontal()&&(Math.floor(be.minY)===Math.floor(be.startY)&&be.touchesCurrent.y<be.touchesStart.y||Math.floor(be.maxY)===Math.floor(be.startY)&&be.touchesCurrent.y>be.touchesStart.y))return be.isTouched=!1,void P()}G.cancelable&&G.preventDefault(),G.stopPropagation(),clearTimeout(Ee),H.touchEventsData.preventTouchMoveFromPointerMove=!0,Ee=setTimeout(()=>{P()}),be.isMoved=!0;const ee=(X.scale-fe)/(we.maxRatio-H.params.zoom.minRatio),{originX:te,originY:he}=we;be.currentX=be.touchesCurrent.x-be.touchesStart.x+be.startX+ee*(be.width-2*te),be.currentY=be.touchesCurrent.y-be.touchesStart.y+be.startY+ee*(be.height-2*he),be.currentX<be.minX&&(be.currentX=be.minX+1-(be.minX-be.currentX+1)**.8),be.currentX>be.maxX&&(be.currentX=be.maxX-1+(be.currentX-be.maxX+1)**.8),be.currentY<be.minY&&(be.currentY=be.minY+1-(be.minY-be.currentY+1)**.8),be.currentY>be.maxY&&(be.currentY=be.maxY-1+(be.currentY-be.maxY+1)**.8),ye.prevPositionX||(ye.prevPositionX=be.touchesCurrent.x),ye.prevPositionY||(ye.prevPositionY=be.touchesCurrent.y),ye.prevTime||(ye.prevTime=Date.now()),ye.x=(be.touchesCurrent.x-ye.prevPositionX)/(Date.now()-ye.prevTime)/2,ye.y=(be.touchesCurrent.y-ye.prevPositionY)/(Date.now()-ye.prevTime)/2,Math.abs(be.touchesCurrent.x-ye.prevPositionX)<2&&(ye.x=0),Math.abs(be.touchesCurrent.y-ye.prevPositionY)<2&&(ye.y=0),ye.prevPositionX=be.touchesCurrent.x,ye.prevPositionY=be.touchesCurrent.y,ye.prevTime=Date.now(),we.imageWrapEl.style.transform=`translate3d(${be.currentX}px, ${be.currentY}px,0)`}function I(){const G=H.zoom;we.slideEl&&H.activeIndex!==H.slides.indexOf(we.slideEl)&&(we.imageEl&&(we.imageEl.style.transform="translate3d(0,
500,0) scale(1)"),we.imageWrapEl&&(we.imageWrapEl.style.transform="translate3d(0,0,0)"),we.slideEl.classList.remove(`${H.params.zoom.zoomedSlideClass}`),G.scale=1,fe=1,we.slideEl=void 0,we.imageEl=void 0,we.imageWrapEl=void 0,we.originX=0,we.originY=0)}function z(G){const X=H.zoom,Y=H.params.zoom;if(!we.slideEl){G&&G.target&&(we.slideEl=G.target.closest(`.${H.params.slideClass}, swiper-slide`)),we.slideEl||(H.params.virtual&&H.params.virtual.enabled&&H.virtual?we.slideEl=f(H.slidesEl,`.${H.params.slideActiveClass}`)[0]:we.slideEl=H.slides[H.activeIndex]);let X=we.slideEl.querySelector(`.${Y.containerClass}`);X&&(X=X.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),we.imageEl=X,we.imageWrapEl=X?E(we.imageEl,`.${Y.containerClass}`)[0]:void 0}if(!we.imageEl||!we.imageWrapEl)return;let Q,te,he,ge,ve,ye,Ee,xe,Se,Te,Me,Ce,Pe,Le,Ie,ze,Ae,$e;H.params.cssMode&&(H.wrapperEl.style.overflow="hidden",H.wrapperEl.style.touchAction="none"),we.slideEl.classList.add(`${Y.zoomedSlideClass}`),void 0===be.touchesStart.x&&G?(Q=G.pageX,te=G.pageY):(Q=be.touchesStart.x,te=be.touchesStart.y);const ke="number"==typeof G?G:null;1===fe&&ke&&(Q=void 0,te=void 0);const Oe=x();X.scale=ke||Oe,fe=ke||Oe,!G||1===fe&&ke?(Ee=0,xe=0):(Ae=we.slideEl.offsetWidth,$e=we.slideEl.offsetHeight,he=w(we.slideEl).left+ee.scrollX,ge=w(we.slideEl).top+ee.scrollY,ve=he+Ae/2-Q,ye=ge+$e/2-te,Se=we.imageEl.offsetWidth||we.imageEl.clientWidth,Te=we.imageEl.offsetHeight||we.imageEl.clientHeight,Me=Se*X.scale,Ce=Te*X.scale,Pe=Math.min(Ae/2-Me/2,0),Le=Math.min($e/2-Ce/2,0),Ie=-Pe,ze=-Le,Ee=ve*X.scale,xe=ye*X.scale,Ee<Pe&&(Ee=Pe),Ee>Ie&&(Ee=Ie),xe<Le&&(xe=Le),xe>ze&&(xe=ze)),ke&&1===X.scale&&(we.originX=0,we.originY=0),we.imageWrapEl.style.transitionDuration="300ms",we.imageWrapEl.style.transform=`translate3d(${Ee}px, ${xe}px,0)`,we.imageEl.style.transitionDuration="300ms",we.imageEl.style.transform=`translate3d(0,0,0) scale(${X.scale})`}function A(){const G=H.zoom,X=H.params.zoom;if(!we.slideEl){H.params.virtual&&H.params.virtual.enabled&&H.virtual?we.slideEl=f(H.slidesEl,`.${H.params.slideActiveClass}`)[0]:we.slideEl=H.slides[H.activeIndex];let G=we.slideEl.querySelector(`.${X.containerClass}`);G&&(G=G.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),we.imageEl=G,we.imageWrapEl=G?E(we.imageEl,`.${X.containerClass}`)[0]:void 0}we.imageEl&&we.imageWrapEl&&(H.params.cssMode&&(H.wrapperEl.style.overflow="",H.wrapperEl.style.touchAction=""),G.scale=1,fe=1,we.imageWrapEl.style.transitionDuration="300ms",we.imageWrapEl.style.transform="translate3d(0,0,0)",we.imageEl.style.transitionDuration="300ms",we.imageEl.style.transform="translate3d(0,0,0) scale(1)",we.slideEl.classList.remove(`${X.zoomedSlideClass}`),we.slideEl=void 0,we.originX=0,we.originY=0)}function $(G){const X=H.zoom;X.scale&&1!==X.scale?A():z(G)}function k(){return{passiveListener:!!H.params.passiveListeners&&{passive:!0,capture:!1},activeListenerWithCapture:!H.params.passiveListeners||{passive:!1,capture:!0}}}function O(){const G=H.zoom;if(G.enabled)return;G.enabled=!0;const{passiveListener:X,activeListenerWithCapture:Y}=k();H.wrapperEl.addEventListener("pointerdown",T,X),H.wrapperEl.addEventListener("pointermove",M,Y),["pointerup","pointercancel","pointerout"].forEach(G=>{H.wrapperEl.addEventListener(G,C,X)}),H.wrapperEl.addEventListener("pointermove",L,Y)}function D(){const G=H.zoom;if(!G.enabled)return;G.enabled=!1;const{passiveListener:X,activeListenerWithCapture:Y}=k();H.wrapperEl.removeEventListener("pointerdown",T,X),H.wrapperEl.removeEventListener("pointermove",M,Y),["pointerup","pointercancel","pointerout"].forEach(G=>{H.wrapperEl.removeEventListener(G,C,X)}),H.wrapperEl.removeEventListener("pointermove",L,Y)}Object.defineProperty(H.zoom,"scale",{get:()=>xe,set(G){if(xe!==G){const H=we.imageEl,X=we.slideEl;Q("zoomChange",G,H,X)}xe=G}}),Y("init",()=>{H.params.zoom.enabled&&O()}),Y("destroy",()=>{D()}),Y("touchStart",(G,X)=>{H.zoom.enabled&&function(G){const X=H.device;if(!we.imageEl)return;if(be.isTouched)return;X.android&&G.cancelable&&G.preventDefault(),be.isTouched=!0;const Y=ve.length>0?ve[0]:G;be.touchesStart.x=Y.pageX,be.touchesStart.y=Y.pageY}(X)}),Y("touchEnd",(G,X)=>{H.zoom.enabled&&function(){const G=H.zoom;if(!we.imageEl)return;if(!be.isTouched||!be.isMoved)return be.isTouched=!1,void(be.isMoved=!1);be.isTouched=!1,be.isMoved=!1;let X=300,Y=300;const Q=ye.x*X,ee=be.currentX+Q,te=ye.y*Y,he=be.currentY+te;0!==ye.x&&(X=Math.abs((ee-be.currentX)/ye.x)),0!==ye.y&&(Y=Math.abs((he-be.currentY)/ye.y));const fe=Math.max(X,Y);be.currentX=ee,be.currentY=he;const ge=be.width*G.scale,ve=be.height*G.scale;be.minX=Math.min(we.slideWidth/2-ge/2,0),be.maxX=-be.minX,be.minY=Math.min(we.slideHeight/2-ve/2,0),be.maxY=-be.minY,be.currentX=Math.max(Math.min(be.currentX,be.maxX),be.minX),be.currentY=Math.max(Math.min(be.currentY,be.maxY),be.minY),we.imageWrapEl.style.transitionDuration=`${fe}ms`,we.imageWrapEl.style.transform=`translate3d(${be.currentX}px, ${be.currentY}px,0)`}()}),Y("doubleTap",(G,X)=>{!H.animating&&H.params.zoom.enabled&&H.zoom.enabled&&H.params.zoom.toggle&&$(X)}),Y("transitionEnd",()=>{H.zoom.enabled&&H.params.zoom.enabled&&I()}),Y("slideChange",()=>{H.zoom.enabled&&H.params.zoom.enabled&&H.params.cssMode&&I()}),Object.assign(H.zoom,{enable:O,disable:D,in:z,out:A,toggle:$})},function(G){let{swiper:H,extendParams:X,on:Y}=G;function i(G,H){const X=function(){let G,H,X;return(Y,Q)=>{for(H=-1,G=Y.length;G-H>1;)X=G+H>>1,Y[X]<=Q?H=X:G=X;return G}}();let Y,Q;return this.x=G,this.y=H,this.lastIndex=G.length-1,this.interpolate=function(G){return G?(Q=X(this.x,G),Y=Q-1,(G-this.x[Y])*(this.y[Q]-this.y[Y])/(this.x[Q
50]-this.x[Y])+this.y[Y]):0},this}function r(){H.controller.control&&H.controller.spline&&(H.controller.spline=void 0,delete H.controller.spline)}X({controller:{control:void 0,inverse:!1,by:"slide"}}),H.controller={control:void 0},Y("beforeInit",()=>{if("undefined"!=typeof window&&("string"==typeof H.params.controller.control||H.params.controller.control instanceof HTMLElement)){const G=document.querySelector(H.params.controller.control);if(G&&G.swiper)H.controller.control=G.swiper;else if(G){const s=X=>{H.controller.control=X.detail[0],H.update(),G.removeEventListener("init",s)};G.addEventListener("init",s)}}else H.controller.control=H.params.controller.control}),Y("update",()=>{r()}),Y("resize",()=>{r()}),Y("observerUpdate",()=>{r()}),Y("setTranslate",(G,X,Y)=>{H.controller.control&&!H.controller.control.destroyed&&H.controller.setTranslate(X,Y)}),Y("setTransition",(G,X,Y)=>{H.controller.control&&!H.controller.control.destroyed&&H.controller.setTransition(X,Y)}),Object.assign(H.controller,{setTranslate:function(G,X){const Y=H.controller.control;let Q,ee;const te=H.constructor;function o(G){if(G.destroyed)return;const X=H.rtlTranslate?-H.translate:H.translate;"slide"===H.params.controller.by&&(function(G){H.controller.spline=H.params.loop?new i(H.slidesGrid,G.slidesGrid):new i(H.snapGrid,G.snapGrid)}(G),ee=-H.controller.spline.interpolate(-X)),ee&&"container"!==H.params.controller.by||(Q=(G.maxTranslate()-G.minTranslate())/(H.maxTranslate()-H.minTranslate()),!Number.isNaN(Q)&&Number.isFinite(Q)||(Q=1),ee=(X-H.minTranslate())*Q+G.minTranslate()),H.params.controller.inverse&&(ee=G.maxTranslate()-ee),G.updateProgress(ee),G.setTranslate(ee,H),G.updateActiveIndex(),G.updateSlidesClasses()}if(Array.isArray(Y))for(let G=0;G<Y.length;G+=1)Y[G]!==X&&Y[G]instanceof te&&o(Y[G]);else Y instanceof te&&X!==Y&&o(Y)},setTransition:function(G,X){const Y=H.constructor,Q=H.controller.control;let ee;function n(X){X.destroyed||(X.setTransition(G,H),0!==G&&(X.transitionStart(),X.params.autoHeight&&l(()=>{X.updateAutoHeight()}),x(X.wrapperEl,()=>{Q&&X.transitionEnd()})))}if(Array.isArray(Q))for(ee=0;ee<Q.length;ee+=1)Q[ee]!==X&&Q[ee]instanceof Y&&n(Q[ee]);else Q instanceof Y&&X!==Q&&n(Q)}})},function(G){let{swiper:H,extendParams:X,on:Y}=G;X({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}}),H.a11y={clicked:!1};let Q,ee,te=null,he=(new Date).getTime();function d(G){const H=te;0!==H.length&&(H.innerHTML="",H.innerHTML=G)}function c(G){(G=T(G)).forEach(G=>{G.setAttribute("tabIndex","0")})}function p(G){(G=T(G)).forEach(G=>{G.setAttribute("tabIndex","-1")})}function u(G,H){(G=T(G)).forEach(G=>{G.setAttribute("role",H)})}function m(G,H){(G=T(G)).forEach(G=>{G.setAttribute("aria-roledescription",H)})}function h(G,H){(G=T(G)).forEach(G=>{G.setAttribute("aria-label",H)})}function f(G){(G=T(G)).forEach(G=>{G.setAttribute("aria-disabled",!0)})}function g(G){(G=T(G)).forEach(G=>{G.setAttribute("aria-disabled",!1)})}function w(G){if(13!==G.keyCode&&32!==G.keyCode)return;const X=H.params.a11y,Y=G.target;if(!H.pagination||!H.pagination.el||Y!==H.pagination.el&&!H.pagination.el.contains(G.target)||G.target.matches(ie(H.params.pagination.bulletClass))){if(H.navigation&&H.navigation.prevEl&&H.navigation.nextEl){const G=T(H.navigation.prevEl);T(H.navigation.nextEl).includes(Y)&&(H.isEnd&&!H.params.loop||H.slideNext(),H.isEnd?d(X.lastSlideMessage):d(X.nextSlideMessage)),G.includes(Y)&&(H.isBeginning&&!H.params.loop||H.slidePrev(),H.isBeginning?d(X.firstSlideMessage):d(X.prevSlideMessage))}H.pagination&&Y.matches(ie(H.params.pagination.bulletClass))&&Y.click()}}function b(){return H.pagination&&H.pagination.bullets&&H.pagination.bullets.length}function E(){return b()&&H.params.pagination.clickable}const x=(G,H,X)=>{c(G),"BUTTON"!==G.tagName&&(u(G,"button"),G.addEventListener("keydown",w)),h(G,X),function(G,H){(G=T(G)).forEac
50h(G=>{G.setAttribute("aria-controls",H)})}(G,H)},S=G=>{ee&&ee!==G.target&&!ee.contains(G.target)&&(Q=!0),H.a11y.clicked=!0},M=()=>{Q=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>{H.destroyed||(H.a11y.clicked=!1)})})},C=G=>{he=(new Date).getTime()},P=G=>{if(H.a11y.clicked)return;if((new Date).getTime()-he<100)return;const X=G.target.closest(`.${H.params.slideClass}, swiper-slide`);if(!X||!H.slides.includes(X))return;ee=X;const Y=H.slides.indexOf(X)===H.activeIndex,te=H.params.watchSlidesProgress&&H.visibleSlides&&H.visibleSlides.includes(X);Y||te||G.sourceCapabilities&&G.sourceCapabilities.firesTouchEvents||(H.isHorizontal()?H.el.scrollLeft=0:H.el.scrollTop=0,requestAnimationFrame(()=>{Q||(H.slideTo(H.slides.indexOf(X),0),Q=!1)}))},L=()=>{const G=H.params.a11y;G.itemRoleDescriptionMessage&&m(H.slides,G.itemRoleDescriptionMessage),G.slideRole&&u(H.slides,G.slideRole);const X=H.slides.length;G.slideLabelMessage&&H.slides.forEach((Y,Q)=>{const ee=H.params.loop?parseInt(Y.getAttribute("data-swiper-slide-index"),10):Q;h(Y,G.slideLabelMessage.replace(/\{\{index\}\}/,ee+1).replace(/\{\{slidesLength\}\}/,X))})};Y("beforeInit",()=>{te=v("span",H.params.a11y.notificationClass),te.setAttribute("aria-live","assertive"),te.setAttribute("aria-atomic","true")}),Y("afterInit",()=>{H.params.a11y.enabled&&(()=>{const G=H.params.a11y;H.el.append(te);const X=H.el;G.containerRoleDescriptionMessage&&m(X,G.containerRoleDescriptionMessage),G.containerMessage&&h(X,G.containerMessage);const Y=H.wrapperEl,Q=G.id||Y.getAttribute("id")||`swiper-wrapper-${ee=16,void 0===ee&&(ee=16),"x".repeat(ee).replace(/x/g,()=>Math.round(16*Math.random()).toString(16))}`;var ee;const he=H.params.autoplay&&H.params.autoplay.enabled?"off":"polite";var fe;fe=Q,T(Y).forEach(G=>{G.setAttribute("id",fe)}),function(G,H){(G=T(G)).forEach(G=>{G.setAttribute("aria-live",H)})}(Y,he),L();let{nextEl:ge,prevEl:ve}=H.navigation?H.navigation:{};ge=T(ge),ve=T(ve),ge&&ge.forEach(H=>x(H,Q,G.nextSlideMessage)),ve&&ve.forEach(H=>x(H,Q,G.prevSlideMessage)),E()&&T(H.pagination.el).forEach(G=>{G.addEventListener("keydown",w)}),a().addEventListener("visibilitychange",C),H.el.addEventListener("focus",P,!0),H.el.addEventListener("focus",P,!0),H.el.addEventListener("pointerdown",S,!0),H.el.addEventListener("pointerup",M,!0)})()}),Y("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{H.params.a11y.enabled&&L()}),Y("fromEdge toEdge afterInit lock unlock",()=>{H.params.a11y.enabled&&function(){if(H.params.loop||H.params.rewind||!H.navigation)return;const{nextEl:G,prevEl:X}=H.navigation;X&&(H.isBeginning?(f(X),p(X)):(g(X),c(X))),G&&(H.isEnd?(f(G),p(G)):(g(G),c(G)))}()}),Y("paginationUpdate",()=>{H.params.a11y.enabled&&function(){const G=H.params.a11y;b()&&H.pagination.bullets.forEach(X=>{H.params.pagination.clickable&&(c(X),H.params.pagination.renderBullet||(u(X,"button"),h(X,G.paginationBulletMessage.replace(/\{\{index\}\}/,y(X)+1)))),X.matches(ie(H.params.pagination.bulletActiveClass))?X.setAttribute("aria-current","true"):X.removeAttribute("aria-current")})}()}),Y("destroy",()=>{H.params.a11y.enabled&&function(){te&&te.remove();let{nextEl:G,prevEl:X}=H.navigation?H.navigation:{};G=T(G),X=T(X),G&&G.forEach(G=>G.removeEventListener("keydown",w)),X&&X.forEach(G=>G.removeEventListener("keydown",w)),E()&&T(H.pagination.el).forEach(G=>{G.removeEventListener("keydown",w)}),a().removeEventListener("visibilitychange",C),H.el.removeEventListener("focus",P,!0),H.el.removeEventListener("pointerdown",S,!0),H.el.removeEventListener("pointerup",M,!0)}()})},function(G){let{swiper:H,extendParams:X,on:Y}=G;X({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let Q=!1,ee={};const l=G=>G.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),o=G=>{const H=r();let X;X=G?new URL(G):H.location;const Y=X.pathname.slice(1).split("/").filter(G=>""!==G),Q=Y.length;return{key:Y[Q-2],value:Y[Q-1]}},d=(G,X)=>{const Y=r();if(!Q||!H.params.history.enabled)return;let ee;ee=H.params.url?new URL(H.params.url):Y.location;const te=H.virtual&&H.params.virtual.enabled?H.slidesEl.querySelector(`[data-swiper-slide-index="${X}"]`):H.slides[X];let he=l(te.getAttribute("data-history"));if(H.params.history.root.length>0){let X=H.params.history.root;"/"===X[X.length-1]&&(X=X.slice(0,X.length-1)),he=`${X}/${G?`${G}/`:""}${he}`}else ee.pathname.includes(G)||(he=`${G?`${G}/`:""}${he}`);H.params.history.keepQuery&&(he+=ee.search);const fe=Y.history.state;fe&&fe.value===he||(H.params.history.replaceState?Y.history.replaceState({value:he},null,he):Y.history.pushState({value:he},null,he))},c=(G,X,Y)=>{if(X)for(let Q=0,ee=H.slides.length;Q<ee;Q+=1){const ee=H.slides[Q];if(l(ee.getAttribute("data-history"))===X){const X=H.getSlideIndex(ee);H.slideTo(X,G,Y)}}else H.slideTo(0,G,Y)},p=()=>{ee=o(H.params.url),c(H.params.speed,ee.value,!1)};Y("init",()=>{H.params.history.enabled&&(()=>{const G=r();
vendor: 24,084 bytes, line 50
50if(H.params.history){if(!G.history||!G.history.pushState)return H.params.history.enabled=!1,void(H.params.hashNavigation.enabled=!0);Q=!0,ee=o(H.params.url),ee.key||ee.value?(c(0,ee.value,H.params.runCallbacksOnInit),H.params.history.replaceState||G.addEventListener("popstate",p)):H.params.history.replaceState||G.addEventListener("popstate",p)}})()}),Y("destroy",()=>{H.params.history.enabled&&(()=>{const G=r();H.params.history.replaceState||G.removeEventListener("popstate",p)})()}),Y("transitionEnd _freeModeNoMomentumRelease",()=>{Q&&d(H.params.history.key,H.activeIndex)}),Y("slideChange",()=>{Q&&H.params.cssMode&&d(H.params.history.key,H.activeIndex)})},function(G){let{swiper:H,extendParams:X,emit:Y,on:Q}=G,ee=!1;const te=a(),he=r();X({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(G,X){if(H.virtual&&H.params.virtual.enabled){const G=H.slides.filter(G=>G.getAttribute("data-hash")===X)[0];return G?parseInt(G.getAttribute("data-swiper-slide-index"),10):0}return H.getSlideIndex(f(H.slidesEl,`.${H.params.slideClass}[data-hash="${X}"], swiper-slide[data-hash="${X}"]`)[0])}}});const c=()=>{Y("hashChange");const G=te.location.hash.replace("#",""),X=H.virtual&&H.params.virtual.enabled?H.slidesEl.querySelector(`[data-swiper-slide-index="${H.activeIndex}"]`):H.slides[H.activeIndex];if(G!==(X?X.getAttribute("data-hash"):"")){const X=H.params.hashNavigation.getSlideIndex(H,G);if(void 0===X||Number.isNaN(X))return;H.slideTo(X)}},p=()=>{if(!ee||!H.params.hashNavigation.enabled)return;const G=H.virtual&&H.params.virtual.enabled?H.slidesEl.querySelector(`[data-swiper-slide-index="${H.activeIndex}"]`):H.slides[H.activeIndex],X=G?G.getAttribute("data-hash")||G.getAttribute("data-history"):"";H.params.hashNavigation.replaceState&&he.history&&he.history.replaceState?(he.history.replaceState(null,null,`#${X}`||""),Y("hashSet")):(te.location.hash=X||"",Y("hashSet"))};Q("init",()=>{H.params.hashNavigation.enabled&&(()=>{if(!H.params.hashNavigation.enabled||H.params.history&&H.params.history.enabled)return;ee=!0;const G=te.location.hash.replace("#","");if(G){const X=0,Y=H.params.hashNavigation.getSlideIndex(H,G);H.slideTo(Y||0,X,H.params.runCallbacksOnInit,!0)}H.params.hashNavigation.watchState&&he.addEventListener("hashchange",c)})()}),Q("destroy",()=>{H.params.hashNavigation.enabled&&H.params.hashNavigation.watchState&&he.removeEventListener("hashchange",c)}),Q("transitionEnd _freeModeNoMomentumRelease",()=>{ee&&p()}),Q("slideChange",()=>{ee&&H.params.cssMode&&p()})},function(G){let H,X,{swiper:Y,extendParams:Q,on:ee,emit:te,params:he}=G;Y.autoplay={running:!1,paused:!1,timeLeft:0},Q({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let fe,ge,ve,we,be,ye,Ee,xe,Se=he&&he.autoplay?he.autoplay.delay:3e3,Te=he&&he.autoplay?he.autoplay.delay:3e3,Me=(new Date).getTime();function y(G){Y&&!Y.destroyed&&Y.wrapperEl&&G.target===Y.wrapperEl&&(Y.wrapperEl.removeEventListener("transitionend",y),xe||C())}const E=()=>{if(Y.destroyed||!Y.autoplay.running)return;Y.autoplay.paused?ge=!0:ge&&(Te=fe,ge=!1);const G=Y.autoplay.paused?fe:Me+Te-(new Date).getTime();Y.autoplay.timeLeft=G,te("autoplayTimeLeft",G,G/Se),X=requestAnimationFrame(()=>{E()})},x=G=>{if(Y.destroyed||!Y.autoplay.running)return;cancelAnimationFrame(X),E();let Q=void 0===G?Y.params.autoplay.delay:G;Se=Y.params.autoplay.delay,Te=Y.params.autoplay.delay;const ee=(()=>{let G;if(G=Y.virtual&&Y.params.virtual.enabled?Y.slides.filter(G=>G.classList.contains("swiper-slide-active"))[0]:Y.slides[Y.activeIndex],G)return parseInt(G.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(ee)&&ee>0&&void 0===G&&(Q=ee,Se=ee,Te=ee),fe=Q;const he=Y.params.speed,o=()=>{Y&&!Y.destroyed&&(Y.params.autoplay.reverseDirection?!Y.isBeginning||Y.params.loop||Y.params.rewind?(Y.slidePrev(he,!0,!0),te("autoplay")):Y.params.autoplay.stopOnLastSlide||(Y.slideTo(Y.slides.length-1,he,!0,!0),te("autoplay")):!Y.isEnd||Y.params.loop||Y.params.rewind?(Y.slideNext(he,!0,!0),te("autoplay")):Y.params.autoplay.stopOnLastSlide||(Y.slideTo(0,he,!0,!0),te("autoplay")),Y.params.cssMode&&(Me=(new Date).getTime(),requestAnimationFrame(()=>{x()})))};return Q>0?(clearTimeout(H),H=setTimeout(()=>{o()},Q)):requestAnimationFrame(()=>{o()}),Q},S=()=>{Me=(new Date).getTime(),Y.autoplay.running=!0,x(),te("autoplayStart")},T=()=>{Y.autoplay.running=!1,clearTimeout(H),cancelAnimationFrame(X),te("autoplayStop")},M=(G,X)=>{if(Y.destroyed||!Y.autoplay.running)return;clearTimeout(H),G||(Ee=!0);const a=()=>{te("autoplayPause"),Y.params.autoplay.waitForTransition?Y.wrapperEl.addEventListener("transitionend",y):C()};if(Y.autoplay.paused=!0,X)return ye&&(fe=Y.params.autoplay.delay),ye=!1,void a();const Q=fe||Y.params.autoplay.delay;fe=Q-((new Date).getTime()-Me),Y.isEnd&&fe<0&&!Y.params.loop||(fe<0&&(fe=0),a())},C=()=>{Y.isEnd&&fe<0&&!Y.params.loop||Y.destroyed||!Y.autoplay.running||(Me=(new Date).getTime(),Ee?(Ee=!1,x(fe)):x(),Y.autoplay.paused=!1,te("autoplayResume"))},P=()=>{if(Y.destroyed||!Y.autoplay.running)return;const G=a();"hidden"===G.visibilityState&&(Ee=!0,M(!0)),"visible"===G.visibilityState&&C()},L=G=>{"mouse"===G.pointerType&&(Ee=!0,xe=!0,Y.animating||Y.autoplay.paused||M(!0))},I=G=>{"mouse"===G.pointerType&&(xe=!1,Y.autoplay.paused&&C())};ee("init",()=>{Y.params.autoplay.enabled&&(Y.params.autoplay.pauseOnMouseEnter&&(Y.el.addEventListener("pointerenter",L),Y.el.addEventListener("pointerleave",I)),a().addEventListener("visibilitychange",P),S())}),ee("destroy",()=>{Y.el.removeEventListener("pointerenter",L),Y.el.removeEventListener("pointerleave",I),a().removeEventListener("visibilitychange",P),Y.autoplay.running&&T()}),ee("_freeModeStaticRelease",()=>{(we||Ee)&&C()}),ee("_freeModeNoMomentumRelease",()=>{Y.params.autoplay.disableOnInteraction?T():M(!0,!0)}),ee("beforeTransitionStart",(G,H,X)=>{!Y.destroyed&&Y.autoplay.running&&(X||!Y.params.autoplay.disableOnInteraction?M(!0,!0):T())}),ee("sliderFirstMove",()=>{!Y.destroyed&&Y.autoplay.running&&(Y.params.autoplay.disableOnInteraction?T():(ve=!0,we=!1,Ee=!1,be=setTimeout(()=>{Ee=!0,we=!0,M(!0)},200)))}),ee("touchEnd",()=>{if(!Y.destroyed&&Y.autoplay.running&&ve){if(clearTimeout(be),clearTimeout(H),Y.params.autoplay.disableOnInteraction)return we=!1,void(ve=!1);we&&Y.params.cssMode&&C(),we=!1,ve=!1}}),ee("slideChange",()=>{!Y.destroyed&&Y.autoplay.running&&(ye=!0)}),Object.assign(Y.autoplay,{start:S,stop:T,pause:M,resume:C})},function(G){let{swiper:H,extendParams:X,on:Y}=G;X({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let Q=!1,ee=!1;function l(){const G=H.thumbs.swiper;if(!G||G.destroyed)return;const X=G.clickedIndex,Y=G.clickedSlide;if(Y&&Y.classList.contains(H.params.thumbs.slideThumbActiveClass))return;if(null==X)return;let Q;Q=G.params.loop?parseInt(G.clickedSlide.getAttribute("data-swiper-slide-index"),10):X,H.params.loop?H.slideToLoop(Q):H.slideTo(Q)}function o(){const{thumbs:G}=H.params;if(Q)return!1;Q=!0;const X=H.constructor;if(G.swiper instanceof X)H.thumbs.swiper=G.swiper,Object.assign(H.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(H.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),H.thumbs.swiper.update();else if(c(G.swiper)){const Y=Object.assign({},G.swiper);Object.assign(Y,{watchSlidesProgress:!0,slideToClickedSlide:!1}),H.thumbs.swiper=new X(Y),ee=!0}return H.thumbs.swiper.el.classList.add(H.params.thumbs.thumbsContainerClass),H.thumbs.swiper.on("tap",l),!0}function d(G){const X=H.thumbs.swiper;if(!X||X.destroyed)return;const Y="auto"===X.params.slidesPerView?X.slidesPerViewDynamic():X.params.slidesPerView;let Q=1;const ee=H.params.thumbs.slideThumbActiveClass;if(H.params.slidesPerView>1&&!H.params.centeredSlides&&(Q=H.params.slidesPerView),H.params.thumbs.multipleActiveThumbs||(Q=1),Q=Math.floor(Q),X.slides.forEach(G=>G.classList.remove(ee)),X.params.loop||X.params.virtual&&X.params.virtual.enabled)for(let G=0;G<Q;G+=1)f(X.slidesEl,`[data-swiper-slide-index="${H.realIndex+G}"]`).forEach(G=>{G.classList.add(ee)});else for(let G=0;G<Q;G+=1)X.slides[H.realIndex+G]&&X.slides[H.realIndex+G].classList.add(ee);const te=H.params.thumbs.autoScrollOffset,he=te&&!X.params.loop;if(H.realIndex!==X.realIndex||he){const Q=X.activeIndex;let ee,fe;if(X.params.loop){const G=X.slides.filter(G=>G.getAttribute("data-swiper-slide-index")===`${H.realIndex}`)[0];ee=X.slides.indexOf(G),fe=H.activeIndex>H.previousIndex?"next":"prev"}else ee=H.realIndex,fe=ee>H.previousIndex?"next":"prev";he&&(ee+="next"===fe?te:-1*te),X.visibleSlidesIndexes&&X.visibleSlidesIndexes.indexOf(ee)<0&&(X.params.centeredSlides?ee=ee>Q?ee-Math.floor(Y/2)+1:ee+Math.floor(Y/2)-1:ee>Q&&X.params.slidesPerGroup,X.slideTo(ee,G?0:void 0))}}H.thumbs={swiper:null},Y("beforeInit",()=>{const{thumbs:G}=H.params;if(G&&G.swiper)if("string"==typeof G.swiper||G.swiper instanceof HTMLElement){const X=a(),i=()=>{const Y="string"==typeof G.swiper?X.querySelector(G.swiper):G.swiper;if(Y&&Y.swiper)G.swiper=Y.swiper,o(),d(!0);else if(Y){const s=X=>{G.swiper=X.detail[0],Y.removeEventListener("init",s),o(),d(!0),G.swiper.update(),H.update()};Y.addEventListener("init",s)}return Y},r=()=>{H.destroyed||i()||requestAnimationFrame(r)};requestAnimationFrame(r)}else o(),d(!0)}),Y("slideChange update resize observerUpdate",()=>{d()}),Y("setTransition",(G,X)=>{const Y=H.thumbs.swiper;Y&&!Y.destroyed&&Y.setTransition(X)}),Y("beforeDestroy",()=>{const G=H.thumbs.swiper;G&&!G.destroyed&&ee&&G.destroy()}),Object.assign(H.thumbs,{init:o,update:d})},function(G){let{swiper:H,extendParams:X,emit:Y,once:Q}=G;X({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(H,{freeMode:{onTouchStart:function(){if(H.params.cssMode)return;const G=H.getTranslate();H.setTranslate(G),H.setTransition(0),H.touchEventsData.velocities.length=0,H.freeMode.onTouchEnd({currentPos:H.rtl?H.translate:-H.translate})},onTouchMove:function(){if(H.params.cssMode)return;const{touchEventsData:G,touches:X}=H;0===G.velocities.length&&G.velocities.push({position:X[H.isHorizontal()?"startX":"startY"],time:G.touchStartTime}),G.velocities.push({position:X[H.isHorizontal()?"currentX":"currentY"],time:o()})},onTouchEnd:function(G){let{currentPos:X}=G;if(H.params.cssMode)return;const{params:ee,wrapperEl:te,rtlTranslate:he,snapGrid:fe,touchEventsData:ge}=H,ve=o()-ge.touchStartTime;if(X<-H.minTranslate())H.slideTo(H.activeIndex);else if(X>-H.maxTranslate())H.slides.length<fe.length?H.slideTo(fe.length-1):H.slideTo(H.slides.length-1);else{if(ee.freeMode.momentum){if(ge.velocities.length>1){const G=ge.velocities.pop(),X=ge.velocities.pop(),Y=G.position-X.position,Q=G.time-X.time;H.velocity=Y/Q,H.velocity/=2,Math.abs(H.velocity)<ee.freeMode.minimumVelocity&&(H.velocity=0),(Q>150||o()-G.time>300)&&(H.velocity=0)}else H.velocity=0;H.velocity*=ee.freeMode.momentumVelocityRatio,ge.velocities.length=0;let G=1e3*ee.freeMode.momentumRatio;const X=H.velocity*G;let ve=H.translate+X;he&&(ve=-ve);let we,be=!1;const ye=20*Math.abs(H.velocity)*ee.freeMode.momentumBounceRatio;let Ee;if(ve<H.maxTranslate())ee.freeMode.momentumBounce?(ve+H.maxTranslate()<-ye&&(ve=H.maxTranslate()-ye),we=H.maxTranslate(),be=!0,ge.allowMomentumBounce=!0):ve=H.maxTranslate(),ee.loop&&ee.centeredSlides&&(Ee=!0);else if(ve>H.minTranslate())ee.freeMode.momentumBounce?(ve-H.minTranslate()>ye&&(ve=H.minTranslate()+ye),we=H.minTranslate(),be=!0,ge.allowMomentumBounce=!0):ve=H.minTranslate(),ee.loop&&ee.centeredSlides&&(Ee=!0);else if(ee.freeMode.sticky){let G;for(let H=0;H<fe.length;H+=1)if(fe[H]>-ve){G=H;break}ve=Math.abs(fe[G]-ve)<Math.abs(fe[G-1]-ve)||"next"===H.swipeDirection?fe[G]:fe[G-1],ve=-ve}if(Ee&&Q("transitionEnd",()=>{H.loopFix()}),0!==H.velocity){if(G=he?Math.abs((-ve-H.translate)/H.velocity):Math.abs((ve-H.translate)/H.velocity),ee.freeMode.sticky){const X=Math.abs((he?-ve:ve)-H.translate),Y=H.slidesSizesGrid[H.activeIndex];G=X<Y?ee.speed:X<2*Y?1.5*ee.speed:2.5*ee.speed}}else if(ee.freeMode.sticky)return void H.slideToClosest();ee.freeMode.momentumBounce&&be?(H.updateProgress(we),H.setTransition(G),H.setTranslate(ve),H.transitionStart(!0,H.swipeDirection),H.animating=!0,x(te,()=>{H&&!H.destroyed&&ge.allowMomentumBounce&&(Y("momentumBounce"),H.setTransition(ee.speed),setTimeout(()=>{H.setTranslate(we),x(te,()=>{H&&!H.destroyed&&H.transitionEnd()})},0))})):H.velocity?(Y("_freeModeNoMomentumRelease"),H.updateProgress(ve),H.setTransition(G),H.setTranslate(ve),H.transitionStart(!0,H.swipeDirection),H.animating||(H.animating=!0,x(te,()=>{H&&!H.destroyed&&H.transitionEnd()}))):H.updateProgress(ve),H.updateActiveIndex(),H.updateSlidesClasses()}else{if(ee.freeMode.sticky)return void H.slideToClosest();ee.freeMode&&Y("_freeModeNoMomentumRelease")}(!ee.freeMode.momentum||ve>=ee.longSwipesMs)&&(Y("_freeModeStaticRelease"),H.updateProgress(),H.updateActiveIndex(),H.updateSlidesClasses())}}}})},function(G){let H,X,Y,Q,{swiper:ee,extendParams:te,on:he}=G;te({grid:{rows:1,fill:"column"}});const o=()=>{let G=ee.params.spaceBetween;return"string"==typeof G&&G.indexOf("%")>=0?G=parseFloat(G.replace("%",""))/100*ee.size:"string"==typeof G&&(G=parseFloat(G)),G};he("init",()=>{Q=ee.params.grid&&ee.params.grid.rows>1}),he("update",()=>{const{params:G,el:H}=ee,X=G.grid&&G.grid.rows>1;Q&&!X?(H.classList.remove(`${G.containerModifierClass}grid`,`${G.containerModifierClass}grid-column`),Y=1,ee.emitContainerClasses()):!Q&&X&&(H.classList.add(`${G.containerModifierClass}grid`),"column"===G.grid.fill&&H.classList.add(`${G.containerModifierClass}grid-column`),ee.emitContainerClasses()),Q=X}),ee.grid={initSlides:G=>{const{slidesPerView:Q}=ee.params,{rows:te,fill:he}=ee.params.grid,fe=ee.virtual&&ee.params.virtual.enabled?ee.virtual.slides.length:G.length;Y=Math.floor(fe/te),H=Math.floor(fe/te)===fe/te?fe:Math.ceil(fe/te)*te,"auto"!==Q&&"row"===he&&(H=Math.max(H,Q*te)),X=H/te},unsetSlides:()=>{ee.slides&&ee.slides.forEach(G=>{G.swiperSlideGridSet&&(G.style.height="",G.style[ee.getDirectionLabel("margin-top")]="")})},updateSlide:(G,Q,te)=>{const{slidesPerGroup:he}=ee.params,fe=o(),{rows:ge,fill:ve}=ee.params.grid,we=ee.virtual&&ee.params.virtual.enabled?ee.virtual.slides.length:te.length;let be,ye,Ee;if("row"===ve&&he>1){const X=Math.floor(G/(he*ge)),Y=G-ge*he*X,ee=0===X?he:Math.min(Math.ceil((we-X*ge*he)/ge),he);Ee=Math.floor(Y/ee),ye=Y-Ee*ee+X*he,be=ye+Ee*H/ge,Q.style.order=be}else"column"===ve?(ye=Math.floor(G/ge),Ee=G-ye*ge,(ye>Y||ye===Y&&Ee===ge-1)&&(Ee+=1,Ee>=ge&&(Ee=0,ye+=1))):(Ee=Math.floor(G/X),ye=G-Ee*X);Q.row=Ee,Q.column=ye,Q.style.height=`calc((100% - ${(ge-1)*fe}px) / ${ge})`,Q.style[ee.getDirectionLabel("margin-top")]=0!==Ee?fe&&`${fe}px`:"",Q.swiperSlideGridSet=!0},updateWrapperSize:(G,X)=>{const{centeredSlides:Y,roundLengths:Q}=ee.params,te=o(),{rows:he}=ee.params.grid;if(ee.virtualSize=(G+te)*H,ee.virtualSize=Math.ceil(ee.virtualSize/he)-te,ee.params.cssMode||(ee.wrapperEl.style[ee.getDirectionLabel("width")]=`${ee.virtualSize+te}px`),Y){const G=[];for(let H=0;H<X.length;H+=1){let Y=X[H];Q&&(Y=Math.floor(Y)),X[H]<ee.virtualSize+X[0]&&G.push(Y)}X.splice(0,X.length),X.push(...G)}}}},function(G){let{swiper:H}=G;Object.assign(H,{appendSlide:re.bind(H),prependSlide:ne.bind(H),addSlide:le.bind(H),removeSlide:oe.bind(H),removeAllSlides:de.bind(H)})},function(G){let{swiper:H,extendParams:X,on:Y}=G;X({fadeEffect:{crossFade:!1}}),ce({effect:"fade",swiper:H,on:Y,setTranslate:()=>{const{slides:G}=H;H.params.fadeEffect;for(let X=0;X<G.length;X+=1){const G=H.slides[X];let Y=-G.swiperSlideOffset;H.params.virtualTranslate||(Y-=H.translate);let Q=0;H.isHorizontal()||(Q=Y,Y=0);const ee=H.params.fadeEffect.crossFade?Math.max(1-Math.abs(G.progress),0):1+Math.min(Math.max(G.progress,-1),0),te=pe(0,G);te.style.opacity=ee,te.style.transform=`translate3d(${Y}px, ${Q}px, 0px)`}},setTransition:G=>{const X=H.slides.map(G=>h(G));X.forEach(H=>{H.style.transitionDuration=`${G}ms`}),ue({swiper:H,duration:G,transformElements:X,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!H.params.cssMode})})},function(G){let{swiper:H,extendParams:X,on:Y}=G;X({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(G,H,X)=>{let Y=X?G.querySelector(".swiper-slide-shadow-left"):G.querySelector(".swiper-slide-shadow-top"),Q=X?G.querySelector(".swiper-slide-shadow-right"):G.querySelector(".swiper-slide-shadow-bottom");Y||(Y=v("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(X?"left":"top")).split(" ")),G.append(Y)),Q||(Q=v("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(X?"right":"bottom")).split(" ")),G.append(Q)),Y&&(Y.style.opacity=Math.max(-H,0)),Q&&(Q.style.opacity=Math.max(H,0))};ce({effect:"cube",swiper:H,on:Y,setTranslate:()=>{const{el:G,wrapperEl:X,slides:Y,width:Q,height:ee,rtlTranslate:te,size:he,browser:fe}=H,ge=H.params.cubeEffect,ve=H.isHorizontal(),we=H.virtual&&H.params.virtual.enabled;let be,ye=0;ge.shadow&&(ve?(be=H.wrapperEl.querySelector(".swiper-cube-shadow"),be||(be=v("div","swiper-cube-shadow"),H.wrapperEl.append(be)),be.style.height=`${Q}px`):(be=G.querySelector(".swiper-cube-shadow"),be||(be=v("div","swiper-cube-shadow"),G.append(be))));for(let G=0;G<Y.length;G+=1){const X=Y[G];let Q=G;we&&(Q=parseInt(X.getAttribute("data-swiper-slide-index"),10));let ee=90*Q,fe=Math.floor(ee/360);te&&(ee=-ee,fe=Math.floor(-ee/360));const be=Math.max(Math.min(X.progress,1),-1);let Ee=0,xe=0,Se=0;Q%4==0?(Ee=4*-fe*he,Se=0):(Q-1)%4==0?(Ee=0,Se=4*-fe*he):(Q-2)%4==0?(Ee=he+4*fe*he,Se=he):(Q-3)%4==0&&(Ee=-he,Se=3*he+4*he*fe),te&&(Ee=-Ee),ve||(xe=Ee,Ee=0);const Te=`rotateX(${ve?0:-ee}deg) rotateY(${ve?ee:0}deg) translate3d(${Ee}px, ${xe}px, ${Se}px)`;be<=1&&be>-1&&(ye=90*Q+90*be,te&&(ye=90*-Q-90*be),H.browser&&H.browser.need3dFix&&Math.abs(ye)/90%2==1&&(ye+=.001)),X.style.transform=Te,ge.slideShadows&&i(X,be,ve)}if(X.style.transformOrigin=`50% 50% -${he/2}px`,X.style["-webkit-transform-origin"]=`50% 50% -${he/2}px`,ge.shadow)if(ve)be.style.transform=`translate3d(0px, ${Q/2+ge.shadowOffset}px, ${-Q/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${ge.shadowScale})`;else{const G=Math.abs(ye)-90*Math.floor(Math.abs(ye)/90),H=1.5-(Math.sin(2*G*Math.PI/360)/2+Math.cos(2*G*Math.PI/360)/2),X=ge.shadowScale,Y=ge.shadowScale/H,Q=ge.shadowOffset;be.style.transform=`scale3d(${X}, 1, ${Y}) translate3d(0px, ${ee/2+Q}px, ${-ee/2/Y}px) rotateX(-89.99deg)`}const Ee=(fe.isSafari||fe.isWebView)&&fe.needPerspectiveFix?-he/2:0;X.style.transform=`translate3d(0px,0,${Ee}px) rotateX(${H.isHorizontal()?0:ye}deg) rotateY(${H.isHorizontal()?-ye:0}deg)`,X.style.setProperty("--swiper-cube-translate-z",`${Ee}px`)},setTransition:G=>{const{el:X,slides:Y}=H;if(Y.forEach(H=>{H.style.transitionDuration=`${G}ms`,H.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(H=>{H.style.transitionDuration=`${G}ms`})}),H.params.cubeEffect.shadow&&!H.isHorizontal()){const H=X.querySelector(".swiper-cube-shadow");H&&(H.style.transitionDuration=`${G}ms`)}},recreateShadows:()=>{const G=H.isHorizontal();H.slides.forEach(H=>{const X=Math.max(Math.min(H.progress,1),-1);i(H,X,G)})},getEffectParams:()=>H.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function(G){let{swiper:H,extendParams:X,on:Y}=G;X({flipEffect:{slideShadows:!0,limitRotation:!0}});const i=(G,X)=>{let Y=H.isHorizontal()?G.querySelector(".swiper-slide-shadow-left"):G.querySelector(".swiper-slide-shadow-top"),Q=H.isHorizontal()?G.querySelector(".swiper-slide-shadow-right"):G.querySelector(".swiper-slide-shadow-bottom");Y||(Y=me("flip",G,H.isHorizontal()?"left":"top")),Q||(Q=me("flip",G,H.isHorizontal()?"right":"bottom")),Y&&(Y.style.opacity=Math.max(-X,0)),Q&&(Q.style.opacity=Math.max(X,0))};ce({effect:"flip",swiper:H,on:Y,setTranslate:()=>{const{slides:G,rtlTranslate:X}=H,Y=H.params.flipEffect;for(let Q=0;Q<G.length;Q+=1){const ee=G[Q];let te=ee.progress;H.params.flipEffect.limitRotation&&(te=Math.max(Math.min(ee.progress,1),-1));const he=ee.swiperSlideOffset;let fe=-180*te,ge=0,ve=H.params.cssMode?-he-H.translate:-he,we=0;H.isHorizontal()?X&&(fe=-fe):(we=ve,ve=0,ge=-fe,fe=0),H.browser&&H.browser.need3dFix&&(Math.abs(fe)/90%2==1&&(fe+=.001),Math.abs(ge)/90%2==1&&(ge+=.001)),ee.style.zIndex=-Math.abs(Math.round(te))+G.length,Y.slideShadows&&i(ee,te);const be=`translate3d(${ve}px, ${we}px, 0px) rotateX(${ge}deg) rotateY(${fe}deg)`;pe(0,ee).style.transform=be}},setTransition:G=>{const X=H.slides.map(G=>h(G));X.forEach(H=>{H.style.transitionDuration=`${G}ms`,H.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(H=>{H.style.transitionDuration=`${G}ms`})}),ue({swiper:H,duration:G,transformElements:X})},recreateShadows:()=>{H.params.flipEffect,H.slides.forEach(G=>{let X=G.progress;H.params.flipEffect.limitRotation&&(X=Math.max(Math.min(G.progress,1),-1)),i(G,X)})},getEffectParams:()=>H.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!H.params.cssMode})})},function(G){let{swiper:H,extendParams:X,on:Y}=G;X({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),ce({effect:"coverflow",swiper:H,on:Y,setTranslate:()=>{const{width:G,height:X,slides:Y,slidesSizesGrid:Q}=H,ee=H.params.coverflowEffect,te=H.isHorizontal(),he=H.translate,fe=te?G/2-he:X/2-he,ge=te?ee.rotate:-ee.rotate,ve=ee.depth;for(let G=0,X=Y.length;G<X;G+=1){const X=Y[G],he=Q[G],we=(fe-X.swiperSlideOffset-he/2)/he,be="function"==typeof ee.modifier?ee.modifier(we):we*ee.modifier;let ye=te?ge*be:0,Ee=te?0:ge*be,xe=-ve*Math.abs(be),Se=ee.stretch;"string"==typeof Se&&-1!==Se.indexOf("%")&&(Se=parseFloat(ee.stretch)/100*he);let Te=te?0:Se*be,Me=te?Se*be:0,Ce=1-(1-ee.scale)*Math.abs(be);Math.abs(Me)<.001&&(Me=0),Math.abs(Te)<.001&&(Te=0),Math.abs(xe)<.001&&(xe=0),Math.abs(ye)<.001&&(ye=0),Math.abs(Ee)<.001&&(Ee=0),Math.abs(Ce)<.001&&(Ce=0),H.browser&&H.browser.need3dFix&&(Math.abs(ye)/90%2==1&&(ye+=.001),Math.abs(Ee)/90%2==1&&(Ee+=.001));const Pe=`translate3d(${Me}px,${Te}px,${xe}px)  rotateX(${Ee}deg) rotateY(${ye}deg) scale(${Ce})`;if(pe(0,X).style.transform=Pe,X.style.zIndex=1-Math.abs(Math.round(be)),ee.slideShadows){let G=te?X.querySelector(".swiper-slide-shadow-left"):X.querySelector(".swiper-slide-shadow-top"),H=te?X.querySelector(".swiper-slide-shadow-right"):X.querySelector(".swiper-slide-shadow-bottom");G||(G=me("coverflow",X,te?"left":"top")),H||(H=me("coverflow",X,te?"right":"bottom")),G&&(G.style.opacity=be>0?be:0),H&&(H.style.opacity=-be>0?-be:0)}}},setTransition:G=>{H.slides.map(G=>h(G)).forEach(H=>{H.style.transitionDuration=`${G}ms`,H.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(H=>{H.style.transitionDuration=`${G}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function(G){let{swiper:H,extendParams:X,on:Y}=G;X({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const i=G=>"string"==typeof G?G:`${G}px`;ce({effect:"creative",swiper:H,on:Y,setTranslate:()=>{const{slides:G,wrapperEl:X,slidesSizesGrid:Y}=H,Q=H.params.creativeEffect,{progressMultiplier:ee}=Q,te=H.params.centeredSlides;if(te){const G=Y[0]/2-H.params.slidesOffsetBefore||0;X.style.transform=`translateX(calc(50% - ${G}px))`}for(let X=0;X<G.length;X+=1){const Y=G[X],he=Y.progress,fe=Math.min(Math.max(Y.progress,-Q.limitProgress),Q.limitProgress);let ge=fe;
50te||(ge=Math.min(Math.max(Y.originalProgress,-Q.limitProgress),Q.limitProgress));const ve=Y.swiperSlideOffset,we=[H.params.cssMode?-ve-H.translate:-ve,0,0],be=[0,0,0];let ye=!1;H.isHorizontal()||(we[1]=we[0],we[0]=0);let Ee={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};fe<0?(Ee=Q.next,ye=!0):fe>0&&(Ee=Q.prev,ye=!0),we.forEach((G,H)=>{we[H]=`calc(${G}px + (${i(Ee.translate[H])} * ${Math.abs(fe*ee)}))`}),be.forEach((G,X)=>{let Y=Ee.rotate[X]*Math.abs(fe*ee);H.browser&&H.browser.need3dFix&&Math.abs(Y)/90%2==1&&(Y+=.001),be[X]=Y}),Y.style.zIndex=-Math.abs(Math.round(he))+G.length;const xe=we.join(", "),Se=`rotateX(${be[0]}deg) rotateY(${be[1]}deg) rotateZ(${be[2]}deg)`,Te=ge<0?`scale(${1+(1-Ee.scale)*ge*ee})`:`scale(${1-(1-Ee.scale)*ge*ee})`,Me=ge<0?1+(1-Ee.opacity)*ge*ee:1-(1-Ee.opacity)*ge*ee,Ce=`translate3d(${xe}) ${Se} ${Te}`;if(ye&&Ee.shadow||!ye){let G=Y.querySelector(".swiper-slide-shadow");if(!G&&Ee.shadow&&(G=me("creative",Y)),G){const H=Q.shadowPerProgress?fe*(1/Q.limitProgress):fe;G.style.opacity=Math.min(Math.max(Math.abs(H),0),1)}}const Pe=pe(0,Y);Pe.style.transform=Ce,Pe.style.opacity=Me,Ee.origin&&(Pe.style.transformOrigin=Ee.origin)}},setTransition:G=>{const X=H.slides.map(G=>h(G));X.forEach(H=>{H.style.transitionDuration=`${G}ms`,H.querySelectorAll(".swiper-slide-shadow").forEach(H=>{H.style.transitionDuration=`${G}ms`})}),ue({swiper:H,duration:G,transformElements:X,allSlides:!0})},perspective:()=>H.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!H.params.cssMode})})},function(G){let{swiper:H,extendParams:X,on:Y}=G;X({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),ce({effect:"cards",swiper:H,on:Y,setTranslate:()=>{const{slides:G,activeIndex:X,rtlTranslate:Y}=H,Q=H.params.cardsEffect,{startTranslate:ee,isTouched:te}=H.touchEventsData,he=Y?-H.translate:H.translate;for(let fe=0;fe<G.length;fe+=1){const ge=G[fe],ve=ge.progress,we=Math.min(Math.max(ve,-4),4);let be=ge.swiperSlideOffset;H.params.centeredSlides&&!H.params.cssMode&&(H.wrapperEl.style.transform=`translateX(${H.minTranslate()}px)`),H.params.centeredSlides&&H.params.cssMode&&(be-=G[0].swiperSlideOffset);let ye=H.params.cssMode?-be-H.translate:-be,Ee=0;const xe=-100*Math.abs(we);let Se=1,Te=-Q.perSlideRotate*we,Me=Q.perSlideOffset-.75*Math.abs(we);const Ce=H.virtual&&H.params.virtual.enabled?H.virtual.from+fe:fe,Pe=(Ce===X||Ce===X-1)&&we>0&&we<1&&(te||H.params.cssMode)&&he<ee,Le=(Ce===X||Ce===X+1)&&we<0&&we>-1&&(te||H.params.cssMode)&&he>ee;if(Pe||Le){const G=(1-Math.abs((Math.abs(we)-.5)/.5))**.5;Te+=-28*we*G,Se+=-.5*G,Me+=96*G,Ee=-25*G*Math.abs(we)+"%"}if(ye=we<0?`calc(${ye}px ${Y?"-":"+"} (${Me*Math.abs(we)}%))`:we>0?`calc(${ye}px ${Y?"-":"+"} (-${Me*Math.abs(we)}%))`:`${ye}px`,!H.isHorizontal()){const G=Ee;Ee=ye,ye=G}const Ie=we<0?""+(1+(1-Se)*we):""+(1-(1-Se)*we),ze=`\n        translate3d(${ye}, ${Ee}, ${xe}px)\n        rotateZ(${Q.rotate?Y?-Te:Te:0}deg)\n        scale(${Ie})\n      `;if(Q.slideShadows){let G=ge.querySelector(".swiper-slide-shadow");G||(G=me("cards",ge)),G&&(G.style.opacity=Math.min(Math.max((Math.abs(we)-.5)/.5,0),1))}ge.style.zIndex=-Math.abs(Math.round(ve))+G.length,pe(0,ge).style.transform=ze}},setTransition:G=>{const X=H.slides.map(G=>h(G));X.forEach(H=>{H.style.transitionDuration=`${G}ms`,H.querySelectorAll(".swiper-slide-shadow").forEach(H=>{H.style.transitionDuration=`${G}ms`})}),ue({swiper:H,duration:G,transformElements:X})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!H.params.cssMode})})}];return se.use(ye),se}();
51var OTPCounterInterval,isIOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,isAppWebView=Boolean(getCookie("bsApp"));function checkAllProductSize(){for(var e=[],t=$(".ring-size-box input"),a=0;a<t.length;a++)"-1"===t[a].value?e.push("false"):e.push("true");return e.every(function(e){return"true"===e})}function updateCartOnSizeChange(e){var t="";t="MOBILE"==deviceName?$(e).parents(".quanity-size-block").find("#cart_item_quantity .qty").val():$(e).parents(".item-properties-inner").find("#cart_item_quantity .qty").val();var a=$(e).find(".size").text(),n=$(e).data("action")+"&quantity="+t+"&productSize="+a;cartUpdateTrigger(!0),sizeSelectedEvent(),location.href=n}function selectRingSize(e){if("product"==PAGE_TYPE){var t=$("#select-gold .color-val").html();t||(t=defaultCustomizationColor);var a=$('input[type="radio"][name="metalPurity-'+t+'"]:checked').val()||window.metalPurity,n=$('input[type="radio"][name="diamondQuality"]:checked').val()||$("#qualityselect").val()||window.diamondColorClarity,i=$("#caratselect").val()||"",o=$(".select-size.clarity-wrapper #clarityselect").val()||"",r=$(".select-size.color-wrapper #colorselect").val()||""}$(".icon-ion-ios-checkmark-empty").removeClass("active"),$("#sizeList ul li").removeClass("size-selected");var s=$(e).children(".size").html();if("Size"!=s){var l=$(e).data("key");
51if(window.sizeKey=l+"",$(e).addClass("size-selected"),$(e).children(".icon-ion-ios-checkmark-empty").addClass("active"),$(e).parents(".select-size").find("#ringselect").attr("data-key",l),$(e).parents(".select-size").find("#ringselect").val(s),$(e).parents(".select-size").find(".size-box-overlay").html(s),$(e).parents(".select-size").find(".size-box-overlay").attr("data-size",s),"product"==PAGE_TYPE&&(updatePriceOnSize(),"NORMAL"==deviceName&&eddResponse)){var d=getCustomizationCombinationKey(t,a,n,i,o,r),c="";if(eddResponse[d].skuCodeMap[l].deliveryDateInfo){var u=eddDateFormat(c=eddResponse[d].skuCodeMap[l].deliveryDateInfo.expectedDeliveryDate);$(".store-delivery strong").html(u),eddAdditionalInfo(c)}}}if("product"==PAGE_TYPE){if(updateGoldminePlanOnCustomization(),eddResponse){d=getCustomizationCombinationKey(t,a,n,i,o,r),c="";if(eddResponse[d].skuCodeMap[sizeKey].deliveryDateInfo){c=eddResponse[d].skuCodeMap[sizeKey].deliveryDateInfo.expectedDeliveryDate;u=eddDateFormat(eddResponse[d].skuCodeMap[sizeKey].deliveryDateInfo.expectedDeliveryDate);var p=getDifferenceBetweenTwoDates(new Date,new Date(c));!isDeliveryByTomorrow(c)&&p>3?($(".customization-available").show(),$(".customization-available-inner").removeClass("show-content").addClass("hide-content"),eddUtil.init(d)):$(".customization-available").hide()}}triggerSizeSelectedEvent(s),"undefined"!=typeof productDetails&&productDetails&&productDetails.id&&productDetails.name&&"undefined"!=typeof productCategory&&productCategory&&void 0!==getCustomizationCode&&getCustomizationCode&&facebookProductCustomization(String(productDetails.id),productDetails.name,productCategory,"",getCustomizationCode(),t,a,s)}"viewCart"==execution_step&&updateCartOnSizeChange(e)}function toggleRingSizes(e){"viewCart"==execution_step&&$(".size-list").hide();var t=$(e).find(".size-list");if("none"==$(t).css("display")){$(t).show(),$(t).find(".scrollable-list").addClass("active");var a=$(window).height()-$("#ringselect")[0].getBoundingClientRect().top,n=$(t).find(".scrollable-list").height()+30,i=$(t).find("ul li").hasClass("size-selected"),o=$(t).find(".scrollable-list");if(a<=n?$(t).css("top","-"+n+"px"):$(t).css("top","20px"),i){var r=$(e).find("li.size-selected");"MOBILE"!=deviceName?$(o).animate({scrollTop:$(r)[0].offsetTop-130},500):smoothScrollElement(o[0],$(r).position().top-130,200)}else{var s=$(e).find("ul li .deliverBy.tomorrow").parent();s.length>0&&"MOBILE"!=deviceName&&$(o).animate({scrollTop:$(s)[0].offsetTop-130},500)}}else $(t).hide(),$(t).find("ul").removeClass("active")}function pickRandomTimeSlot(e,t,a){var n;n=Math.floor(Math.random()*a);e.each(function(){$(this).find("li.pick-time").eq(n).addClass("active")})}function pickRandomDateSlot(e,t,a){var n;n=Math.floor(Math.random()*a);var i="";e.each(function(){(i=""==TAHDisabledDATE?$(this).find("li.pick-date:nth-child(n+2):nth-child(-n+4)").eq(n):$(this).find("li.pick-date").eq(n)).addClass("active")}),t.val(i.data("date"))}function setScreenResolutionInCookie(){if(navigator.cookieEnabled){var e="screenHeight",t=readCookie(e);if("grid"==t||null!=t){createCookie(e,screen.height,30),createCookie("screenWidth",screen.width,30)}}}function checkAndSetUserBandWidthCookie(){if(navigator.cookieEnabled){var e="ubc",t="",a="";"grid"==readCookie(e)&&$.ajax({url:GLOBAL_CTX+"/tracking/getubwcookieconfiguration?ajax=true",type:"GET",dataType:"json",success:function(n){if(n.hasError);else{t=n.expiryInMinutes/1440,a=1024*n.fileSizeMB*8,n.fileName+"_"+n.fileSizeMB+".jpg",url=n.url,createCookie(e,-1,t);var i=new Date;$.ajax({url:url,cache:!1,type:"GET",success:function(n,o){var r=new Date-i,s=a/(r/1e3);s=parseInt(s,10),createCookie(e,s,t)}})}}})}}function readCookie(e){for(var t=e+"=",a=document.cookie.split(";"),n=0;n<a.length;n++){for(var i=a[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0==i.indexOf(t))return i.substring(t.length,i.length)}return"grid"}function showDates(e,t,a){for(var n=[],i=0;i<t;i++){var o=new Date;o.setDate(e.getDate()+(i+a));var r=o.getMonth()+1;r<10&&(r="0"+r);var s=o.getDate();s<10&&(s="0"+s);var l=o.getFullYear()+"-"+r+"-"+s,d=new Date((new Date).getTime()+864e5);d<10&&(d="0"+d);var c="<li class='pick-date' data-date="+l+"><span class='inner'>";c+=0==i&&0===a?"<span class='day tmw'>today</span>":0==i&&1===a||1==i&&0===a?"<span class='day tmw'>tomorrow</span>":"<span class='day'>"+DayAsString(o.getDay())+"</span>",c+="<span class='date'>"+o.getDate()+" "+monthAsString(o.getMonth()).substring(0,3)+"</span>",c+="</span></li>",n.push(c)}return n}function DayAsString(e){return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][e]}function dayString(e){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
51ay","Saturday"][e]}function isNextDay(e){var t=new Date;t.setDate(t.getDate()+1);return t.getDate()==e}function monthAsShortString(e){return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e]}function monthAsString(e){return["January","February","March","April","May","June","July","August","September","October","November","December"][e]}function numberSuffix(e){var t=e%10,a=e%100;return 1==t&&11!=a?e+"st":2==t&&12!=a?e+"nd":3==t&&13!=a?e+"rd":e+"th"}function facebookCustomerDataAfterLogin(){$.ajax({type:"GET",url:GLOBAL_CTX+"/auth/productPageFacebookData/?ajax=true",async:!0,cache:!1,dataType:"json",success:function(e){if(!e.hasError&&Object.keys(e.topCustomerWhoPurchased).length>0){var t="";$.each(e.topCustomerWhoPurchased,function(e,a){t=(t=t+'<li><a href="https://www.facebook.com/'+e+'" target="_blank"><span class="cust-img"><img src="https://graph.facebook.com/'+e+'/picture" width="50" height="50"/></span>')+'<span class="cust-name">'+a+"</span></a></li>"}),$("#happy-customer-id").removeClass("hidden"),$(".happy-customers .list-inline").html(t)}}})}function hintGiftDetails(){$(".hint-div-box-status").hide(),$(".hint-div-box-data").show(),"NORMAL"==deviceName&&$(".hint-gift-details-val").fancybox().trigger("click")}function updateGiftHintSender(){var e=$("#hint-sender-name").val();$(".hint-sender-name-detail").html(e)}function updateGiftHintRcv(){var e=$("#hint-rcp-name").val();$(".hint-rcv-name-detail").html(e)}function dropGiftHint(){var e=$("#hint-sender-name").val(),t=$("#hint-sender-email-id").val(),a=$("#hint-sender-phone-id").val(),n=$("#hint-rcp-name").val(),i=$("#hint-rcp-email-id").val(),o=$("#hint-rcp-phone-id").val(),r=window.location.href,s="senderPhone="+a+"&senderName="+e+"&senderEmail="+t+"&recipientPhone="+o+"&recipientName="+n+"&recipientEmail="+i+"&productLink="+encodeURIComponent(r);$.ajax({type:"POST",url:GLOBAL_CTX+"/dropHint/send",async:!0,cache:!1,dataType:"json",data:s,success:function(e){e.hasError?$(".hint-div-box-status").html(getPostHintFailureDiv()):$(".hint-div-box-status").html(getPostHintSuccessDiv()),$(".hint-div-box-data").hide(),$(".hint-div-box-status").show()}})}function getPostHintSuccessDiv(){var e="";return e="Your hint has been emailed to "+$("#hint-rcp-email-id").val()+"<br/>",e+='<a href="" class="\btn-gray btn-lg" title="Continue Shopping"><i class="ion-ios-arrow-left"></i>Continue Shopping</a>'}function getPostHintFailureDiv(){return'Please Provide Valid Data<br/><a href="" class="\btn-gray btn-lg" title="Continue Shopping"><i class="ion-ios-arrow-left"></i>Continue Shopping</a>'}function setDefaultAttribute(e){customerId&&"null"!==customerId||(customerId=null),visitorId&&"null"!==visitorId||(visitorId=null),e.screenHeight=screen.height,e.screenWidth=screen.width,e.deviceName=deviceName,null!=customerId&&(e.customerId=customerId),null!=visitorId&&(e.visitorId=visitorId),e.currentURL=window.location.href,e.referrer=document.referrer,e.directServer=0}function eventLoggerServerRequest(e){$.ajax({type:"POST",url:GLOBAL_EVENT_CTX+"/eventlogger/server/log",async:!0,cache:!1,dataType:"json",xhrFields:{withCredentials:!0},data:e,success:function(e){}})}function processBatchedServerEvent(e){try{e.currentURL=window.location.href}catch(e){}$.ajax({type:"POST",url:GLOBAL_EVENT_CTX+"/eventlogger/server/log",async:!0,cache:!1,dataType:"json",xhrFields:{withCredentials:!0},data:{multipleEventsJsonData:JSON.stringify(e),currentURL:window.location.href,referrer:document.referrer,directServer:JSON.stringify(0)},success:function(e){}})}function createEventLogInBatches(e,t,a,n,i,o,r,s,l,d,c,u,p,m,v,h,g,f,y){if("false"!=eventLoggerOn&&e&&null!=e){if(customerId&&"null"!==customerId||(customerId="undefined"),visitorId&&"null"!==visitorId||(visitorId="undefined"),t&&null!=t||(t="undefined","undefined"),n&&null!=n||(n="undefined","undefined"),o&&null!=o||(o="undefined","undefined"),s&&null!=s||(s="undefined","undefined"),d&&null!=d||(d="undefined","undefined"),u&&null!=u||(u="undefined","undefined"),m&&null!=m||(m="undefined","undefined"),h&&null!=h||(h="undefined","undefined"),f&&null!=f||(f="undefined","undefined"),"buyNow"==e&&(d="MRP",$("#our_price_display").html(),u="sellingPrice",$("#discountedPriceSpan").html()),"orderReturned"!=e&&"orderCancelled"!=e||(d="reason",$(".cancel-reason").val()),location.search)for(var b=location.search.substring(1).split("&"),C=0;C<b.length;C++){var w=b[C].split("=");w[0]&&("utm_source"==w[0]&&(m="UTM_Source",w[1]),"utm_medium"==w[0]&&(h="UTM_medium",w[1]),"utm_campaign"==w[0]&&(f="UTM_Campaign",w[1]))}visitorId,customerId}}function collectLoggingData(e){paramStr=JSON.stringify(e),paramStr+="##",eventLoggerData&&"null"!==eventLoggerData||(eventLoggerData=""),eventLoggerData+=paramStr,eventLoggerData.split("##").length>=eventLoggerBatchSize?(createEventDataLog(),flushEventLogBatchData("flushData"),eventLoggerData=""):$.ajax({type:"POST",url:GLOBAL_CTX+"/eventlogger/eventDataBatching",async:!0,cache:!1,dataType:"json",data:e,success:function(e){}})}function flushEventLogBatchData(e){var t="ajax=true&eventType="+e;$.ajax({type:"POST",url:GLOBAL_CTX+"/eventlogger/eventDataBatching",async:!0,cache:!1,dataType:"json",data:t,success:function(e){}})}function createEventDataLog(){var e=eventLoggerData.split("##"),t=[];for(i=0;i<e.length-1;i++)t.push(JSON.parse(e[i]));$.ajax({type:"POST",url:GLOBAL_CTX+"/eventlogger/insertEventLogInBatches",async:!0,cache:!1,contentType:"application/json",dataType:"json",data:JSON.stringify(t),success:function(e){}})}function findEventLog(e,t,a,n,i,o,r){var s="ajax=true&eventType="+e+"&customerId="+a+"&visitorId="+t+"&data="+n+"&action1="+i+"&action2="+o+"&action3="+r;$.ajax({type:"POST",url:GLOBAL_CTX+"/eventlogger/findEventLog",async:!0,cache:!1,dataType:"json",data:s,success:function(e){}})}function emiDetails(){$("#emi-breakup-detail").html("");var e=getCustomizationCode(),t=-1;"chainselect"==$("#ringselect").attr("name")&&((t=getSelectedSize()).length||(t=-1));var a=$("#etd .pin").first().text();if(e){var n=GLOBAL_CTX+"/design/getEmiDetails/"+e+"/"+t;$.ajax({type:"GET",url:n,dataType:"json",data:"pincode="+a,success:function(e){getEmiDivDetails(e)}})}}function getGoldMineDetail(e){var t=100*Math.ceil(e/1100);t<1e3&&(t=1e3);var a,n=parseInt($("#discountPercent").val())||0,i=Math.ceil(t*n/100),o=Math.ceil(10*t),r=Math.ceil(o-i),s=gmsTotalDiscountInPercentage(t,r);
51$(".installment").text(t.toLocaleString("en-IN")),$("#recommendedGMSAmount").val(t),$(".first-installment-discount").addClass("hidden"),n>0&&($(".first-installment-discount").removeClass("hidden"),$(".installment-discount").text(i.toLocaleString("en-IN"))),$(".effective-pay").text(r.toLocaleString("en-IN")),$(".total-gms-discount").text(s.toLocaleString("en-IN")+"%"),$(".total-installments").text((10*t).toLocaleString("en-IN")),$(".buy-worth").text((11*t).toLocaleString("en-IN")),$(".gms-product-price").text(e.toLocaleString("en-IN")),a=window.location.origin+"/goldmine.html?installment="+t,$(".start-gms-btn").attr("href",a)}function gmsTotalDiscountInPercentage(e,t){return((11*e-t)/(11*e)*100).toFixed(2)}function getUrlParam(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(window.location.href);return null==t?"":t[1]}function updateGoldminePlanOnCustomization(){getGoldMineDetail($(".final-pd-price").text().replace(/,/g,""))}function getEmiDivDetails(e){if(0!=e.length){var t=e[0].processingFees;$(".emi-block #proc-cost").html(t);var a=e[0].interestRate;$(".emi-block #interest-cost").html(a);var n=e[0].totalCost;$(".emi-block #total-cost-3").html(n);var i=e[0].downpayment;$(".emi-block #down-cost-3").html(i);var o=e[0].emi;$(".emi-block #month-cost-3").html(o);var r=e[1].totalCost;$(".emi-block #total-cost-6").html(r);var s=e[1].downpayment;$(".emi-block #down-cost-6").html(s);var l=e[1].emi;$(".emi-block #month-cost-6").html(l);var d=e[2].totalCost;$(".emi-block #total-cost-9").html(d);var c=e[2].downpayment;$(".emi-block #down-cost-9").html(c);var u=e[2].emi;$(".emi-block #month-cost-9").html(u),$(".emi-block").toggle(),$(".emi-block-not-avlb").hide(),$(".emi-block-avlb").show()}else $(".emi-block").toggle(),$(".emi-block-avlb").hide(),$(".emi-block-not-avlb").show()}function loadSizeAndPrices(){var e=getCustomizationCode();if(e){var t=GLOBAL_CTX+"/design/getSizeBasedPricing/"+e+"?ajax=false";$.ajax({type:"GET",url:t,async:!1,dataType:"json",success:function(e){weightAndPriceDetails=e,getPriceOnSize(),appendShortDesc()}})}}function getQualityForCarat(){var e=document.getElementById("caratselect"),t=e.options[e.selectedIndex].value,a=document.getElementById("qualityselect"),n=a.options[a.selectedIndex].value;
51$("#qualityselect option").each(function(){var e=$(this);e.hasClass(t)||""==e.val()?e.show():e.hide(),e.val()==n&&e.removeAttr("selected"),""==e.val()&&e.prop("selected",!0)})}function getClarityForCarat(){var e=document.getElementById("caratselect"),t=e.options[e.selectedIndex].value,a=document.getElementById("clarityselect"),n=a.options[a.selectedIndex].value,i=document.getElementById("colorselect"),o=i.options[i.selectedIndex].value;$("#clarityselect option").each(function(){var e=$(this);e.hasClass(t)||""==e.val()?e.show():e.hide(),e.val()==n&&e.removeAttr("selected"),""==e.val()&&e.prop("selected",!0)}),$("#colorselect option").each(function(){var e=$(this);""==e.val()?e.show():e.hide(),e.val()==o&&e.removeAttr("selected"),""==e.val()&&e.prop("selected",!0)})}function getColorForCaratClarity(){var e=document.getElementById("caratselect"),t=e.options[e.selectedIndex].value,a=document.getElementById("clarityselect"),n=a.options[a.selectedIndex].value,i=document.getElementById("colorselect"),o=i.options[i.selectedIndex].value;
51$("#colorselect option").each(function(){var e=$(this);e.hasClass(t+"-"+n)||""==e.val()?e.show():e.hide(),e.val()==o&&e.removeAttr("selected"),""==e.val()&&e.prop("selected",!0)})}function getSelectedSize(){var e,t=document.getElementById("ringselect");return t&&(e="MOBILE"==deviceName||"Solitaire Ring Mount"==productDetails.category?t.options[t.selectedIndex].value:sizeKey),e&&""!=e||(e=-1),e.length<2&&(e="0"+e),e}function getPriceOnSize(){var e=$("#ringselect").attr("name"),t=$("#product_total_weight").html();null!=t&&t.split(" ")[0];var a=-1;if("chainselect"==e&&"-1"!=(a=getSelectedSize())){$(".selectedSizeformError").remove();var n=document.getElementById("ringselect");$("#displaySizeRing").length,sizeName=n.value,$("#sizeSelected").val(a),Object.keys(weightAndPriceDetails).length>0&&Object.keys(weightAndPriceDetails).map(function(e,t){var a=e;return e.length<2&&(a="0"+a),weightAndPriceDetailsWith2DigitKey[a]=Object.values(weightAndPriceDetails)[t]});var i=weightAndPriceDetailsWith2DigitKey[a],o=i.price,r=o.replace(/,/g,""),s=i.discountedPrice.replace(/,/g,""),l=parseFloat(r)-parseFloat(s)-(parseFloat(i.makingCharges.replace(/,/g,""))-parseFloat(i.makingChargesAfterDiscount.replace(/,/g,"")))-(parseFloat(i.diamondPrice.replace(/,/g,""))-parseFloat(i.diamondPriceAfterDiscount.replace(/,/g,"")))-(parseFloat(i.taxesOnSellingPrice.replace(/,/g,""))-parseFloat(i.taxes.replace(/,/g,"")));i.priceAfterMakingChargesDiscount,i.diamondPriceAfterDiscount;$("#goldCost_b").html(i.goldCost+"/-"),i.newGoldCost&&$("#goldCost_new").html(i.newGoldCost+"/-"),$("#diamondCostWithoutDiscount_b").html(i.diamondPrice+"/-"),parseFloat(i.diamondPriceAfterDiscount.replace(/,/g,""))<parseFloat(i.diamondPrice.replace(/,/g,""))&&$("#diamondCost_b").html(i.diamondPriceAfterDiscount+"/-"),parseFloat(i.colorStoneSellingPrice.replace(/,/g,""))>0&&$("#coloredStoneCost_b").html(i.colorStoneSellingPrice+"/-"),$("#taxes_b").html(i.taxes+"/-"),$("#makingChargesNew_b").html(i.makingChargesAfterDiscount+"/-"),$("#makingChargesWithoutDiscount_b1").html(i.makingCharges+"/-"),$("#makingChargesNew_b-ndd").html(i.makingChargesAfterDiscount+"/-"),$("#makingChargesWithoutDiscount_b1-ndd").html(i.makingCharges+"/-"),$("#discountAmount").html(l+"/-"),$("#bottomActualPrice").html(i.price),$("#bottomSellingPrice").html(i.discountedPrice+"/-");var d=i.discountedPrice,c=i.weight,u=parseInt(d.replace(/,/g,"")),p=$(".text .voucher-desc");if(p.length>0)if(u>1e4)p.html('Get additional discount worth &nbsp;<span class="WebRupee">Rs.</span><strong>10,000</strong>'),$("#gms-voucher-start a").attr("href",GLOBAL_CTX+"/goldmine.html?installment=10000");else{p.html("Get this product for FREE! ");var m=100*Math.ceil(u/100);$("#gms-voucher-start a").attr("href",location.origin+"/goldmine.html?installment="+m)}$("#details-top-right #details-top-right-inner #our_price_display").html(o),$("#details-top-right #details-top-right-inner #our_price_display_b").html(o),$("#details-top-right #details-top-right-inner .new-price #our_price_display").html(d),$("#details-top-right #details-top-right-inner .updated-price #our_price_display").html(d),$("#cashback-amount").text(Math.ceil(r/5)),setDiscountedPrice(d),updateBestPrice(i.discountedPrice,s,o,r,i.bestPriceAmount),$("#metalWeight").html(c);var v=i.productWeight;null!=t&&$("#product_total_weight").html(v.toPrecision(3)+" gram");var h=i.stoneDetails;if(null!=h)for(var g in h)for(var f=0;f<h[g].length;f++){var y=h[g][f];if("Diamond"==g){var b=document.getElementById("clarity"+y.stoneType+y.id);null!=b&&(b.innerHTML=y.stoneClarity);var C=document.getElementById("color"+y.stoneType+y.id);null!=C&&(C.innerHTML=y.color);var w=document.getElementById("stoneWeight"+y.stoneType+y.id);null!=w&&(w.textContent=(y.weight*y.quantity).toFixed(3)+" carats")}var P=document.getElementById("count"+y.stoneType+y.id);null!=P&&(P.innerHTML=y.quantity);var S=document.getElementById("settingType"+y.stoneType+y.id);null!=S&&(S.innerHTML=y.settingType)}reloadTotalStoneCountAndWeight()}}function updatePriceOnSize(){getPriceOnSize(),appendShortDesc();var e=$("#etd .pin").first().text()||$("#cust-details span.pin").first().text(),t=getCustomizationCode(),a=GLOBAL_CTX+"/deliverydate/customization/get",n=!1;1==$("#engravingApplied:checked").length&&(n=!0);var i="";"chainselect"==$("#ringselect").attr("name")&&(i=getSelectedSize()),""!=i&&updateDeliveryDateByPincode(e,a,"ajax=true&productcode="+t+"&pincode="+e+"&size="+i+"&engravingApplied="+n,!0),getProductSelectValueOnLoad();var o=$("#product_type_name").val();trackGA("BsUI","changed-customization",o+" Size "+i),$("form#reserve #size").val(i)}
51function getProductSelectValueOnLoad(){var e=$("#ringselect").val();if(null!=e&&""!=e){var t=$("#ringselect option[value='"+e+"']").text().trim();$(".ndd-size").html(t)}else $("#nddUrlForSize").hide()}function setDiscountedPrice(e){if($("#offer").length){$("#discountedPriceSpan").text(parseInt(e.replace(/,/g,"")).toLocaleString("en-IN"));var t=e;t=e===parseInt(e,10)?e:e.replace(/,/g,""),$("#cashback-amount").text(Math.ceil(t/5))}}function getDefaultCustomization(){$(".metal-purities").hide(),$("."+defaultCustomizationColor+"-purities").show(),getCustomizationOnDiamondQuality("getsamedaydelivery")}function getCustomizationOnDiamondQuality(e){var t=$("#select-gold .color-val").html();t||(t=defaultCustomizationColor);var a,n=$('input[type="radio"][name="metalPurity-'+t+'"]:checked').val()||window.metalPurity,i=$('input[type="radio"][name="diamondQuality"]:checked').val()||$("#qualityselect").val()||window.diamondColorClarity,o=$("#caratselect").val()||"",r=$(".select-size.clarity-wrapper #clarityselect").val()||"",s=$(".select-size.color-wrapper #colorselect").val()||"",l=getCustomizationCode();$("#storeDesignCode").html();a="MOBILE"==deviceName?$("#etd .pin").first().text():$("#getNearestStore").val();var d="00",c=$("#ringselect").attr("name"),u=!1,p="";e?(p=e,$("#engravingApplied").length>0&&($("#engravingApplied").prop("checked",!1),$("#engravingApplied").parent("span").removeClass("checked"),$(".p-engraving .pe-form .pe-input").hide())):("chainselect"==c&&(d=getSelectedSize()),void 0===c&&"1"===isSliderProduct&&(d=$("#sizeSelected").val()),1==$("#engravingApplied:checked").length&&(u=!0));var m="";if(i&&(m=i.replace(" ","")),a){var v=getCustomizationCombinationKey(t,n,m,o,r,s),h="";if(eddResponse[v].skuCodeMap[d].deliveryDateInfo){h=eddResponse[v].skuCodeMap[d].deliveryDateInfo.expectedDeliveryDate;var g=eddDateFormat(eddResponse[v].skuCodeMap[d].deliveryDateInfo.expectedDeliveryDate),f=""!==$("#ringselect").val();isSizeableProduct&&!f&&(g=eddDateFormat(h=getEarlyDeliveryDate(eddResponse[v].skuCodeMap))),$(".store-delivery").html('Delivery By <strong class="fetch-edd">'+g+'</strong> for <span class="strong">Pincode <span class="delivery-pincode">'+a+"</span></span>"),eddAdditionalInfo(h);var y=getProductSizesAndEDD(v);$("#sizeDropdown").html(y.htmlData);var b=getDifferenceBetweenTwoDates(new Date,new Date(h));!isDeliveryByTomorrow(h)&&b>3?($(".customization-available").show(),$(".customization-available-inner").removeClass("show-content").addClass("hide-content"),eddUtil.init(v)):$(".customization-available").hide()}}a&&fetchStoreDetails(a,l),getDesignCustomization(l,a,d,p,u,i,e)}function radionButtonSelectedValueSet(e,t){$('input[name="'+e+'"][value="'+t+'"]').prop("checked",!0)}function getCustomizationCode(){var e=$("#select-gold .color-val").html();e||(e=defaultCustomizationColor);var t=$('input[type="radio"][name='+("metalPurity-"+e)+"]:checked").val(),a=$('input[type="radio"][name=diamondQuality]:checked').val(),n=e+"_"+t,i=!1;if(void 0===a){var o=$("#caratselect").val();if(o){var r=$("#colorselect").val();if(r)a=o+"_"+$("#clarityselect").val()+" "+r;else{var s=$("#qualityselect").val();""!=s&&null!=s?a=o+"_"+s:i=!0}}}return a&&(n=n+"_"+a),null==n||-1!=n.indexOf("undefined")||i?$(".c-code").html().trim():allCustomizations[n]}function UpdateGiftMsg(e,t,a,n){var i=GLOBAL_CTX+"/cart/update_gift_msg?cartId="+e+"&giftMsg="+encodeURIComponent(t)+"&giftFrom="+n+"&giftTo="+a;$.ajax({type:"GET",url:i,dataType:"json",success:function(e){trackGA("BsUI","Added Gift Message")}})}function removeGiftMsg(e,t){var a=GLOBAL_CTX+"/cart/remove_gift_msg?cartId="+e;$.ajax({type:"GET",url:a,dataType:"json",success:function(e){"MOBILE"==deviceName?($(t).parents(".message-tooltip").addClass("hidden"),$(".add-gift-message").removeClass("hidden"),$(".message-added").addClass("hidden"),$("#gift-msg-form").hide(),$(".add-gift-message i.arrow").removeClass("icon-up-arrow").addClass("icon-down-arrow"),$("label.add-gift-msg input").prop("checked",!1)):($(t).parents(".bs-tt").removeClass("active"),$(".gift-message-added").addClass("hidden"),$(".add-gift").removeClass("hidden")),$("#gift_message_added_to").html(""),$("#gift_message_added_from").html(""),$("#gift_message_added_message").html(""),$("#gift-msg-form .fl-wrap").removeClass("success auto-filled"),$("#gift-msg-form #giftTo").val(""),$("#gift-msg-form #giftFrom").val(""),$("#gift-msg-form #giftMsg").val(""),trackGA("BsUI","Removed Gift Message")}})}function updateQuantity(e,t){var a=e.options[e.selectedIndex].value,n=$(e).attr("name"),i=$(e).data("designid"),o=GLOBAL_CTX+"/cart/updateQuantity?cartItemId="+n+"&cartItemQuantity="+a+"&cartId="+t;$(e).prop("disabled","disabled"),setTimeout(function(){$(e).removeAttr("disabled")},3e3),$.ajax({type:"GET",url:o,dataType:"json",success:function(t){$(e).removeAttr("disabled"),trackGA("BsUI","Updated Quantity on Cart",i+""),cartUpdateTrigger(!0),t.hasError?location.reload(!0):(location.reload(!0),window.selectedQuntityInCart=a)},error:function(t,a,n){$(e).removeAttr("disabled")}})}function addUpSellProduct(e,t,a,n){var i=GLOBAL_CTX+"/cart/addUpSellProduct?parentCartItemId="+e+"&size="+a+"&cartId="+n+"&upSellDesignId="+t;$.ajax({type:"GET",url:i,dataType:"json",success:function(e){e.hasError,location.reload()},error:function(e,t,a){}})}function updateUpSellProductprice(e,t,a,n){var i=n.options[n.selectedIndex].value;""==i&&(i=-1);var o=GLOBAL_CTX+"/cart/updateUpSellProductPrice?parentCartItemId="+e+"&size="+i+"&cartId="+a+"&upSellDesignId="+t;$.ajax({type:"GET",url:o,dataType:"json",success:function(e){e.hasError,location.reload()},error:function(e,t,a){}})}function applyDiscountCoupon(e,t,a,n){var i=$("#cartItemId").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/cart/applyDiscountVoucher",async:!1,cache:!0,dataType:"json",data:"ajax=true&cartItemId="+e+"&discount_id="+a+"&quantity="+i+"&cartId="+n,success:function(e){location.reload()}})}function removeDiscountCoupon(e,t){$.ajax({type:"POST",url:GLOBAL_CTX+"/cart/removeDiscountVoucher",async:!1,cache:!0,dataType:"json",data:"ajax=true&cartItemId="+e+"&discount_id="+t,success:function(e){location.reload()}})}function updateCityStateByPincode(e){var t=document.getElementById("countryId_delivery");if("India"==(null==t?document.getElementById("countryId1_delivery").value:t.options[t.selectedIndex].text)){var a=$("#postcode_delivery").val();"MOBILE"==deviceName&&createCookie("eddp",a),$.ajax({type:"GET",url:GLOBAL_CTX+"/address/",async:!1,cache:!0,dataType:"json",data:"ajax=true&submiPtincode=true&pincode="+a,success:function(e){var t=$("#cityName_delivery"),a=$("#stateId_delivery");e.city?($(".defer-notifications-delivery-type").html(""),$("#cityName_delivery").val(e.city),$("#stateId_delivery").val(e.id_state),$(".city-state-wrapper").removeClass("hidden"),$(".city-state-wrapper #edit-city-wrapper .fl-wrap").addClass("auto-filled"),$(".city-state-block #edit-city-wrapper .fl-wrap").addClass("auto-filled"),$(".da-block .city-state-block").removeClass("hidden"),$(".customer-shipping-address-block").addClass("show-city-state-block"),t.parent().find("ul.messages").remove(),a.parent().find("ul.messages").remove(),t.parents(".fl-wrap").addClass("auto-filled"),a.parents(".fl-wrap").addClass("auto-filled")):($(".city-state-wrapper").removeClass("hidden"),$(".da-block .city-state-block").removeClass("hidden"),t.val(""),a.val(""),t.parent().find("ul.messages").remove(),a.parent().find("ul.messages").remove(),t.parents(".fl-wrap").removeClass("error auto-filled success"),a.parents(".fl-wrap").removeClass("error auto-filled success"))}})}}function updatePincodeWidget(e){var t=$(e.target).val();t&&getEDDOnShipping(e,t,$("#totalCartCount").val())}
51function updateCityStateByBaPincode(){var e=$("#ba_postcode_delivery").val();$.ajax({type:"GET",url:GLOBAL_CTX+"/address/",async:!1,cache:!0,dataType:"json",data:"ajax=true&submitPincode=true&pincode="+e,success:function(e){var t=$("#ba_cityName_delivery"),a=$("#ba_stateId_delivery");e.city?($("#ba_cityName_delivery").val(e.city),$("#ba_stateId_delivery").val(e.id_state),$(".ba-city-state-wrapper").removeClass("hidden"),$(".ba-city-state-wrapper #ba_edit-city-wrapper .fl-wrap").addClass("auto-filled"),$("#billing-address-form .city-state-block").removeClass("hidden"),t.parent().find("ul.messages").remove(),a.parent().find("ul.messages").remove(),t.parents(".fl-wrap").addClass("auto-filled"),a.parents(".fl-wrap").addClass("auto-filled")):($(".ba-city-state-wrapper").removeClass("hidden"),$("#billing-address-form .city-state-block").removeClass("hidden"),t.val(""),a.val(""),t.parent().find("ul.messages").remove(),a.parent().find("ul.messages").remove(),t.parents(".fl-wrap").removeClass("error auto-filled success"),a.parents(".fl-wrap").removeClass("error auto-filled success"))}})}function updateSelectedTabOnFailure(e,t){switch($(".payment_tab").removeClass("selected"),$("#payment-details>div").hide().animate({top:0,opacity:0},500,"easeInOutCubic").dequeue(),$(".payment_detail").removeClass("paymentSelectedTab"),e){case"PAY BY CASH/CARD ON DELIVERY":$("#cashondelivery-content").show().animate({top:-5,opacity:1},500,"easeInOutCubic").addClass("paymentSelectedTab"),$("#cashondelivery").addClass("selected");break;case"PAY BY CASH":$("#cashondeliverygms-content").show().animate({top:-5,opacity:1},500,"easeInOutCubic").addClass("paymentSelectedTab"),$("#cashondeliverygms").addClass("selected");break;case"PAY BY NETBANKING":$("#netbanking-content").show().animate({top:-5,opacity:1},500,"easeInOutCubic").addClass("paymentSelectedTab"),$("#netbanking").addClass("selected");break;case"BLUESTONE WALLET":$("#ewallet-content").show().animate({top:-5,opacity:1},500,"easeInOutCubic").addClass("paymentSelectedTab"),$("#ewallet").addClass("selected");break;default:"debitcard"===t?($("#debitcardSeamless-content").show().animate({top:-5,opacity:1},500,"easeInOutCubic").addClass("paymentSelectedTab"),$("#debitcardSeamless").addClass("selected")):($(".payment_detail:first").show().animate({top:-5,opacity:1},500,"easeInOutCubic").addClass("paymentSelectedTab"),$("#payment-tabs .payment_tab:first").addClass("selected"))}$(".payment-options .err-block").slideUp()}function callMeToVerify(){$("html").hasClass("new-cf-ui")?$(".paymentSelectedTab form input[name=isCallmeToVerify]").val(!0):$(".paymentSelectedTab > form input[name=isCallmeToVerify]").val(!0)}function submitPaymentForm(){var e=Boolean(getCookie("bsApp")),t=$(".final-pd-price").text();$(".India-products > .row").length;if($("html").hasClass("new-cf-ui"))var a=$("section.open .content form").attr("name");else a=$(".paymentSelectedTab > form").attr("name");if("cashondelivery"==a){var n="CASH";return($("#cardOnDelivery").hasClass("selected")||$("input[name='cardOnDelivery']:checked").length>0||$("input[name='codPaymentType']:checked").length>0||"card"==$("section.open #cashondelivery").data("type"))&&(n="CARD"),void($("html").hasClass("new-cf-ui")?($('section.open .content form input[name="codPaymentType"]').val(n),$("section.open .content form input[name=instrumentType]").val(a),$('section.open .content form[name="'+a+'"]').submit()):($('.paymentSelectedTab > form input[name="codPaymentType"]').val(n),$(".paymentSelectedTab > form input[name=instrumentType]").val(a),$('.paymentSelectedTab > form[name="'+a+'"]').submit()))}if($("html").hasClass("new-cf-ui"))var i=$("section.open .service_provider_radio").filter(":checked").val();else i=$(".service_provider_radio").filter(":checked").val();var o=$(".paymentSelectedTab #transfer-bank")[0],r="default";if(o&&(r=o.options[o.selectedIndex].value),i||r&&"default"!=r){var s="";if(r&&(s=r),i&&(s=i),$("html").hasClass("new-cf-ui")?$("section.open .content form input[name=instrumentType]").val(a):$(".paymentSelectedTab > form input[name=instrumentType]").val(a),"netbanking"==a||"rewardpoints"==a)$(".proceed-to-pay").addClass("loading"),$("html").hasClass("new-cf-ui")?$("section.open .content form input[name=issuingAuthority]").val(s):$(".paymentSelectedTab > form input[name=issuingAuthority]").val(s);else if("emi"==a){var l=s.split("-");$("html").hasClass("new-cf-ui")?($(".paymentSelectedTab form input[name=instrumentType]").val(l[0]),$(".paymentSelectedTab form input[name=issuingAuthority]").val(l[1])):($(".paymentSelectedTab > form input[name=instrumentType]").val(l[0]),$(".paymentSelectedTab > form input[name=issuingAuthority]").val(l[1]))}else $("html").hasClass("new-cf-ui")?$("section.open .content form input[name=cardPaymentNetwork]").val(s):$(".paymentSelectedTab > form input[name=cardPaymentNetwork]").val(s);var d=$("#payment-details").data("isseamlessaval"),c=$("#payment-details").data("isjuspayaval");if("TRUE"==d&&("creditcard"==a||"debitcard"==a)||"TRUE"==c&&"jusPay"==s){"creditcard"==a?$("#creditcardSeamless-form .cc-dc-pay-now").addClass("loading"):"jusPay"==a?$(".proceed-to-pay").addClass("loading"):$("#debit
51cardSeamless-form .cc-dc-pay-now").addClass("loading"),orderPlacedEvent(a);var u=$('form[name="'+a+'"]');clearPaymentInlineMessage(),syncPaymentRequestAmount();var p=$('form[name="'+a+'"]').serializeArray();$.ajax({type:"POST",data:p,async:!0,url:u.attr("action"),success:function(e){e?.requiresCartRefresh?reloadPaymentPageForUpdatedCart(e?.errorMsg,e?.remainingPayableForCart):e?.hasError?handlePaymentRequestFailure(e?.errorMsg||"Unable to start payment. Please review the payment details and try again."):(clearPaymentInlineMessage(),$("#languageRender").load(location.href+" #languageRender",function(){var e=$("#bluestoneTransactionId").val(),t=$("#cartIdLater").val();if(e&&t)return createPayRequestFormOrPayPalToken(e,t,!0,s);handlePaymentRequestFailure("Unable to start payment because transaction details were not available. Please try again.")}))},error:function(e){return renderPaymentInlineMessage("Payment Update Failed","Unable to refresh the payment amount. Please try again."),!1}})}else $('form[name="'+a+'"]').submit();if(sendPaymentInitiatedEvent(a),e){t=t.replace(/\D/g,"");getUrlParam("gmfidv")}}else $("html").hasClass("new-cf-ui")?($(".new-cf-ui .slidein-msg").addClass("active"),setTimeout(function(){$(".new-cf-ui .slidein-msg").removeClass("active")},3e3)):alert("Please select an option")}function selectBankInDropDown(e){var t=e.target.value;$("#transfer-bank option[value="+t+"]").prop("selected","selected")}function selectUnselectBankInRadio(e,t){for(var a=["icici_bank","hdfc_bank","citi_bank","state_bank_of_india","axis_bank","idbi_bank","yes_bank","kotak_mahindra_bank"],n=e.target.value,i=!1,o=0;o<a.length;o++){if(a[o]==n){"netbanking"==t?$("#netbanking-content .service_provider_radio[value="+n+"]").prop("checked","checked"):"rewardpoints"==t&&$("#rewardpoints-content .service_provider_radio[value="+n+"]").prop("checked","checked"),(i=!0)&&($(".bank-with-image label .service_provider_radio[value="+n+"]").parents("label").addClass("active"),$(".bank-with-image label .service_provider_radio[value="+n+"]").prop("checked","checked"),$(".bank-with-image label .service_provider_radio[value="+n+"]").parents("label").find(".radio-style").addClass("active"),$(".bank-with-image label .service_provider_radio[value="+n+"]").parents("label").siblings().find(".radio-style").removeClass("active"));break}$(".bank-with-image label").removeClass("active"),$(".bank-with-image label").find(".radio-style").removeClass("active"),$(".bank-with-image label .service_provider_radio").prop("checked",!1)}0==i&&("netbanking"==t?$("#netbanking-content .service_provider_radio, .netbanking-content .service_provider_radio").prop("checked",null):"rewardpoints"==t&&$("#rewardpoints-content .service_provider_radio, .rewardpoints-content .service_provider_radio").prop("checked",null))}function downloadRingSizeHelpPdf(){location.href=GLOBAL_CTX+"/productsizerhelp/getringsizerpdf"}function downloadBangleSizeHelpPdf(){location.href=GLOBAL_CTX+"/productsizerhelp/getbanglesizerpdf"}function checkCarrierAvailability(e,t){$.ajax({type:"POST",url:GLOBAL_CTX+"/carrier/availability",async:!1,cache:!0,dataType:"json",data:"ajax=true&mode=prepaid&pincode="+e+"&cartTotal="+t,success:function(e){e.hasError?($("#carrier_success").html("").hide(),$("#carrier_error").html(e.errorStr).show()):($("#carrier_success").html(e.successStr+$("#address_link").html()),$("#carrier_success").show(),$("#carrier_error").html("").hide())}})}
51function sizeHelperProceed(){var e=$("#pincode").val();$.ajax({type:"GET",url:GLOBAL_CTX+"/productsizerhelp/validatepincodeandgetmetadata",async:!0,cache:!1,dataType:"json",data:"pincode="+e,success:function(e){return!(!e.hasError||e.pincodeError)||(e.name&&$("#name").val(e.name),e.email&&$("#email").val(e.email),e.city&&$("#city").val(e.city),e.state&&$("#state").val(e.state),e.edd&&$("#edd-sizer").val(e.edd),e.htoServiceable?($("#hto-serviceable").val(e.htoServiceable),"grid"!=readCookie("hto")&&($(".is-hto-available").hide(),$("#size-helper").addClass("hto-navl"))):($(".is-hto-available").hide(),$("#size-helper").addClass("hto-navl")),"MOBILE"==deviceName?($("#size-helper-s2").removeClass("active"),$("#size-helper-s3").addClass("active"),$("#size-helper-s3 #address").val($("#map-search-input").val()),$("#ringSizeHelpText").data("index",3)):($("#size-helper-s2").removeClass("active"),$("#size-helper-s3").addClass("active"),$("#size-helper-s3 #address").val($("#map-search-input").val()),$(".size-helper").removeClass("stp2").addClass("stp3")),!0)}})}function bookRingSizerAndHto(e,t,a){var n=$("#email").val(),i=$("#mobile").val(),o=$("#name").val(),r=$("#address").val(),s=$("#street").val(),l=$("#locality").val(),d=$("#landmark").val(),c=$("#city").val(),u=$("#state").val(),p=$("#pincode").val(),m=($("#designId").val(),$("#referer_pd").val(),$("#try_date_pd").val(),$("#try_time_pd").val(),$("#customer_id").val(),$("#otpId").val()),v=getCustomizationCode();$.ajax({type:"POST",url:GLOBAL_CTX+"/productsizerhelp/bookproductsizer",async:!0,cache:!1,dataType:"json",data:"email="+n+"&mobile="+i+"&name="+o+"&address="+r+"&street="+s+"&locality="+l+"&landmark="+d+"&city="+c+"&state="+u+"&postcode="+p+"&customizationId="+v+"&otpId="+m,success:function(e){e.hasError?t(!1):(e.name&&$("#name").val(e.name),e.email&&$("#email").val(e.email),e.edd&&$("#edd").html(e.edd),t(!0))}})}function bookRingSizer(){var e=$("#ringSizer_name").val(),t=$("#ringSizer_mobile").val(),a=$("#ringSizer_email").val(),n=$("#ringSizer_address").val(),i=$("#ringSizer_street").val(),o=$("#ringSizer_locality").val(),r=$("#ringSizer_landmark").val(),s=$("#ringSizer_city").val(),l=$("#ringSizer_pincode").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/productsizerhelp/bookringproductizer",async:!0,cache:!1,dataType:"json",data:"email="+a+"&mobile="+t+"&name="+e+"&address="+n+"&street="+i+"&locality="+o+"&landmark="+r+"&city="+s+"&postcode="+l,success:function(e){e.hasError?$("#popup-messages").show():window.location=GLOBAL_CTX+"/jewellery/rings.html?rs=true"}})}function cashOnDeliveryEvent(e){$.ajax({type:"POST",url:GLOBAL_CTX+"/codToPrepaidPromotion/addCashBackEntry",async:!1,cache:!0,dataType:"json",data:"ajax=true&customerId="+e,success:function(e){}})}function checkCodAvailability(e,t){$.ajax({type:"POST",url:GLOBAL_CTX+"/carrier/availability",async:!1,cache:!0,dataType:"json",data:"ajax=true&mode=cod&pincode="+e+"&cartTotal="+t,success:function(e){e.hasCODError?($("#cod_carrier_success").html("").hide(),$("#cod_carrier_error").html(e.errorStr).show()):($("#cod_carrier_success").html(e.successStr+$("#address_link1").html()),$("#cod_carrier_success").show(),$("#cod_carrier_error").html("").hide())}})}function updateAddressFormByCountry(){var e=$("#countryId_delivery")[0],t=e.options[e.selectedIndex].text,a=$("#s-cartId").html();$.ajax({type:"GET",url:GLOBAL_CTX+"/shipping/charges/get",data:"ajax=true&cartId="+a+"&shippingCountry="+t+"&countryFromIp="+COUNTRY,async:!1,cache:!0,dataType:"json",success:function(e){var a=e.shippingChargesForCountry,n=e.dutyAndLocalTaxedForCountry,i=e.priceAfterShippingAndTaxes,o=e.finalPriceAfterShippingAndTaxes,r=e.finalPriceAfterShippingAndTaxesAndDiscount,s=e.cartTotal,l=e.currencySymbol,d=e.discount,c=e.totalCartPriceWithoutDiscount,u=e.inflatedTotalCartPriceWithoutDiscount,p=e.hasInflatedDiscount,m=c,v=e.finalPriceAfterShippingAndTaxesAndDiscountWithoutFormatting;p&&(m=u),"India"==t?(updateCityStateByPincode(),v>2e5&&$("#edit-panNo-wrapper").show(),$("#edit-pin-wrapper .description").show(),$("#edit-pin-wrapper").removeClass("no-auto-population"),$("#edit-pin-wrapper .label_txt").html("Pin Code"),$("#shipping-price-text span.sub-total-cost").html(l+s),$("span.currency-symbol").html(l),$(".total .new-price").html(l+r),$(".summary-total .new-price").html(l+r),$(".discount").html(d),$(".summary-grand-total .new-price").html(l+o),$("#shipping-price-text").hide(),$(".summary-shipping-charges").hide(),$(".summary-duty-taxes").hide(),$(".discount-row").show(),$("#isSameAddress").removeAttr("disabled"),$("#ba_postcode_delivery").val(""),$("#ba_fullname").val(""),$("#ba_address").val(""),$("#ba_cityName_delivery").val(""),$("#ba_stateId_delivery").val("1")):($("#edit-panNo-wrapper").hide(),$("#edit-pin-wrapper .description").hide(),$("#edit-pin-wrapper").addClass("no-auto-population"),$("#edit-pin-wrapper .label_txt").html("Zip Code"),$("#shipping-price-text span.sub-total-cost").html(l+s),$("#shipping-price-text span.shipping-charges").html(l+a),$("#shipping-price-text span.import-duty").html(l+n),$("#shipping-price-text span.total-cost").html(l+o),$("#shipping-price-text").show(),$("#shipping-price-text div strong").html(e.deliveryDate),$(".total .new-price").html(l+i),$(".summary-shipping-charges .new-price").html(l+a),$(".summary-duty-taxes .new-price").html(l+n),$(".summary-total .new-price").html(l+i),$(".summary-grand-total .new-price").html(l+o),$("span.currency-symbol").html(l),$(".summary-shipping-charges").show(),$(".summary-duty-taxes").show(),$(".summary-total").show(),$(".discount-row").hide(),$("#isSameAddress").attr("disabled",!0),setDummyValuesForBillingAddress()),$(".summary-total-dd").children().first().html(l),$(".summary-total-dd").children().last(
51).html(l+m),$(".productitems-summary").hide(),t=t.replace(" ",""),$("."+t+"-products").show()}}),$("#edit-state-wrapper").children().remove(),$.ajax({type:"GET",url:GLOBAL_CTX+"/address/states",data:"ajax=true&id_country="+$("#countryId_delivery").val(),async:!1,cache:!0,dataType:"json",success:function(e){var t=e.callPrefix;0!=t?($("#edit-phone-wrapper .country-code").html("+"+t),$("#edit-phone-wrapper").removeClass("without-country-code"),$("#edit-phone-wrapper .country-code").show()):($("#edit-phone-wrapper .country-code").html(""),$("#edit-phone-wrapper").addClass("without-country-code"),$("#edit-phone-wrapper .country-code").hide());var a=!1,n=e.states;for(var i in n){a=!0;break}if(a){var o='<label for="id_state" class="col-xs-3 control-label">State</label><div class="col-xs-7"><select id="stateId_delivery" class="validate[required] form-control" name="shippingAddress.state.id"><option value="">Select State</option>',r='<div class="col-xs-12 fl-wrap auto-filled"><select id="stateId_delivery" class="required form-control" name="shippingAddress.state.id"><option value=""></option>';for(var i in n)o+='<option value="'+i+'">'+n[i]+"</option>";$("body").hasClass("new-checkout-flow")||$("html").hasClass("new-cf-ui")?(o+='</select><label for="stateId_delivery" class="control-label">State</label></div>',$("#edit-state-wrapper").append(r)):($("#edit-state-wrapper").append(o),o+="</select></div>"),$("#edit-state-wrapper").show()}else{o='<label for="id_state" class="col-xs-3 control-label">State</label><div class="col-xs-7"><select id="stateId_delivery" class="validate[required] form-control" name="shippingAddress.state.id"><option value="-1">NA</option></select></div>',r='<div class="col-xs-12 fl-wrap auto-filled"><select id="stateId_delivery" class="required form-control" name="shippingAddress.state.id"><option value="-1">NA</option></select><label for="stateId_delivery" class="control-label">State</label></div>';$("body").hasClass("new-checkout-flow")||$("html").hasClass("new-cf-ui")?$("#edit-state-wrapper").append(r):$("#edit-state-wrapper").append(o),$("#edit-state-wrapper").hide()}}})}function userEmailList(e){var t={};return $.ajax({type:"POST",url:GLOBAL_CTX+"/customer/list-emails",data:"phoneNumber="+e,async:!1,cache:!0,dataType:"json",success:function(e){t=e},error:function(e){t=e}}),t}function forgotPassword(){$("#loginbox #popup-messages, #returning-user #popup-messages").hide(),$.ajax({type:"POST",url:GLOBAL_CTX+"/forgotpassword",async:!1,cache:!1,dataType:"json",data:"email="+$("#recover_email").val(),success:function(e){return e.hasError?($("#loginbox #popup-messages, #returning-user #popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.errors.join("<br />")+"</div><div>").show(),!1):($("#loginbox #popup-messages, #returning-user #popup-messages").html('<div class="success-container"><div class="success-container-inner">'+e.message+"</div><div>").show(),!1)}})}function generateOTPForSignup(e){$("#new-user #popup-messages").hide(),$("#edit-create-account").addClass("loading");var t=$("#customer_phone").val().toLowerCase(),a=!1;"MOBILE"!==deviceName?($("#user-register").validationEngine(),a=$("#user-register").validationEngine("validate")):a=validateForm("user-register1");var n="";if(a?n=GenerateAndSendOTP({emailOrNumber:t,isSignUp:!0}):$("#edit-create-account").removeClass("loading"),n)return n.hasError?($("#new-user #popup-messages").html('<div class="error-container"><div class="error-container-inner">'+n.message+"</div><div>").show(),$("#edit-create-account").removeClass("loading"),!1):($("#new-user #otp-id").val(n.otpId),$("#new-user #otp-verification").removeClass("hidden"),$("#user-register").addClass("hidden"),$("#user-register1").addClass("hidden"),$("#edit-create-account").removeClass("loading"),!1)}function generateOTPForLogging(e){$("#loginbox #popup-messages, #returning-user #popup-messages").hide(),$("#otp-generation-submit").addClass("loading");var t=$("#otp_login").val().toLowerCase();return $("#loginInputContact").val(t),GenerateAndSendOTP({emailOrNumber:t,isSignUp:!1}),!1}function GenerateAndSendOtpAfterCaptcha(e){var t=GLOBAL_CTX+"/generate-and-send-otp";AwsWafIntegration.fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:"contactNumberOrEmail="+e.emailOrNumber+"&isSignUp="+e.isSignUp}).then(e=>(e.ok,e.json())).then(e=>{e.hasError?($("#loginbox #popup-messages, #returning-user #popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.message+"</div><div>").show(),$("#otp-generation-submit").removeClass("loading")):($("#returning-user #otp-id").val(e.otpId),$("#user-login #otp-id").val(e.otpId),$("#loginbox #otp-verification, #returning-user #otp-verification").removeClass("hidden"),$("#loginbox #otp-generation, #returning-user #otp-generation").addClass("hidden"),$("#loginbox #otp-generation-submit, #returning-user #otp-generation").removeClass("loading"))}).catch(e=>{})}function generateOTPUsingCaptcha(e){AwsWafCaptcha.renderCaptcha(document.getElementById("captcha-container"),{apiKey:"3z5CIscarHYMiIfDIqM9o/y2PhWw5cTxBJHTi85fh1xLnHCelZlr+gUlFFKcolJTiqP+/YO2R6KCBeTHHU2SRFX7H
51DUK28snN6YJ1k9DxlJCPy7YVIjG6mCNDEPSQumvG8rO+zK8cfAJHUbhg3o/r8Zevtv2aRlsSRJ74JOrk5tjio6gZ2GtPt/UK8ZKx6b+s5F1/HRwKVR9ytrukquKgD8Ly+zrHBQOYn+UGcH2lw3UyX8ihdaqGKc0cBLV3FvjDnpQMKEipZbtn5mAtciINa9fT25mNsL5yQFTt2EYsfp4oxB9wltf8hxv8eKu27rNmGGg0HMZ0kxDZUf27GYUWlU3oLo2HG7uWyr4pHHQdayy63JpzuPluCggssVZJWexJUa/vTcD4wbVjLLj9zKRlnbgt2ZQurksfTqcPwa+HKYPlCC2XL9Ta61V1i6f6TVI8kH0C9jCJPdg+S6zUb9OZvIbW6mFcwNX04tezCB7Ll0XR10J5iXEYd+LhlZcbo3mjAyggqVXL+gAtuCmhgEC4ewCRTN7d5a0K4qXNb49Gfs+AyI5W2rL0PVUs4yR2J2hFCFxnXnasfE6nIt7RyBai+IQV/CgsVVyCInWQqP1BSQbFewkxSxSAKPJszLdaFWU0GisYpdms8n7imd2+4EYkuIN0RAyIEwpq3PomzzaoYk=_0_1",onSuccess:function(t){GenerateAndSendOtpAfterCaptcha(e)},onError:function(e){}})}function GenerateAndSendOTP(e){var t={};return $.ajax({type:"POST",url:GLOBAL_CTX+"/generate-and-send-otp",async:!1,cache:!1,dataType:"json",data:"contactNumberOrEmail="+e.emailOrNumber+"&isSignUp="+e.isSignUp,success:function(a){if(a.hasError){var n='<div class="error-container"><div class="error-container-inner">'+(a.message||"Something went wrong.")+"</div></div>";return $("#returning-user #otp_error, #user-login #otp_error").html(n),$("#returning-user #popup-messages, #loginbox #popup-messages").show(),void $("#otp-generation-submit").removeClass("loading")}$("#returning-user #otp-id").val(a.otpId),$("#user-login #otp-id").val(a.otpId),e.isSignUp?($("#signupbox #otp-verification,#new-user  #otp-verification").removeClass("hidden"),$("#signupbox #otp-generation,#new-user  #otp-generation").addClass("hidden"),$("#signupbox #otp-generation-submit,#new-user  #otp-generation").removeClass("loading")):($("#loginbox #otp-verification,#user-signup #returning-user #otp-verification").removeClass("hidden"),$("#loginbox #otp-generation,#user-signup #returning-user #otp-generation").addClass("hidden"),$("#loginbox #otp-generation-submit,#user-signup #returning-user #otp-generation").removeClass("loading")),t=a},error:function(a){405==a.status?generateOTPUsingCaptcha(e):t=a}}),t}function verifyOTPForLoggingAndSignup(e){var t={};return $.ajax({type:"POST",url:GLOBAL_CTX+"/verify-otp",async:!1,cache:!1,dataType:"json",data:"otp="+e.otpCode+"&contactNumberOrEmail="+e.emailOrNumber+"&otpId="+e.otpId+"&isSignUp="+e.isSignUp,success:function(e){t=e},error:function(e){t=e}}),t}function verifyOTPForLogging(e){$("#loginbox #popup-messages, #returning-user #popup-messages").hide(),$("#otp-code-submit").addClass("loading");var t={};t.otpCode=$("#returning-user #otp-code").val()||$("#user-login #otp-code").val()||"",t.emailOrNumber=$("#returning-user #otp_login").val()||$("#user-login #otp_login").val()||"",t.otpId=$("#returning-user #otp-id").val()||$("#user-login #otp-id").val()||"",t.isSignUp=!1;var a=verifyOTPForLoggingAndSignup(t);if(a.hasError)return $("#loginbox #popup-messages, #returning-user #popup-messages").html('<div class="error-container"><div class="error-container-inner">'+a.message+"</div><div>").show(),$("#otp-code-submit").removeClass("loading"),!1;if(a.isMultipleAccounts){var n=getEmailListHTML(a.customerEmailList);$("#multipleEmailList").html(n),$("#loginbox #otp-verification").addClass("hidden"),$("#returning-user #otp-verification").addClass("hidden"),$(".other-login-options").addClass("hidden"),$("#multiple-email-section").removeClass("hidden"),$(".formError").remove()}else $("#user-login1 #email-id").val(a.customerEmail),fireLoginEvents(a,!1),a.redirectUrl?window.location=a.redirectUrl:window.location.reload();return $("#otp-code-submit").removeClass("loading"),!1}function verifyOTPForSignup(e){if("MOBILE"!==deviceName&&($("#new-user #otp-verification-form").validationEngine(),!$("#new-user #otp-verification-form").validationEngine("validate")))return!1;$("#loginbox #popup-messages").hide(),$("#otp-code-submit").addClass("loading");var t={};t.otpCode=$("#new-user #otp-code").val()||"",t.emailOrNumber=$("#new-user #customer_phone").val()||"",t.otpId=$("#new-user #otp-id").val()||"",t.isSignUp=!0;var a=verifyOTPForLoggingAndSignup(t);return a.hasError?($("#signupbox #popup-messages, #new-user #popup-messages").html('<div class="error-container"><div class="error-container-inner">'+a.message+"</div><div>").show(),$("#otp-code-submit").removeClass("loading"),!1):("MOBILE"!=deviceName?val
51idateAndCreateAccount():create_account_mobile(),$("#otp-code-submit").removeClass("loading"),!1)}function reSendOTPForSignInUp(e,t){var a={},n=t||"text";return $.ajax({type:"POST",url:GLOBAL_CTX+"/resend-otp",async:!1,cache:!1,dataType:"json",data:"contactNumberOrEmail="+e.emailOrNumber+"&otpId="+e.otpId+"&isSignUp="+e.isSignUp+"&otpDeliveryMode="+n,success:function(e){a=e,resendOTPEvent()},error:function(e){a=e}}),a}function startOTPTimer(e,t){var a=e.find(".otp-countdown-msg"),n=e.find(".otp-options");n.addClass("hidden"),a.removeClass("hidden").html('OTP resent. <span class="otp-seconds">'+t+"</span>s");var i=e.find(".otp-seconds"),o=e.data("otp-timer-id");o&&clearInterval(o),o=setInterval(function(){--t<=0?(clearInterval(o),a.addClass("hidden"),n.removeClass("hidden")):i.text(t)},1e3),e.data("otp-timer-id",o)}function getEmailRegisteredStatus(e,t){var a=!1;return $.ajax({type:"POST",url:GLOBAL_CTX+"/email-validation-for-signup",async:!1,cache:!1,dataType:"json",data:"email="+e+"&customerPhone="+t,success:function(e){a=e,document.getElementById("signUpPhoneNumber").value=t}}),a}function otplogin(e){$("#user-login1 #email-id").val($("#otp-select-variant :selected").val()),sign_in()}function getEmailListHTML(e){var t="";t+="<ul>";for(var a=0;a<e.length;a++)t+='<li><input type="radio" class="validate[required]" name="customerEmail" id="customerEmail-'+a+'" onchange="chooseLoginEmail(event)" data-email="'+e[a]+'" /><label for="customerEmail-'+a+'">'+maskEmail(e[a])+"</label></li>";return t+="</ul>"}function chooseLoginEmail(e){var t=$(e.target).data("email");t&&(t=t.toLowerCase()),$("#user-login1 #email-id").val(t)}function udpateDeliveryDate(e,t){e.preventDefault();var a="",n=!1;1==$(t).parents(".find-nearest-store").length?(a=$(t).parents(".store-on-load-section").find(".get-nearest-store.active").val(),$(".get-nearest-store.active").val(a),n=!0):(a=$(t).parents("#etd").find(".etd-form-text").val(),n=!1);var i=getCustomizationCode(),o=GLOBAL_CTX+"/deliverydate/customization/get",r=!1;1==$("#engravingApplied:checked").length&&(r=!0);var s="";"chainselect"==$("#ringselect").attr("name")&&(s=getSelectedSize()),""==s&&(s="-1"),updateDeliveryDateByPincode(a,o,"ajax=true&productcode="+i+"&pincode="+a+"&size="+s+"&engravingApplied="+r,!1,n)}function removeFromWishList(e,t,a){$.ajax({type:"DELETE",url:GLOBAL_CTX+"/wishlist/removeItem?designId="+e,async:!1,cache:!1,dataType:"json",success:function(n){if(removeWishlistEvent(e),t?window.location.reload():($("#wishListCountHeader").replaceWith("<span class='wish-list-count cart-no' id='wishListCountHeader'><span>"+n.wishListItemCount+"</span> </span>"),disableWishListButton(a)),!n.hasError){$("#popup-messages").html('<div class="success-container"><div class="success-container-inner">'+n.success+"</div><div>"),$("#popup-messages").show();var i=new Object;return i._eventId="deletedFromWishlist",i.designId=e,trackGA("wishlist","deleted from wishlist",e+""),!0}}})}function addToWishlistFromCart(e,t,a,n,i,o){isLoggedIn||isSoftLoggedIn?(addToWishList(t,a,n,i,o),$(e).text("Moving... to Wishlist"),window.location=GLOBAL_CTX+$(e).data("cartremovalurl")):(sessionStorage.setItem("cartItemDesignId",t),window.location=GLOBAL_CTX+"/showLoginPage?action=addToWishList&actionParams="+t+"&customization_id="+a+"&redirectUrlAfterLogin="+encodeURIComponent(window.location.href)+"&cartRemovalUrl="+redirectUrl);const r={};productDetails=productDetails?.split("_"),r._eventId="wishlist_button_clicked",r.product_id=productDetails?.[0]||"",r.product_category=productDetails?.[2]||"",r.product_name=productDetails?.[1]||"",processServerEvent(r)}function wishlistRedirect(){window.location=GLOBAL_CTX+"/wishlist/view"}function callback(e,t,a){window[e](t,a)}function getValueFromGetParams(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var a=new RegExp("&?"+t+"=([^&#]*)").exec(e);return null==a?"":a[1]}function getParamsObject(e){return JSON.parse('{"'+decodeURI(e).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')+'"}')}function getDealOfTheDyDesigns(){$.ajax({type:"GET",url:GLOBAL_CTX+"/static/dealOfTheDay",async:!1,cache:!1,dataType:"json",success:function(e){if(e.hasError)return!1;for(var t=e.designIds.split(","),a=0;a<t.length;a++);return!1}})}function updateBestPrice(e,t,a,n,i){null!=t&&+t<+n?($("#best_price_amount").html(e),$("#price_best_price_amount").html(i)):($("#best_price_amount").html(a),$("#price_best_price_amount").html(i))}function createPayemntForGoldMine(e){$.ajax({type:"POST",url:GLOBAL_CTX+"/gmsp/createGoldMinePayment/",async:!1,cache:!1,dataType:"json",data:"goldMinePlanPaymentCode="+e,success:function(e){e.hasError?window.location.reload():window.location=e.redirectUrlForPayment}})}function cancelGoldMinePlan(){$.ajax({type:"GET",url:GLOBAL_CTX+"/gmsp/cancelGoldMinePlan/",async:!1,cache:!1,dataType:"json",success:function(e){e.hasError?location.reload():($("#goldmine-cancel").hide(),$("#goldmine-cancel-success-a").fancybox({wrapCSS:"goldmine-fb-close"}).trigger("click"),$("#goldmine-cancel-price").text(e.totalAmountToRefund),$(".fancybox-close").on("click",function(){location.reload()}),$(".fancybox-overlay").on("click",function(){location.reload()}))}})}function refreshGoldMineHistoryPage(){location.reload()}function getBalance(){if($(".rewardpoints-content .row").hasClass("error"))return $("#balanceDiv, #otpDiv, #finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),!1;$(".otherError").html(""),$(".cardError").html(""),$(".mobileError").html("");
51var e=$("#cardNumber").val(),t=$("#mobileNo").val(),a=$("#cartId").val(),n=$("#finalPriceToPay").val();if(""==e||""==t)return $("#balanceDiv, #otpDiv, #finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),!1;$.ajax({type:"POST",url:GLOBAL_CTX+"/maxget/checkBalance",async:!1,cache:!1,dataType:"json",data:"cardNumber="+e+"&mobileNumber="+t+"&cartId="+a,success:function(e){if(e.hasError)return""!=e.errorMessage&&"undefined"!=e.errorMessage&&$(".otherError").html(getNotificationErrorHtml(e.errorMessage)),$("#balanceDiv, #otpDiv, #finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),$("#cardDetailsDiv .btn, #otpDiv .btn").removeClass("gray"),$("#cardDetailsDiv .btn-check-balance, #balanceDiv .btn-get-otp").removeClass("btn-light-blue"),""!=e.cardError&&"undefined"!=e.cardError&&$(".cardError").html(getNotificationErrorHtml(e.cardError)),$("#balanceDiv, #otpDiv, #finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),$("#cardDetailsDiv .btn, #otpDiv .btn").removeClass("gray"),$("#cardDetailsDiv .btn-check-balance, #balanceDiv .btn-get-otp").removeClass("btn-light-blue"),""!=e.mobileError&&"undefined"!=e.mobileError&&$(".mobileError").html(getNotificationErrorHtml(e.mobileError)),$("#balanceDiv, #otpDiv, #finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),$("#cardDetailsDiv .btn, #otpDiv .btn").removeClass("gray"),$("#cardDetailsDiv .btn-check-balance, #balanceDiv .btn-get-otp").removeClass("btn-light-blue"),!0;e.amount>0?($("#amountAvailable").html(e.amount),$("#amountToRedeem").val(Math.min(e.amount,n)),$("#mobileNumberSpan").html(t),$("#balanceDiv").css("display","block"),$("#cardDetailsDiv .btn").attr("disabled","disabled"),$("#balanceDiv .btn").removeAttr("disabled"),$("#cardDetailsDiv .btn").addClass("gray"),$("#balanceDiv .btn, #balanceEmptyDiv .btn, #balanceEmptyDiv .btn").removeClass("gray"),$("#otpDiv, #finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),$("#cardDetailsDiv .btn-check-balance").addClass("btn-light-blue"),$("#balanceDiv .btn-get-otp").removeClass("btn-light-blue")):$("#balanceEmptyDiv").css("display","block"),trackGA("BsUI","MaxGet","Get_Balance")}})}function getOTP(){if($(".rewardpoints-content .row").hasClass("error"))return $("#otpDiv, #finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),!1;$(".otherError").html(""),$(".amountError").html("");var e=$("#cardNumber").val(),t=$("#mobileNo").val(),a=$("#amountToRedeem").val(),n=$("#finalPriceToPay").val(),i=$("#amountAvailable").html(),o=$("#cartId").val();return parseInt(a,10)>parseInt(n,10)?($(".otherError").html(getNotificationErrorHtml("Amount to redeem is greater than final price.")),!1):parseInt(a,10)>parseInt(i,10)?($(".otherError").html(getNotificationErrorHtml("Amount to redeem is greater than available balance.")),!1):void $.ajax({type:"POST",url:GLOBAL_CTX+"/maxget/getOTP",async:!1,cache:!1,dataType:"json",data:"amount="+a+"&cardNumber="+e+"&mobileNumber="+t+"&invoiceAmount="+n+"&cartId="+o,success:function(e){if(e.hasError)return""!=e.errorMessage&&"undefined"!=e.errorMessage&&$(".otherError").html(getNotificationErrorHtml(e.errorMessage)),""!=e.amountError&&"undefined"!=e.amountError&&$(".amountError").html(getNotificationErrorHtml(e.amountError)),!0;$("#amountToRedeemSpan").html(a),$("#otpDiv").css("display","block"),$("#tokenNumber").val(e.tokenNumber),$("#isPartial").val(e.isPartial),$("#balanceDiv .btn").addClass("gray"),$("#balanceDiv .btn-get-otp").addClass("btn-light-blue"),$("#entry").val(e.entry),$("#balanceDiv .btn").attr("disabled","disabled");var t=$("#counter"),n=t.text();OTPCounterInterval=setInterval(function(){t.text(n),0==n&&($("#resend-otp-block p").hide(),$("#resend-otp-block a.change-link").removeClass("hidden"),clearInterval(OTPCounterInterval)),n-=1},1e3),trackGA("BsUI","MaxGet","Get_OTP")}})}function changeAmount(){$(".otherError").html(""),$(".cardError").html(""),$(".mobileError").html(""),$(".amountError").html(""),$(".otpError").html(""),$("#balanceDiv").css("display","block"),$("#otpDiv, #finalMessageDiv, #ContinuePaymentDiv").css("display","none")}
51function showCardDetails(){$(".otherError").html(""),$(".cardError").html(""),$(".mobileError").html(""),$(".amountError").html(""),$("#cardDetailsDiv").css("display","block"),$("#finalMessageDiv").css("display","none"),$("#balanceEmptyDiv").css("display","none"),$("#cardDetailsDiv .btn").removeClass("gray")}function redeemPoints(){if($(".rewardpoints-content .row").hasClass("error"))return $("#balanceDiv, #otpDiv, #finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),!1;$(".otherError").html(""),$(".otpError").html("");var e=$("#otpValue").val(),t=$("#tokenNumber").val(),a=$("#isPartial").val(),n=$("#cartId").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/maxget/redeemPoints",async:!1,cache:!1,dataType:"json",data:"otpCode="+e+"&tokenNumber="+t+"&cartId="+n,success:function(e){if(e.hasError)return""!=e.errorMessage&&"undefined"!=e.errorMessage&&$(".otherError").html(getNotificationErrorHtml(e.errorMessage)),""!=e.otpError&&"undefined"!=e.otpError&&$(".otpError").html(getNotificationErrorHtml(e.otpError)),!0;$("#finalMessageDiv").css("display","block"),a?($("#ContinuePaymentDiv").css("display","block"),$("#rewardPointsEventId").val("applyMaxgetPoints")):($("#ConfirmPaymentDiv").css("display","block"),$("#rewardPointsEventId").val("bsCashPayment")),$("#programName").html(e.programName),$("#amountRedeemed").html(e.amount),$("#authCode").val(e.authCode),$("#amountRedeemed").val(e.amount),$("#amountRedeemedFinal").val(e.amount),$("#otpDiv .btn").addClass("gray"),$("#otpDiv .btn").attr("disabled","disabled"),$("#balanceDiv, #otpDiv, #finalMessageDiv, #cardDetailsDiv").hide()}})}function cancelOffer(){if($(".otherError").html(""),1==confirm("Reward points will not be applicable for this order. Are you sure you want to continue?")){var e=$("#amountRedeemed").html(),t=$("#authCode").val(),a=$("#cartId").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/maxget/cancel",async:!1,cache:!1,dataType:"json",data:"amount="+e+"&authCode="+t+"&cartId="+a,success:function(e){if(e.hasError)return""!=e.errorMessage&&"undefined"!=e.errorMessage&&$(".otherError").html(getNotificationErrorHtml(e.errorMessage)),!0;$("#balanceDiv").css("display","none"),$("#cardDetailsDiv").css("display","none"),$("#transfer-bank-points").val("default"),$("#ConfirmPaymentDiv").css("display","none"),$("#ContinuePaymentDiv").css("display","none"),$("#finalMessageDiv").css("display","none"),$("#otpDiv").css("display","none"),$('[name="rewardPointsFinalForm"]').submit(),trackGA("BsUI","MaxGet","Cancel_Offer")}})}}function getNotificationErrorHtml(e){return'<div class="grid_12"><div class="error-container alert error">'+e+"</div></div>"}function updatePriceOnSizeForSets(){for(var e=document.getElementsByName("childCustomizationId"),t=document.getElementsByName("ringselectSet"),a=$("#parentDefaultPrice").val().replace(",",""),n=$("#parentMetalWeight").val().replace(",",""),i=$("#parentGoldCost").val().replace(",",""),o=$("#parentMakingCharges").val().replace(",",""),r=$("#parentTax").val().replace(",",""),s=0,l=0,d=0,c=0,u=0,p=0;p<e.length;p++){var m=e[p].value,v=t[p].value;if(""!=v){$("#ringSizeSet"+(p+1)).val(v);var h=childWeightAndPriceDetails[m],g=h[v].price,f=h.defaultPrice;s+=Number(g-f);var y=h[v].weight,b=h.metalWeight;l+=Number(y-b);var C=h[v].goldCost.replace(",",""),w=h.goldCost;d+=Number(C-w);var P=h[v].makingCharges.replace(",",""),S=h.makingCharges;c+=Number(P-S);var T=h[v].taxes.replace(",",""),k=h.tax;u+=Number(T-k)}}var I=parseInt(Number(a)+Number(s)),E=parseInt(Number(I*(100-parentDiscount)/100)),x=Number(n)+Number(l),_=Number(i)+Number(d),O=Number(o)+Number(c),D=Number(r)+Number(u);$("#our_price_display").html(I.toLocaleString()),$("#discountedPriceSpan").html(E.toLocaleString()),$("#short_desc_goldWt").html("("+Math.round(100*x)/100+" gram)"),$("#goldCost_b").html(_.toLocaleString()+"/-"),$("#makingChargesWithoutDiscount_b1").html(O.toLocaleString()+"/-"),$("#taxes_b").html(D.toLocaleString()+"/-")}function checkAndSubscriberForPushNotification(){if("TRUE"==isPushNotificationSubscriptionEnabled&&"serviceWorker"in navigator)try{navigator.serviceWorker.register(GLOBAL_CTX+"/resources/themes/bluestone/js/service-worker.js").then(function(e){e.pushManager.getSubscription().then(function(t){var a;if(t?a=t.endpoint:e.pushManager.subscribe({userVisibleOnly:!0}).then(function(e){var t=(a=e.endpoint).substring(a.lastIndexOf("/")+1);
51document.cookie="basdspsutbsasdfzcklhvggj="+escape(t),$.ajax({type:"GET",url:GLOBAL_CTX+"/pushNotification/subscribe/"+t,dataType:"json",async:!1,cache:!1})}),null!=a){var n=a.substring(a.lastIndexOf("/")+1);document.cookie="basdspsutbsasdfzcklhvggj="+escape(n)}})})}catch(e){}}function handleGeocoding(e,t){if($("#map-search-input").val($("#map-location").val()),"desktop"==e)t?($("#size-helper-s2").addClass("active"),$(".size-helper").removeClass("stp1").addClass("stp2")):($("#size-helper-s3").addClass("active"),$(".size-helper").removeClass("stp1").addClass("stp3"));else if(!$("#size-helper-s1 .form-item").hasClass("error"))if($("#size-helper-s1").removeClass("active"),t){$("#size-helper-s2").addClass("active"),$(".size-helper .overlay-v1").addClass("hidden"),$("#ringSizeHelpText").data("index",1);var a=$(window).height(),n=$("#size-helper-s2 .btn-wrapper").height(),i=$("#size-helper-s2 .map-page-header").height();$("#main .size-helper #map-canvas").height(a-(n+i)),google.maps.event.trigger(map,"resize"),map.setCenter(globalMarker.getPosition())}else $("#size-helper-s3").addClass("active"),$(".size-helper .overlay-v1").addClass("hidden"),$("#ringSizeHelpText").data("index",2)}function validateEmail(e){return/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i.test(e)}function validateMobile(e){return/^([123456789]{1})([0-9]{9})$/.test(e)}
51function displayInvalidEmails(e,t){var a=[];if(e.val().indexOf(",")>-1&&e.val().indexOf(";")>-1)a.push("Use either , or ; as seperator");else{var n=e.val().replace(/,\s*$/,"").split(/\,|\;/);for(i=0;i<n.length;i++)validateEmail(n[i].trim())||""==n[i]||a.push(n[i].trim())}return a.length>0&&t.html("<div class='inner'><span class='text'>Invalid Email(s):</span> <span class='invalid-emails'>"+a.join(", ")+"</div></div>"),a.length}function shareYourWishList(e,t){var a=$("#shareYourWishList");if(displayInvalidEmails($("#shareWishListId"),$("#shareYourWishList .message"))>0)$("#shareWishListId").addClass("error");else{$("#shareWishListId").removeClass("error");var n=a.serializeArray();$.ajax({type:"POST",url:GLOBAL_CTX+e,async:!1,cache:!1,data:n,dataType:"json",success:function(e){if(e.hasError)alert(e.message),location.reload();else{$("#shareYourWishList .message .inner").remove(),"NORMAL"==deviceName||"TABLET"==deviceName?($("#wishlist-share .share-wishlist-form").removeClass("show").addClass("hide"),$("#wishlist-share .share-wishlist-success").removeClass("hide").addClass("show")):($("#wishlist-share").removeClass("active"),$(".share-wishlist-success").addClass("active"));for(var a=$("#wishlist-share #shareWishListId").val(),n=a.split(/\,|\;/),i=[],o=0;o<n.length;o++)""!=n[o]&&i.push(n[o]);$("#wishlist-share .share-wishlist-success .right").html(i.join(", "));var r=new Object;r._eventId="sharedWishList",r.email=a,r.fromEmail=t;var s=e.designIdList;trackGA("wishlist","shared wishlist",s+";"+n)}}})}}function shareYourWishListBeforeSending(e,t){(new Object)._eventId="shareWishListClicked",$.ajax({type:"POST",url:GLOBAL_CTX+"/share-your-wishlist/generating-self-url",async:!1,cache:!1,dataType:"json",data:"customerId="+e,success:function(a){if(!a.hasError){if(null!=t&&"wapp"==t){var n,i=$(".loggedin .user-name").text(),o=a.designIdList.length;text=" Your friend "+i+" has shared "+o+" beautiful designs selected on BlueStone.com with you";var r=encodeURIComponent(text);n="whatsapp://send?text="+encodeURIComponent(a.selfLink)+r,window.location.href=n,trackGA("wishlist","share wishlist whatsapp clicked",a.designIdList.join(", "))}else $("#sharedSelfUrl").html(a.selfLink),trackGA("wishlist","share wishlist clicked",s+";"+e);"NORMAL"!=deviceName&&"TABLET"!=deviceName||($(".wishlistshare").fancybox().trigger("click"),$("#shareWishListId").val(""),$(".share-wishlist-success").removeClass("show").addClass("hide"),$(".share-wishlist-form").removeClass("hide").addClass("show"));var s=a.designIdList}}})}function sharedlistRedirect(e){$.ajax({type:"GET",url:GLOBAL_CTX+"/share-your-wishlist/add-items",async:!1,cache:!1,data:"q="+encodeURIComponent(e),dataType:"json",success:function(e){e.hasError||(window.location.href=GLOBAL_CTX+"/wishlist/view")}})}function shareYourWishListClearAll(e){$.ajax({type:"POST",url:GLOBAL_CTX+e,async:!1,cache:!1,dataType:"json",success:function(e){e.hasError?(alert(e.message),window.location.reload()):window.location.reload()},failure:function(e){alert("Server failed to process request")}})}function getCurrentPageType(){return""==PAGE_TYPE?"Others":PAGE_TYPE}function bluestoneLogoClicked(){var e=new Object;e._eventId="bs_bluestone_logo_clicked",processServerEvent(e)}function categoryPageViewed(e){var t=new Object;t._eventId="viewedCategory",t.pageType=getCurrentPageType(),t.categoryName=e}function initiatedOrderPlacement(e){var t=new Object;t._eventId="initiatedOrderPlacement",t.pageType=getCurrentPageType(),t.id=e}$(document).ready(function(){try{loadSizeAndPrices()}catch(e){}setScreenResolutionInCookie(),$("#get-pincode-delivery, .get-nearest-store").on("keypress",function(e){10!=e.keyCode&&13!=e.keyCode||e.preventDefault()}),$("#get-pincode-delivery").on("keyup",function(e){13==e.keyCode&&$("#cust-details #etd a.button, #cust-details #etd a.btn").click()}),$(".get-nearest-store").on("keyup",function(e){$(".fns-btn").text("Submit").css("pointer-events","auto")}),$(".toggle-password").click(function(){const e=$($(this).data("target")),t="password"===e.attr("type")?"text":"password";e.attr("type",t)}),$(".get-nearest-store").on("keyup",function(e){if(13==e.keyCode){var t=$("#select-gold .color-val").html()||window.metalColor,a=getCustomizationCombinationKey(t,$('input[type="radio"][name="metalPurity-'+t+'"]:checked').val()||window.metalPurity,$('input[type="radio"][name="diamondQuality"]:checked').val()||$("#qualityselect").val()||window.diamondColorClarity,$("#caratselect").val()||window.solitaireCarat||"",$(".select-size.clarity-wrapper #clarityselect").val()||window.solitaireClarity||"",$(".select-size.color-wrapper #colorselect").val()||window.solitaireColor||""),n=$("#customizationId").val(),i=$(".get-nearest-store ").val();if(fetchAllCustomizationAndEDD(i,designId,a,!1),window.pinErr)$(".store-section,.store-delivery,.early-delivery-note").addClass("hidden");else{if("true"==isSizeableProduct){var o=getProductSizesAndEDD(a);$("#sizeDropdown").html(o.htmlData)}fetchStoreDetails(i,n),fetchAllStoresDetails(i),fetchStoreAndTahHub(i),$(".store-delivery,.early-delivery-note").removeClass("hidden")}}}
51),$("#view-sort-by").on("change",function(){var e=$(this).val();return e&&(window.location=e),!1}),$("#cust-details #etd a.btn, #cust-details #etd a.button").click(function(e){udpateDeliveryDate(e,$(this));var t=new Object;t._eventId="updated_pincode",t.id=$("#customizationId").val(),t.customizationId=$("#customizationId").val(),t.pinCode=$(this).parents("#etd").find(".form-text").val(),processServerEvent(t),trackGA("BsUI","expected-delivery-date","clicked")}),$("#add_to_cart .addToCart").prop("disabled",!1),$("#buy_block").on("submit",function(e){var t=t||{};if("MOBILE"!==deviceName?$(this).validationEngine("validate"):""!==$("#ringselect").val()){$(this).find(".buy-now-btn").addClass("loading"),t.price=$("#discountedPriceSpan").text(),t.retailPrice=$("#our_price_display").text(),t.size=$("#ringselect").val(),t.image=$(".image-placeholder img").attr("src"),t.purity=$(".metal-purities input:checked").val(),t.color=$("#select-gold .selected").length>0?$("#select-gold .selected").text().trim():"",t.diamondColorClarity=$("#selectMetalAndDiamondQuality .diamond input:checked").val(),t.solitaireCarat=$("#caratselect").val(),t.solitaireColorClarity=$("#qualityselect").val(),trackAddToCart($(this),t,expectedDateOfDelivery);const e=t&&t.price?parsePrice(t.price):0,a=$("#customizationId").length>0?$("#customizationId").val():"",n=productCategory||"",i=$("#buy_block h1").length>0?$("#buy_block h1").data("designname"):"",o=designId||"";facebookAddToCart(o,i,n,a,e)}if($(".p-engraving .pe-input").hasClass("active")){if(!($(".p-engraving .pe-input .form-text").val().length>0))return $(".p-engraving .pe-input .form-text").focus(),$(".p-engraving .pe-input .form-text").addClass("invalid"),!1;$(".p-engraving .pe-input .form-text").removeClass("invalid")}var a=!1;if(null!=$("#isSets")&&"true"==$("#isSets").val()&&(a=!0),a){for(var n=document.getElementsByName("ringselectSet"),i=0,o=0;o<n.length;o++){var r=n[o];r.options[r.selectedIndex].value.length>0?i++:$("#attributes select").focus()}return n.length==i}var s=$("#ringSelectId").val();1==$("#engravingApplied:checked").length&&$("#engravingMessage").val($("#engrave").val());var l=!0;if(s){var d=$(".country-switcher").find(".top-level-dd ").find(".top-level-dd-inner").find("span").html(),c=$(".country-switcher").find(".orange-color").html(),u=!0;return d&&!d.match(/inr/i)&&(u=!1),c&&!c.match(/rs/i)&&(u=!1),-1!=$("#ringselect").val()&&$("#ringselect").val().length||($("#attributes select").focus(),l=!1),-1==$("#ringselect").val()&&u&&(l=!0,$("#attributes select").focus(),$("#attributes select").blur()),""!==$("#ringselect").val()&&("true"===getURLparams.list&&trackGA("BsUI","Hybrid-List","BuyNow"),"true"===getURLparams.pla&&trackGA("BsUI","Hybrid-PLA","BuyNow")),l}return!0}),$(".change-cc-menu li > span").click(function(e){e.preventDefault();var t=$(this).children(".country").html();$.ajax({type:"POST",url:GLOBAL_CTX+"/country/set/",async:!1,cache:!1,dataType:"json",data:"sel-country="+t,success:function(e){trackGA("BsUI","selectCountry",t),location.reload()}})}),$("#ihaveavoucher").is(":checked")&&($(".apply-voucher").show(),$("#voucher-wrapper").show()),$("input[name=freegift_radio][type=radio]").change(function(){if("ihaveavoucher"==$(this).val())$(".apply-voucher").show(),$("#voucher-wrapper").show();else{$(".apply-voucher").hide(),$("#voucher-wrapper").hide();var e=$(".remove-code-href").html().replace(/&amp;/g,"&");window.location.href=e}}),$("#corporate-discount-form #company-name").bind("change",function(e){"Other"==$("#company-name").val()?$(".other-company-name").show():$(".other-company-name").hide()}
51),$("#engravingApplied").click(function(){var e=$("#etd .pin").first().text(),t=getCustomizationCode(),a=GLOBAL_CTX+"/deliverydate/customization/get",n=!1;1==$("#engravingApplied:checked").length&&(n=!0);var i="";"chainselect"==$("#ringselect").attr("name")&&(i=getSelectedSize()),""==i&&(i="-1"),updateDeliveryDateByPincode(e,a,"ajax=true&productcode="+t+"&pincode="+e+"&size="+i+"&engravingApplied="+n)}),$("#cardNumber, #mobileNo").focus(function(){$(".btn-check-balance, .btn-checkBalance").removeAttr("disabled")}),$("#cardNumber, #mobileNo, #amountToRedeem").click(function(){$(this).parents("form").find(".btn").removeAttr("disabled").removeClass("gray")}),$("#amountToRedeem").click(function(){$("#cardDetailsDiv .btn").attr("disabled",!0),$("#cardDetailsDiv .btn").addClass("btn-light-blue")}),$("#amountToRedeem").focus(function(){$("#balanceDiv .btn").removeAttr("disabled"),$("#balanceDiv .btn").removeClass("btn-light-blue"),$("#cardDetailsDiv .btn").attr("disabled",!0),$("#cardDetailsDiv .btn").addClass("btn-light-blue")}),$("#rewardpoints-content #cardNumber, #rewardpoints-content #mobileNo").focus(function(){$("#cardDetailsDiv .btn").removeAttr("disabled"),$("#cardDetailsDiv .btn").removeClass("btn-light-blue")}),$("#rewardpoints-31").submit(function(){return trackGA("BsUI","MaxGet","Redemption_Success"),$(this).submit(function(){return!1}),!0}),navigator.cookieEnabled,$("#shareWishListId").on("input",function(){$(this).val().length>0?$("#shareYourWishList .btn").removeAttr("disabled").removeClass("btn-gray blue"):($("#shareYourWishList .message .inner").remove(),$("#shareYourWishList .btn").attr("disabled",!0).addClass("btn-gray blue"))}),$("#wishlist-share .share-again").click(function(){$("#shareYourWishList .btn").attr("disabled",!0).addClass("btn-gray"),$("#wishlist-share #shareWishListId").val(""),"NORMAL"==deviceName||"TABLET"==deviceName?($("#wishlist-share .share-wishlist-form").removeClass("hide").addClass("show"),$("#wishlist-share .share-wishlist-success").addClass("hide").removeClass("show")):($("#wishlist-share .share-wishlist-form").addClass("active"),$("#wishlist-share .share-wishlist-success").removeClass("active"))}),"MOBILE"!=deviceName&&"TABLET"!=deviceName||($(".design-week .tt span").click(function(){var e=$
51(this).parents(".tt").find("video"),t=e.data("label"),a=e.data("pid").toString();trackGA("design_week",t+"_turntable_video_clicked",a),e.get(0).play(),$(this).remove()}),$(".design-week .video-1 span").click(function(){$(this).parents(".video-1").find("video").get(0).play()}));var e=0;if($(window).scroll(function(){$(window).scrollTop()>10&&1==++e&&$(".design-week video").each(function(){var e=$(this),t=e.data("url");e.html("<source src="+t+"/>"),e.get(0).load()})}),$(".sendOTP").click(function(){var e=$("#cartId").val(),t=window.location.href,a=document.referrer,n="CASH";($("#cardOnDelivery").hasClass("selected")||$("input[name='cardOnDelivery']:checked").length>0||$("input[name='codPaymentType']:checked").length>0)&&(n="CARD");var i=$(this);i.parent().find(".form-submit").addClass("hidden"),i.parent().find(".payment-loader").removeClass("hidden"),$.ajax({type:"POST",url:GLOBAL_CTX+"/cart/sendOtpForVerification/",async:!0,cache:!1,dataType:"json",data:"cartId="+e+"&_eventId=codCodeRequest&currentURL="+t+"&codPaymentType="+n+"&referrer="+a+"&directServer=0",success:function(e){e.hasError?(i.parents(".payment_detail").find(".cash-on-delivery-content-otp").hide(),i.parents(".payment_detail").find(".cash-on-delivery-content").show(),otpSendEvent(n,!1)):(i.parents(".payment_detail").find(".otp-verification").hide(),i.parents(".payment_detail").find(".cash-on-delivery-content-otp").show(),otpSendEvent(n,!0),countDownTimer($(".paymentSelectedTab #otp-count-down"),60,function(){$(".paymentSelectedTab .otp-timer-block").addClass("disable"),"MOBILE"!==deviceName?i.parents(".payment_detail").find("#otpMessages .error-container.otp-not-recv-msg").slideDown():i.parents(".payment_detail").find(".error-container.otp-not-recv-msg").show(),trackGA("BsUI","CheckoutFlow","Call confirmation option shown")}),i.parents("#cashondelivery-content").find(".checkbox-wrapper input:checkbox").is(":checked")?trackGA("BsUI","CheckoutFlow","COD CardOnDelivery Place Order"):(i.parents("#cashondelivery-content").find(".paymentSelectedTabTwo .payment_module").replaceWith('<div class="payment_module">Pay using cash on delivery</div>'),i.parents("#cashondelivery-content").hasClass("payment_detail")&&trackGA("BsUI","CheckoutFlow","COD CashOnDelivery Place Order")),i.parents("#cardOnDelivery-content").hasClass("payment_detail")&&trackGA("BsUI","CheckoutFlow","CardOnDelivery Place Order"))}})}),$(".otpVerificationCOD").click(function(e){e.preventDefault();var t=$(this).parents(".payment_detail").find("#otp-code").val(),a=$(this).parents(".payment_detail").find("#cartId").val(),n=$(this);n.addClass("hidden"),n.parent().find(".payment-loader").removeClass("hidden");var i=$(this).parents(".payment-checkout").hasClass("app-view");$.ajax({type:"POST",url:GLOBAL_CTX+"/cart/otpVerification/",async:!1,cache:!1,dataType:"json",data:"otp="+t+"&cartId="+a,success:function(t){t.hasError?(t.expired?(n.parents(".payment_detail").find(".sent-otp-code").hide(),n.parents(".payment_detail").find(".otp-code-expired").show(),n.parents(".payment_detail").find(".invalid-otp-code").hide(),"MOBILE"!=deviceName&&(n.parents(".payment_detail").find("#otpMessages .error-container.otp-not-recv-msg").slideUp(),n.parents(".payment_detail").find("#otpMessages .error-container.otp-expired-msg").slideDown(),trackGA("BsUI","CheckoutFlow","Code expired message shown"))):(i&&otpCounter>=2&&(n.parents(".payment_detail").find(".cash-on-delivery-content-otp").hide(),n.parents(".payment_detail").find(".cash-on-delivery-content").show(),n.parents(".payment_detail").find("form").removeAttr("onsubmit"),trackGA("BsUI","CheckoutFlow","Call confirmation option shown")),n.parents(".payment_detail").find(".invalid-otp-code").show(),trackGA("BsUI","CheckoutFlow","Invalid code entered"),n.parents(".payment_detail").find(".sent-otp-code").hide(),n.parents(".payment_detail").find(".EnterVerificationCode .form-control").val(""),n.parents("#cashondelivery-content").find(".checkbox-wrapper input:checkbox").is(":checked")?trackGA("BsUI","CheckoutFlow","COD CardOnDelivery Confirm Order noOTP"):n.parents("#cashondelivery-content").hasClass("payment_detail")&&trackGA("BsUI","CheckoutFlow","COD CashOnDelivery Confirm Order noOTP"),n.parents("#cardOnDelivery-content").hasClass("payment_detail")&&trackGA("BsUI","CheckoutFlow","CardOnDelivery Confirm Order noOTP"),otpCounter++),n.parent().find(".form-submit").removeClass("hidden"),n.parent().find(".payment-loader").addClass("hidden")):(n.parents(".payment_detail").find("form").removeAttr("onsubmit"),otpEnteredOnPayment(e,t),submitPaymentForm(
51),n.parents("#cashondelivery-content").find(".checkbox-wrapper input:checkbox").is(":checked")?trackGA("BsUI","CheckoutFlow","COD CardOnDelivery Confirm Order"):n.parents("#cashondelivery-content").hasClass("payment_detail")&&trackGA("BsUI","CheckoutFlow","COD CashOnDelivery Confirm Order"),n.parents("#cardOnDelivery-content").hasClass("payment_detail")&&trackGA("BsUI","CheckoutFlow","CardOnDelivery Confirm Order"),n.parents(".paymentSelectedTabTwo").find(".invalid-otp-code.error-message").hide(),clearInterval(timerID),n.parents(".paymentSelectedTabTwo").find(".otp-timer-block").addClass("disable"),$(".card-payment-overlay").removeClass("hidden"))}})}),$(".reSendOTP").click(function(){var e=$("#cartId").val(),t=window.location.href,a=document.referrer,n=$(this),i="CASH";($("#cardOnDelivery").hasClass("selected")||$("input[name='cardOnDelivery']:checked").length>0||$("input[name='codPaymentType']:checked").length>0)&&(i="CARD"),$.ajax({type:"POST",url:GLOBAL_CTX+"/cart/sendOtpForVerification/",async:!0,cache:!1,dataType:"json",data:"cartId="+e+"&_eventId=codResendCodeRequest&currentURL="+t+"&referrer="+a+"&codPaymentType="+i+"&directServer=0",success:function(e){e.hasError?(n.parents(".payment_detail").find(".cash-on-delivery-content-otp").hide(),n.parents(".payment_detail").find(".cash-on-delivery-content").show()):("MOBILE"!=deviceName?(n.parents(".payment_detail").find("#otpMessages .error-container").slideUp(),n.parents(".payment_detail").find(".sent-otp-code").slideDown(),setTimeout(function(){n.parents(".payment_detail").find(".sent-otp-code").slideUp()},5e3)):($(".error-container.otp-not-recv-msg").hide(),setTimeout(function(){$(".sent-otp-code.success-message").hide()},5e3)),$(".paymentSelectedTab .otp-timer-block #otp-count-down").text(60),$(".paymentSelectedTab .otp-timer-block").removeClass("disable"),countDownTimer($(".paymentSelectedTab #otp-count-down"),60,function(){"MOBILE"!==deviceName?n.parents(".payment_detail").find("#otpMessages .error-container.otp-not-recv-msg").slideDown():n.parents(".payment_detail").find(".error-container.otp-not-recv-msg").show(),$(".otp-timer-block").addClass("disable"),trackGA("BsUI","CheckoutFlow","Call confirmation option shown")}),"MOBILE"==deviceName&&n.parents(".payment_detail").find(".sent-otp-code").show(),n.parents(".payment_detail").find(".otp-code-expired").hide(),n.parents(".payment_detail").find(".invalid-otp-code").hide(),n.parents(".payment_detail").find(".EnterVerificationCode .form-control").val(""))}})}),$("#customizeOptionForEventLogger").on("click",function(){if($(".formError").remove(),"MOBILE"!=deviceName){if($(this).html().toUpperCase().includes("HIDE"))return}else if(!$(this).html().toUpperCase().includes("HIDE"))return;$("#isCustomizationAttempted").val("true");var e=new Object;e._eventId="initiated_product_customization",e.id=$("#customizationId").val(),e.customizationId=$("#customizationId").val(),e.pageType=PAGE_TYPE}),$("#ringselect").on("mousedown",function(e){var t=new Object;t._eventId="initiated_ring_size_selection",t.id=$("#customizationId").val(),t.customizationId=$("#customizationId").val(),t.pageType=PAGE_TYPE}),$("#ringselect").on("change",function(e){e.preventDefault(),e.stopPropagation();var t=new Object;t._eventId="selected_ring_size",t.id=$("#customizationId").val(),t.customizationId=$("#customizationId").val(),t.selected_ring_size=$("#ringselect").val(),t.pageType=PAGE_TYPE}),$("body").on("keydown",".paymentSelectedTab #otp-code",function(){$(this).val().length>0&&$(this).parents(".paymentSelectedTabTwo").find(".otpVerificationCOD").prop("disabled",!1)}),$("#occasionDeliveryCheckBox #occasionDeliveryCB").change(function(){changeEDDToOccasionDate()}),"product"==PAGE_TYPE&&getProductSelectValueOnLoad(),1===$("#countryId_delivery").length)var t=$("#countryId_delivery")[0],a=t.options[t.selectedIndex].text;else a=$("#countryId1_delivery").val();"India"!=a&&setDummyValuesForBillingAddress(),formFieldFocus(),formFieldAutoFilled(),$(".textarea-wrap").on("click",function(){$(this).find("textarea").focus()}),$(".remove-gift-msg").on("click",function(){removeGiftMsg($(this).data("cartid"),$(this))}),$("#voucher-wrapper input[type=submit]").on("click",function(){var e=$
51("#voucher-wrapper #discountCode").val();trackGA("Checkout","Applied Voucher",e)}),$(".remove-voucher").click(function(){$("#removeVoucher").submit()}),$(".input-lowercase").on("change",function(){var e=$(this).val().toLowerCase();$(this).val(e)}),"product"!=PAGE_TYPE&&"viewCart"!=execution_step||($("body").on("click",function(e){$(".size-list").hide()}),$(".select-size").on("click",function(e){e.stopPropagation()})),"checkoutFlowAddressDetails"==execution_step?$("#address-form").submit(function(){validateForm("address-form")&&$(".bs-address-details").addClass("loading")}):"viewCart"==execution_step&&(updateSolitaireAckColors(),$(".solitaire-cancel-ack-checkbox").on("change",updateSolitaireAckColors),$(".bs-place-order").on("click",function(e){if(e.preventDefault(),!checkAllProductSize()){var t=Math.ceil($(".quanity-size-block.size-not-selected").offset().top);return"MOBILE"!=deviceName?$("html").animate({scrollTop:t-130},500):smoothScrollElement(window,t-130,200),void $(".cart-size-tooltip").removeClass("hidden")}validateSolitaireTerms()&&(placedOrderOnCart(),$(this).addClass("loading"),location.href=$(this).attr("href"))})),window.isSliderProduct="","product"==PAGE_TYPE&&(window.isSliderProduct=$("#isSliderProduct").val());var n=sessionStorage.getItem("sc");null===n&&(sessionStorage.setItem("sc",getStoreCount()),n=sessionStorage.getItem("sc")),$("#storeCount").text(n),$(".disc-applied").click(function(){$(".discount-popup").not($(this).find(".discount-popup")).removeClass("active"),$(this).find(".discount-popup").toggleClass("active")}),$(".disc-applied").on("focusout",function(){$(this).find(".discount-popup").removeClass("active")}
51),$(".js-discount-trigger").click(function(){var e=$(this).closest(".discount-section");e.find(".js-voucher-list").toggleClass("is-open"),e.toggleClass("is-open")})}),$(document).ready(function(){var e="less";$(".more-cities").click(function(){"less"===e?($(".full-cities-list").removeClass("hidden"),$(this).html("(View Less)"),e="more"):"more"===e&&($(".full-cities-list").addClass("hidden"),$(this).html("(View More)"),e="less")}),$(".gms-tabs").click(function(){$(this).addClass("active"),$(this).hasClass("gms-information")?($(".gms-installment").removeClass("active"),$(".table-wrapper .my-information").removeClass("hidden"),$(".table-wrapper .my-installment").addClass("hidden")):$(this).hasClass("gms-installment")&&($(".gms-information").removeClass("active"),$(".table-wrapper .my-information").addClass("hidden"),$(".table-wrapper .my-installment").removeClass("hidden"))}),$('input[name="residentStatus"]').change(function(){"MOBILE"!=deviceName?$(this).is(":checked")&&"Others"==$(this).val()&&$(".other-nationality").fancybox({closeBtn:!1,afterClose:function(){$('input[id="indian"]').prop("checked",!0)}}).trigger("click"):handleResetGMResidentStatus(this)}),$("#gmsNonLoggedInLpSubmit").click(function(e){e.preventDefault();var t=$(".gmsPlanID").val();-1==t.indexOf("-")&&(t=t.replace(/^(.{5})(.*)$/,"$1-$2")),t.indexOf(" ")>0&&(t=t.trim());var a=t.toUpperCase();if($(".gmsPlanID").val(a),!validateForm("getPlanIdDetail"))return!1;getGMSDetailsForNonLoggedInUser(a)}),$(".gmsPlanID").on("change",function handleClickToPayInputChange(){var e=$(this),t=e.val();-1==t.indexOf("-")&&(t=t.replace(/^(.{5})(.*)$/,"$1-$2"));t.indexOf(" ")>0&&(t=t.trim());e.val(t.toUpperCase())}),$("#gmsPlanID").on("keypress",function(e){10!=e.keyCode&&13!=e.keyCode||(e.preventDefault(),$("#gmsNonLoggedInLpSubmit").click())})}),pickupAtStoreDelivery={storesInCity:{},getStoresInCity:function getStoresInCity(e){var t=null;return $.ajax({async:!1,cache:!1,type:"GET",url:GLOBAL_CTX+"/shipping/stores",data:e,processData:!1,contentType:!1,dataType:"json",success:function(e){t=e},error:function(e){(t=e).hasError=!0}}),t}},$(document).ready(function(){$("#pickupCity").change(function(e){var t=e.target.value;if(!t)return $("#pickupStore").prop("disabled",!0),$("#pickupStore").addClass("gray-bg"),$("#pickupStore").val(""),void $("#pickupStoreAddress").val("-");$(".notifications-delivery-type").html("");var a="cityName="+t,n=pickupAtStoreDelivery.getStoresInCity(a);if(!n.hasOwnProperty("hasError")||n.hasError||!n.hasOwnProperty("stores"))return $(".notifications-delivery-type").html(getNotificationErrorHtml("Error fetching stores for city. Please try again.")),$("#pickupStore").prop("disabled",!0),$("#pickupStore").addClass("gray-bg"),$("#pickupStore").val(""),void $("#pickupStoreAddress").val("-");pickupAtStoreDelivery.storesInCity=n.stores;var i=pickupAtStoreDelivery.storesInCity;$("#pickupStore").html(""),$("#pickupStore").append(new Option("-","")),Object.keys(i).forEac
51h(function(e){$("#pickupStore").append(new Option(i[e].name,e))}),$("#pickupStore").prop("disabled",!1),$("#pickupStore").removeClass("gray-bg")}),""!==$("#pickupCity").val()&&$("#pickupCity").trigger("change")}),$(document).ready(function(){$("body").on("click",".resend-otp-btn",function(e){e.preventDefault();var t=$(this),a=t.data("mode"),n=t.closest(".resend-otp-wrap"),i={};i.otpId=$("#returning-user #otp-id").val()||$("#user-login #otp-id").val()||$("#new-user #otp-id").val(),i.emailOrNumber=$("#returning-user #otp_login").val()||$("#user-login #otp_login").val()||$("#new-user #customer_phone").val(),$(this).parents("#new-user").length>0?i.isSignUp=!0:i.isSignUp=!1;var o=reSendOTPForSignInUp(i,a);o.hasError?$("#loginbox #popup-messages, #signupbox #popup-messages, #returning-user #popup-messages, #new-user #popup-messages").html('<div class="error-container"><div class="error-container-inner">'+o.message+"</div><div>").show():startOTPTimer(n,30)})});var getURLparams=getURLparamsForURL(window.location.search.substring(1));function getURLparamsForURL(e){var t={};if(null==e||""==e)return e;var a=e.split("&");if(!(null==a&&null==a||null==e&&null==e))for(var n=0;n<a.length;n++){var i=a[n].split("=");if(void 0===t[i[0]])t[i[0]]=decodeURIComponent(i[1]);else if("string"==typeof t[i[0]]){var o=[t[i[0]],decodeURIComponent(i[1])];t[i[0]]=o}else t[i[0]].push(decodeURIComponent(i[1]))}return t}function sendPaymentInitiatedEvent(e){var t={_eventId:"paymentInitiated"};t.paymentOption=e}function selectFilterAndLogEventLogger(e,t,a,n){e=GLOBAL_CTX+"/"+e.replace(/@/g,"/")+".html",$("body").hasClass("b-new-filter")?sortValue=document.querySelector("#view-sort-by .selected").textContent.trim():(index=document.getElementById("select-view-by").selectedIndex,sortValue=document.getElementById("select-view-by").options[index].text);var i=new Object;i._eventId="applied_filter",i.selectedFilter=t,i.selectedFilterOption=a,i.numberOfDesignsForFilter=n,i.sortOption=encodeURIComponent(sortValue),i.pageType="browse",i.currentURL=window.location.href}function logCustomizationAttemptedEvent(e){if("false"!=$("#isCustomizationAttempted").val()){var t=new Object;t._eventId="customized_product",t.id=$("#customizationId").val(),t.customizationId=$("#customizationId").val(),t.pageType=PAGE_TYPE,t.selected_diamond_type=$("#qualityselect").val(),t.selected_solitaire_carat=$("#caratselect").val()}}function logEventForHomeTryOnInitiated(){var e=new Object;e._eventId="initiated_hometryon",e.id=$("#customizationId").val(),e.customizationId=$("#customizationId").val()}function logHomeTryOnProvidedEmail(){var e=new Object;e._eventId="hometryon_provided_mobile_email",e.id=$("#customizationId").val(),e.customizationId=$("#customizationId").val()}function logAddedToHomeTryOnCart(){var e=new Object;e._eventId="added_to_hometryon",e.id=$("#customizationId").val(),e.customizationId=$("#customizationId").val()}function logSimilarProductClickedEvent(e,t){var a=new Object;a._eventId="clicked_similar_product",a.id=$("#customizationId").val(),a.originalProductDesignId=$("#designId").val(),a.customizationId=$("#customizationId").val(),a.similarProductCode=e,a.similarProductSellingPrice=t}function logAddToWishListClickedEvent(e){var t=new Object;t._eventId="addToWishListClicked",t.id=$("#customizationId").val()||e.dataset.customizationId,t.customizationId=$("#customizationId").val()}function logAddedToWishListEvent(e){var t=getCommonWishlistAttr($(".pid-"+e));processClientEvent("Added To Wishlist",t)}function logInitiatedRingSizerEvent(){var e=new Object;e._eventId="initiated_ring_sizer",e.id=$("#customizationId").val(),e.feature="Ring Sizer",e.customizationId=$("#customizationId").val()}function logMobileLocationProvidedRingSizerEvent(){var e=new Object;e._eventId="provided_mobile_location",e.id=$("#customizationId").val(),e.feature="Ring Sizer",e.customizationId=$("#customizationId").val()}function logExactLocationProvidedRingSizerEvent(){var e=new Object;e._eventId="provided_exact_location",e.id=$("#customizationId").val(),e.feature="Ring Sizer",e.customizationId=$("#customizationId").val()}function logRequestedRingSizerEvent(){var e=new Object;e._eventId="requested_ring_sizer",e.id=$("#customizationId").val(),e.feature="Ring Sizer",e.customizationId=$("#customizationId").val(),e.otpId=$("#otpId").val()}function logRequestedRingSizePdfSizerEvent(){var e=new Object;e._eventId="requested_ring_size_pdf",e.id=$("#customizationId").val(),e.feature="Ring Sizer",e.customizationId=$("#customizationId").val(),e.otpId=$("#otpId").val()}function ShowOccasionDelivery(e){null!=e&&e?($("#occasion-top-div").show(),$("#occasion-no-div").hide()):($("#occasion-top-div").hide(),$("#occasion-no-div").show()),changeEDDToOccasionDate(
51)}function changeEDDToOccasionDate(){if($("#occasionDeliveryCB").is(":checked")){var e=$("#occasionDateForEDD").val();$("#occasion-top-div #etd .etd-date").text(e),$("#occasion-top-div .occ-edd-box .etd-date").text(e)}else{var t=$("#actualExpectedEDD").val();$("#occasion-top-div #etd .etd-date").text(t),$("#occasion-top-div .occ-edd-box .etd-date").text(t)}}function logViewedCollectionsEvent(){(new Object)._eventId="viewed_collections"}function logInitiatedSolitaireCustomizationEvent(){var e=new Object;e._eventId="initiated_solitaire_customization",e.designId=$("#designId").val(),e.id=$("#customizationId").val()}function logRemovedProductFromCartEvent(e){var t=new Object;t._eventId="removed_product_from_cart",t.feature="Checkout",t.eventValue=e,t.id=$("#customizationId").val()}function logOrderCancelledEvent(e){var t=new Object;t._eventId="order_cancelled",t.cancellationType=e}function setDummyValuesForBillingAddress(){$("#ba_postcode_delivery").val("12345"),$("#ba_fullname").val("name"),$("#ba_address").val("address"),$("#ba_cityName_delivery").val("city"),$("#ba_stateId_delivery").val(1)}var timerID,cCardType="",isFormSuccess=0;function creditDebitCardValidation(e,t){var a="",n="";if(cardPaymentName="MOBILE"!==deviceName?$(t).closest(".payment_detail").find(".payment_module .inner").text()+" Payment":$(t).parents("section").find(".section-title strong").text()+" Payment",null!=e.card_type&&$(t).val().length>0){if(a="card-logo "+e.card_type.name,cCardType=e.card_type.name,"visa"==e.card_type.name||"mastercard"==e.card_type.name||"amex"==e.card_type.name?($(t).parents("#payment-details").find("."+e.card_type.name+"CreditCard").prop("checked","checked"),$(t).parent().find(".card-logo").removeClass("card-supported")):($(t).parents("#payment-details").find(".defaultCreditCard").prop("checked","checked"),$(t).parent().find(".card-logo").removeClass("card-supported")),"amex"==e.card_type.name){n=4,$(t).parents("form").find(".cvv4-error-msg").addClass("cvv-show"),$(t).parents("form").find(".cvv3-error-msg").removeClass("cvv-show"),$(t).parents("form").find(".no-amex").addClass("hidden success"),$(t).parents("form").find(".cvv-amex").removeClass("hidden").addClass("cvvlength-4");var i=$(t).data("voucher");i&&(i=(i=i.replace(/\d+/g,"")).toLowerCase()),i===e.card_type.name&&($(".amex-pay").removeAttr("disabled","disabled").removeClass("btn-disabled"),a="card-logo "+e.card_type.name+" bank-cards-pay")}else n=3,$(t).parents("form").find(".cvv3-error-msg").addClass("cvv-show"),$(t).parents("form").find(".cvv4-error-msg").removeClass("cvv-show"),$(t).parents("form").find(".no-amex").removeClass("hidden").addClass("cvvlength-3"),$(t).parents("form").find(".cvv-amex").addClass("hidden success"),$(".amex-pay").attr("disabled","disabled").addClass("btn-disabled"),$(".card-logo").removeClass("bank-cards-pay");$(t).parents("form").find(".cvv-input").parent().removeClass("cvvlength-3 cvvlength-4").addClass("cvvlength-"+n),"maestro"==e.card_type.name?($(t).closest("form").find(".require-group").addClass("hidden"),$(t).closest("form").find(".require-group .fl-wrap").addClass("success"),$(t).closest("form").find(".optional-group").removeClass("hidden"),$(t).parents("form").find(".cvv-expiry-option").show()):($(t).closest("form").find(".require-group").removeClass("hidden"),$(t).closest("form").find(".optional-group").addClass("hidden"),$(t).parents("form").find(".cvv-expiry-option").hide())}else a="card-logo card-supported",cCardType="",$("#defaultCreditCard").prop("checked","checked"),$(".amex-pay").attr("disabled","disabled").addClass("btn-disabled"),$(".card-logo").removeClass("bank-cards-pay");$(t).parent().find(".card-logo").removeAttr("class").addClass(a),$(t).parents("form").find(".cvv-error").removeClass("cvv-show"),$(t).val().length>0?$(t).blur(function(){e.valid?($(t).parent().find(".card-logo").removeAttr("class").addClass(a),$(t).parent().addClass("valid").removeClass("not-valid"),$(t).parent().find(".card-not-valid").removeClass("card-error-show"),$(t).parents("form").find(".card-logo").hasClass("maestro")&&19==$(t).parents("form").find(".card-number").val().replace(/\s+/g,"").length&&!$(t).parents("form").find(".optional-group").hasClass("hidden")&&"debit card Payment"==cardPaymentName&&($(t).parents("#payment-details").find(".service_provider_radio").prop("checked",!1),$(t).parents("#payment-details").find(".sbiMaestroDebitCard").prop("checked","checked"))):($(t).parent().addClass("not-valid").removeClass("val
51id"),$(t).parent().find(".card-not-valid").addClass("card-error-show"),$(t).parent().find("ul.messages").addClass("hide-it"),$(t).parent().find(".card-logo").removeAttr("class").addClass(a)),0==$(t).val().length&&($(t).parent().find(".card-not-valid").removeClass("card-error-show"),$(t).parent().find(".card-logo").removeAttr("class").addClass("card-logo card-supported"))}):($(t).parent().find(".card-not-valid").removeClass("card-error-show"),$(t).parent().removeClass("not-valid"),$(t).parent().find("ul.messages").removeClass("hide-it")),1==$(t).val().length&&trackGA(cardPaymentName,"Started entering card number")}function creditDebitCardSubmit(e){var t=$(e).find(".card-number").data("voucher");t&&(t=t.replace(/\d+/g,"")),cardPaymentName="MOBILE"!==deviceName?$(e).closest(".payment_detail").find(".payment_module .inner").text()+" Payment":$(e).parents("section").find(".section-title strong").text()+" Payment";var a=$(e).find(".card-logo").attr("class").split(" ")[1],n=$(e).find(".card-number").val().replace(/\s+/g,"").length;trackGA(cardPaymentName,"Clicked Pay Now",a+" "+n),setTimeout(function(){var t=$(e).find("ul.messages li, ul.card-not-valid.card-error-show li, ul.cvv-error.cvv-show li").map(function(){return this.textContent}).get().join("");($(".fl-wrap").hasClass("error")||$(".fl-wrap").hasClass("not-valid"))&&trackGA(cardPaymentName,"Error shown",t)},1e3),1==$(e).find(".require-group").not("hidden").length&&(isFormSuccess=$(e).find(".require-group .success").length),$(".card-number").parent().hasClass("val
51id")&&4==isFormSuccess&&($(e).find(".card-logo").hasClass("visa")?$(e).parents("#payment-details").find(".visaCreditCard").prop("checked","checked"):$(e).find(".card-logo").hasClass("mastercard")?$(e).parents("#payment-details").find(".mastercardCreditCard").prop("checked","checked"):$(e).find(".card-logo").hasClass("amex")?$(e).parents("#payment-details").find(".amexCreditCard").prop("checked","checked"):$(e).find(".card-logo").hasClass("maestro")&&19==$(e).find(".card-number").val().replace(/\s+/g,"").length&&!$(e).find(".optional-group").hasClass("hidden")&&"debit card Payment"==cardPaymentName?($(e).parents("#payment-details").find(".service_provider_radio").prop("checked",!1),$(e).parents("#payment-details").find(".sbiMaestroDebitCard").prop("checked","checked"),trackGA(cardPaymentName,"Clicked Pay Now","State Bank Maestro Card")):$(e).parents("#payment-details").find(".defaultCreditCard").prop("checked","checked"),$(e).find(".cc-dc-pay-now").hasClass("pay-with-bank-voucher")?$(e).find(".card-logo").hasClass("bank-cards-pay")?submitPaymentForm():alert("This is not "+t+" Card"):submitPaymentForm())}function preventPaste(e){e.onpaste=function(e){e.preventDefault()}}function preventAlphaNumeric(e){$(e).bind("keypress",function(e){var t=new RegExp("^[0-9\b]+$"),a=String.fromCharCode(e.charCode?e.charCode:e.which);if(!t.test(a))return e.preventDefault(),!1})}function creditCardNameAttrUpdate(){$("#creditcardSeamless-form").length>0&&$("#creditcardSeamless-form .form-control").each(function(e,t){var a=t.name.split("-")[0];(t.name=a,$("#debitcardSeamless-form").length>0)&&($("#debitcardSeamless-form .form-control")[e].name=a+"-dvalidate")})}function debitCardNameAttrUpdate(){$("#debitcardSeamless-form").length>0&&$("#debitcardSeamless-form .form-control").each(function(e,t){var a=t.name.split("-")[0];(t.name=a,$("#creditcardSeamless-form").length>0)&&($("#creditcardSeamless-form .form-control")[e].name=a+"-cvalidate")})}function createPayRequestFrom(e,t,a){return createPayRequestFormOrPayPalToken(e,t,a,null)}function createPayRequestFormOrPayPalToken(e,t,a,n){$("body").addClass("with-checkout-footer");var i=GLOBAL_CTX+"/paymentrequest/"+e+"/"+t;$.ajax({type:"GET",url:i,dataType:"json",async:!1,cache:!1,success:function(e){try{return e.hasError?handlePaymentRequestFailure(e.data||"Unable to create payment request. Please try again."):($("#paymentFormDiv").html(e.data),a&&"jusPay"!=n?updateDataInPaymentForm():"jusPay"==n?(paymentTransactionInProgress=!1,window.location.replace(e.data)):$("#paymentForm").submit()),!0}catch(e){return handlePaymentRequestFailure("Unable to start payment. Please review the payment details and try again."),!1}},error:function(){handlePaymentRequestFailure("Unable to create payment request. Please try again.")}})}function updateDataInPaymentForm(){if($("html").hasClass("new-cf-ui"))var e=$(".paymentSelectedTab form:first-child").attr("name"),t="";else e=$(".paymentSelectedTab > form").attr("name"),t="";"creditcard"==e?(t=$("#ccCVV").val()||$("#ccCVV2").val(),$("input[name=ccvv]").val(t),$("input[name=ccnum]").val($("#ccNumber").val().replace(/\s/g,"")),$("input[name=ccexpmon]").val($("#ccExpiryMonth").val()),$("input[name=ccexpyr]").val($("#ccExpiryYear").val())):(t=$("#dcCVV").val()||$("#dcCVV2").val(),$("input[name=ccvv]").val(t),$("input[name=ccnum]").val($("#dcNumber").val().replace(/\s/g,"")),$("input[name=ccexpmon]").val($("#dcExpiryMonth").val()),$("input[name=ccexpyr]").val($("#dcExpiryYear").val())),$("#paymentForm").submit(),trackGA(cardPaymentName,"Request sent to payment gateway")}function formFieldAutoFilled(){setTimeout(function(){$("form").hasClass("fl-style")&&$(".fl-style input, .fl-style select, .fl-style textarea").each(function(e,t){""!=$(this).val()&&null!=$(this).val()&&$(t).parent().addClass("auto-filled")})},0)}function formFieldFocus(){$("body").on("focus",".fl-style input, .fl-style select, .fl-style textarea",function(){$(this).parent().addClass("focused")}).on("blur",".fl-style input, .fl-style select, .fl-style textarea",function(){""==$(this).val()&&$(this).parent().removeClass("focused")})}function countDownTimer(e,t,a){return timerID=setInterval(function(){e.text(t),t<=0&&(a(),clearInterval(timerID)),t-=1},1e3)}function get_browser_info(){var e,t=navigator.userAgent,a=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(a[1])?{name:"IE ",version:(e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""}:"Chrome"===a[1]&&null!=(e=t.match(/\bOPR\/(\d+)/))?{name:"Opera",version:e[1]}:(a=a[2]?[a[1],a[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=t.match(/version\/(\d+)/i))&&a.splice(1,1,e[1]),{name:a[0],version:a[1]})}function tahDateFormat(e,t){var a,n,i,o={};return a=(a=parseInt(t.split(/[-" "]/)[0]))<10?a+12:a,n=e.replace(/-/g,"/")+" "+a+":00:00",i=new Date(n),o.fullDate=i,o.dayStringShort=DayAsString(i.getUTCDay()),o.dayString=dayString(i.getUTCDay()),o.month=monthAsString(i.getUTCMonth()),o.day=i.getUTCDate(),o.formattedDay=numberSuffix(i.getUTCDate()),o.isNextDay=isNextDay(i.getUTCDate()),o}function triggerSingIn(){document.querySelector(".showLoginBox").click()}function triggerSingUp(){document.querySelector(".showSignupBox").click()}function formatContactForCL(e){return"+91"+e.substr(e.length-10,10)}function truncate(e,t,a){return null==t&&(t=100),null==a&&(a="..."),e.length>t?e.substring(0,t)+a:e}function validateForm(e){return v2.Form.forms[e].validate()}function validateEmailField(e){var t=e.val(),a=e.parent(),n="",i="",o=!1;return a.find("ul.messages").remove(),""===t?(n="Email is required",a.addClass("error"),a.removeClass("success"),o=!1):(o=validateEmail(t))?(n="",a.removeClass("error").addClass("success"),o=!0):(n="Please enter a valid email address",a.addClass("error")),""!==n&&(i+="<ul class='messages'><li>"+n+"</li></ul>",a.append(i)),o}function ESP(){this.espList=["gmail.com","yahoo.com","rediff.com","hotmail.com"],this.selector=$(".show-esp-list"),this.input="",this.placeholder=""}function videoRandom(e){var t=Math.floor(Math.random()*e.length);$(e.selector+":nth-child("+(t+1)+")").removeClass("hidden"),$(e.selector+":nth-child("+(t+1)+")").trigger("play")}function displayRandomImages(e){var t=Math.floor(Math.random()*e.length);$(e.selector+":nth-child("+(t+1)+")").removeClass("hidden")}function animateBrowsingHistoryIcon(e){var t=document.querySelector(".icon-history");e||(e=5e3),setTimeout(function(){t.classList.add("animate")},e),setTimeout(function(){t.classList.remove("animate")},e+500)}function handleReserveButtonClick(e){$(".reserve-popup-container");
51var t="",a=$(this).data("storename"),n=($(".store-on-load-section .get-nearest-store.active").val(),$("#cust-details .city").text(),checkSessionStorageSupport()),i=(getImageUrl(),document.getElementById("userMobile"));document.querySelector("form#reserve #submit");n&&(t=sessionStorage.getItem("customerPhone")),t?($("form#reserve #userMobile").val(t),handleReserveForm(e)):("MOBILE"!==deviceName?$(".fancybox-popup-reserve").fancybox().trigger("click"):(location.hash="reserve",isIOS&&($("body").removeAttr("style"),$(".reserve-popup-container").addClass("ios")),i.focus()),trackGA("BsUI","Mobile number requested to confirm Reserve")),trackGA("BsUI","Clicked Reserve on product page","VISITOR_"+visitorId+"_DESIGNID_"+productDetails.id+"_STORE_"+a)}function handleReserveMobileInputState(){var e=$(this).parents("form").find(".button-v2");10==this.value.length?e.removeAttr("disabled"):e.attr("disabled","disabled")}function getImageUrl(){var e="",t=!1,a=0;return e="MOBILE"===deviceName?$(".swipe-wrap  .prd-image-wrap"):$(".slide-thumbs .item"),"MOBILE"!==deviceName&&e.length>0&&(t=e[0].classList.contains("video-thumb")),t&&(a=1),"MOBILE"===deviceName?$(e[0]).find("img").attr("src"):$(e[a]).find("a").attr("href")}function handleReserveForm(e){if(e.preventDefault(),!validateForm("reserve"))return!1;var t=$("form#reserve #userMobile").val().replace(/\D/g,"");$("form#reserve #userMobile").val(t);var a=$('form[id="reserve"]').serializeArray(),n=checkSessionStorageSupport();$.ajax({type:"POST",url:GLOBAL_CTX+"/store-reserve/add-product",cache:!1,dataType:"json",data:a,success:function(e){if(e.hasError)return!0;if(n){var t=$("#userMobile").val();sessionStorage.setItem("customerPhone",t)}$(".reserve-popup-container .step-one").removeClass("show"),"MOBILE"!==deviceName?setTimeout(function(){$(".reserve-popup-container .step-two").addClass("show")},400):$(".reserve-popup-container .step-two").addClass("show");var a=$(".product-reserve-cta").data("storename");$(".store-on-load-section .get-nearest-store.active").val(),$("#cust-details .city").text(),getImageUrl();$(".product-reserve-cta").find("strong").html("<span class='pd-reserve-msg'><i class='icon-ion-ios-checkmark'></i>Reserved</span>"),$(".product-reserve-cta").addClass("active"),trackGA("BsUI","Product reserved at store","VISITOR_"+visitorId+"_DESIGNID_"+productDetails.id+"_STORE_"+a)}})}function showAvailableStoreOnPincodeUpdate(e,t){designCode=$("#storeDesignCode").html(),"MOBILE"==deviceName?$(".get-nearest-store, .etd-form-text").val(e):$(".get-nearest-store").val(e)}
51function jtooltipControlsForAjaxFunc(){var e;function hideTooltip(){e=setTimeout(function(){$(".jtooltip-trigger").parent().find(".jtooltip").removeClass("active")},400)}$(".jtooltip-trigger").mouseover(function(t){t.stopPropagation(),$(".jtooltip").removeClass("active"),$(this).parent().find(".jtooltip").addClass("active"),clearTimeout(e)}).mouseout(hideTooltip),$(".jtooltip").mouseover(function(){clearTimeout(e)}).mouseout(hideTooltip)}function storeTooltipData(e,t,a,n,i,o){var r="";return r+='<div class="tooltip-style-4 jtooltip">',r+='<div class="right-section"><div class="inner"><a href="'+e+"\" target=\"_blank\" onclick=\"trackGA( 'BsUI',  'Clicked Get Direction map for store on product page', ' "+t+' \')"><img src="'+a+'" alt="'+n+'" class="img-responsive" /></a>',r+="</div></div>",r+='<div class="left-section"><div class="inner">',r+="<strong>"+n,r+="</strong>",r+="<p>"+i,r+="</p>",r+='<div class="get-dir"><a href="'+e+"\" target=\"_blank\" onclick=\"trackGA( 'BsUI',  'Clicked Get Direction for store on product page', ' "+t+" ')\">Get Direction</a>","MOBILE"==deviceName&&(r+='<a href="tel:'+o+"\" target=\"_blank\" onclick=\"trackGA('BsUI', 'Clicked Get Call store on product page', 'store number "+o+" ')\">Call Store</a>"),r+="</div>",r+="</div></div>",r+="</div>"}function SetCursorAtEnd(e){e.focus();var t=e.val();e.val(""),e.val(t)}function updateGramsCalculation(e){const t=$(".goldRate").text(),a=$(".calculations-goldReserve .calc-amount"),n=$(".calculations-goldReserve .calc-reserved-gold");let i=parseFloat(e)||0,o=(i/t).toFixed(4);sessionStorage.setItem("goldRate",t),sessionStorage.setItem("goldUnits",o),a.text(i.toLocaleString("en-IN")),n.text(o)}function fillHiddenField(e,t){$(t).val($(e).val())}function valueOutput(e,t){var a=$(".total-payment"),n=$(".spl-discount"),i=$(".first-inst-discount"),o=$(".effective-pay"),r=$(".final-amount"),s=$("#amount"),l=$('input[type="range"]'),d=parseInt($("#discountPercent").val()),c=isNaN(e.value)?null:e.value,u=10*c,p=u-c*d/100,m=gmsTotalDiscountInPercentage(c,p);if(!c)return validateForm("gmsForm"),!1;t.value=c,l.val(c),a.text(u.toLocaleString("en-us")),n.text(parseInt(c).toLocaleString("en-us")),i.text(parseInt(c*d/100).toLocaleString("en-us")),o.text(parseInt(p).toLocaleString("en-us")),$(".total-gms-discount").text(m.toLocaleString("en-IN")+"%"),s.val(parseInt(c)),s.parent().hasClass("error")&&(s.parent().removeClass("error"),s.parent().find("ul.messages").remove()),s.parent().addClass("auto-filled"),r.text((parseInt(u)+parseInt(c)).toLocaleString("en-us")),fiftyPercentDiscount(),flexiDiscountAmount()}function handleInputRangeBg(e){var t;t="goldmine"==PAGE_TYPE?"#f5c2cb":t="#F3B23E";var a=($(e).val()-$(e).attr("min"))/($(e).attr("max")-$(e).attr("min"));$(e).css("background-image","-webkit-gradient(linear, left top, right top, color-stop("+a+","+t+" ), color-stop("+a+", #c8c8c8))")}function initChart(){var e=document.getElementById("gms-chart").getContext("2d");GMSPieChart=new Chart(e,{type:"pie",data:{datasets:[{data:[15,85],backgroundColor:["#3AAE23","#f5c2cb"],borderColor:["#3AAE23","#f5c2cb"]}]},options:{animation:{animateRotate:!0,onComplete:function(){$(".gms-diagram").addClass("show-price")}},events:[]}})}function loadScriptAsync(e,t){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=e,document.body.appendChild(a),a.onload=function(){t&&t()}}function handleGMAmountChange(){var e=document.querySelector("#gms_calc"),t=document.querySelector("input[type='range']");valueOutput(this,e),handleInputRangeBg(t)}function handleGMAmountPrefillFromPDflow(e){var t=document.querySelector("#gms_calc"),a=document.querySelector("input[type='range']");t.value=e,valueOutput(t,a),handleInputRangeBg(a)}function redirectUrlToPage(e,t){t&&(window.location=t)}$(document).ready(function(){if($("#creditcardSeamless-form .form-control, #debit
51cardSeamless-form .form-control").each(function(){$(this).parent().hasClass("success")||$(this).val("")}),$("#creditcardSeamless-content").hasClass("cc-dc-code")||$("#debitcardSeamless-content").hasClass("cc-dc-code")){var e="";$("#ccNumber").length>0&&($("#ccNumber").validateCreditCard(function(e){creditDebitCardValidation(e,$(this))}),$("#ccNumber").blur(function(e){$(this).validateCreditCard(function(e){creditDebitCardValidation(e,$(this))});var t=$(e.target).data("voucherapplied"),a=$(e.target).data("voucher");if(t){var n=e.target.value.replace(/\s/g,"").substring(0,6);""!==n&&binCheck(n,a,$(this))}})),$("#dcNumber").length>0&&($("#dcNumber").validateCreditCard(function(e){creditDebitCardValidation(e,$(this))}),$("#dcNumber").blur(function(e){$(this).validateCreditCard(function(e){creditDebitCardValidation(e,$(this))});var t=$(e.target).data("voucherapplied"),a=$(e.target).data("voucher");if(t){var n=e.target.value.replace(/\s/g,"").substring(0,6);""!==n&&binCheck(n,a,$(this))}})),window.onload=function(){var e=document.getElementById("ccNumber");e&&(cardNumberFormat(e),preventPaste(e));var t=document.getElementById("dcNumber");t&&(cardNumberFormat(t),preventPaste(t));var a=document.getElementById("ccCVV");a&&(preventPaste(a),preventAlphaNumeric(a));var n=document.getElementById("ccCVV2");n&&(preventPaste(n),preventAlphaNumeric(n));var i=document.getElementById("dcCVV");i&&(preventPaste(i),preventAlphaNumeric(i));var o=document.getElementById("dcCVV2");o&&(preventPaste(o),preventAlphaNumeric(o))},$(".optional-group .form-control, .require-group .form-control").blur(function(){$(this).val().length>0?$(this).each(function(e,t){$(t).parent().addClass("success")}):$(this).parent().removeClass("success")}),$("#creditcardSeamless-form").submit(function(){creditDebitCardSubmit($(this))}),$("#debitcardSeamless-form").submit(function(){creditDebitCardSubmit($(this))}),$(".fl-wrap input, .fl-wrap select").each(function(t,a){$(a).blur(function(){setTimeout(function(){if(e="MOBILE"!==deviceName?$(a).closest(".payment_detail").find(".payment_module .inner").text()+" Payment":$(a).parents("section").find(".section-title strong").text()+" Payment",""!=$(a).val()&&($(a).parent().hasClass("error")||$(a).parent().hasClass("not-valid"))){var t=$(a).parents("form").find("ul.messages li, ul.card-not-valid.card-error-show li, ul.cvv-error.cvv-show").map(function(){return this.textContent}).get().join("");trackGA(e,"Error shown",t)}},1e3)})})}}),cardNumberFormat=function(e){var format_and_pos=function(t,a){var n=0,i=0,o=0,r=e.value;!1!==t&&(n=e.selectionStart,i=e.selectionEnd,a&&n>0&&" "==r[--n]&&n--,r=r.substring(0,n)+t+r.substring(i),o=n+t.length);var s=0,l=0,d="";switch(cCardType){case"amex":groups=[4,6,5];break;case"diners_club_carte_blanche":case"diners_club_international":groups=[4,6,4];break;case"maestro":default:groups=[4,4,4,4,3];break;case"visa":groups=[4,4,4,4]}for(var c=0;c<r.length&&(/\D/.test(r[c])?n>c&&o--:(s===groups[l]&&(d+=" ",s=0,l++,n>=c&&o++),d+=r[c],s++),s!==groups[l]||groups.length!==l+1);c++);e.value=d,!1!==t&&e.setSelectionRange(o,o)};e.addEventListener("keypress",function(e){var t=e.charCode||e.keyCode||e.which;if(9!==t&&(t<37||t>40)&&(!e.ctrlKey||99!==t&&118!==t)){e.preventDefault();var a=String.fromCharCode(t);if(/\D/.test(a)||this.selectionStart===this.selectionEnd&&this.value.replace(/\D/g,"").length>=(/^\D*3[47]/.test(this.value)?15:19))return!1;format_and_pos(a)}}),e.addEventListener("keydown",function(e){8!==e.keyCode&&46!==e.keyCode||(e.preventDefault(),format_and_pos("",this.selectionStart===this.selectionEnd))}),e.addEventListener("paste",function(){setTimeout(function(){format_and_pos("")},50)})},ESP.prototype.sortESPList=function(e,t){for(var a=[],n=0;n<e.length;n++)-1!==e[n].indexOf(t)&&a.push(e[n]);return a},ESP.prototype.renderESPList=function(e){e.preventDefault();var t=$(e.target);this.input=t.val();var a,n=this.input.split("@"),i=n[1],o="",r=t.parent();if(-1!==this.input.indexOf("@")){a=this.sortESPList(this.espList,i);for(var s=0;s<a.length;s++)o+="<a href='javascript:void(0)' class='options'>"+n[0]+"@"+a[s].toLowerCase()+"</a>";r.find(".esp-wrapper").remove(),r.append("<div class='esp-wrapper'><div class='email-providers'>"+o+"</div></div>"),r.find("a.options").on("click",this.updateEmailField.bind(this))}
51else r.find(".esp-wrapper").remove()},ESP.prototype.updateEmailField=function(e){e.preventDefault();var t=e.target.textContent,a=$(e.target).parents(".esp-wrapper").parent();a.find("input").val(t),validateEmailField(a.parents("form").find("input")),a.find(".esp-wrapper").remove(),trackGA("BsUI","email options clicked",t)},ESP.prototype.hideList=function(e){e.preventDefault();var t=$(e.target);validateEmailField(t)&&setTimeout(function(){t.parent().find(".esp-wrapper").remove()},500)},ESP.prototype.init=function(){this.selector.on("input",this.renderESPList.bind(this)),this.selector.on("blur",this.hideList.bind(this))},$(document).ready(function(){function isOnScreen(e){if("block"==e.css("display")){var t=$(window),a={top:t.scrollTop(),left:t.scrollLeft()};a.right=a.left+t.width(),a.bottom=a.top+t.height();var n=e.offset();return n.bottom=n.top+e.height(),!(a.bottom<n.top||a.top>n.bottom)}}(new ESP).init();var e=[];$(window).scroll(function(){if("product"==PAGE_TYPE){var t="MOBILE"==deviceName?$("#price-breakup"):$("#section-price-breakup"),a=$("#designId").val(),n="MOBILE"==deviceName?"block"==t.css("display"):t.is(":visible"),i="MOBILE"==deviceName?isOnScreen(t.find("#taxes_b")):t.find("tr:last-child td.title").is(":in-viewport");n&&i&&-1==e.indexOf("viewed all")&&(trackGA("BsUI","Viewed all product details",a),e.push("viewed all"));var o=$("#section-item-details");("MOBILE"==deviceName?isOnScreen(o.find("h2.title")):o.find("h2.title").is(":in-viewport"))&&-1==e.indexOf("viewed tbl")&&(trackGA("BsUI","Viewed product details table",a),e.push("viewed tbl"))}"browse"!=PAGE_TYPE&&"store-catalog"!=PAGE_TYPE||("MOBILE"==deviceName?isOnScreen($("#product_list_ui li:nth-child(2) .content .price")):$(".sticky-filter-wrapper").hasClass("active"))&&-1==e.indexOf("page scrolled")&&(trackGA("BsUI","Started Scrolling down on browse page",location.href),e.push("page scrolled"));"collections"==PAGE_TYPE&&$(window).scrollTop()>100&&(isPageScrolled=!0)}),"collections"==PAGE_TYPE&&(void 0!==getURLparams.ref&&"home"===getURLparams.ref?($(window).scrollTop($("#scroll-to").offset().top-50),$(".latest-collections").addClass("show"),history.replaceState(void 0,void 0,location.href.split("?")[0])):$(".latest-collections").addClass("show")),displayRandomImages($("li.valentine-wdg a"))}),$(document).ready(function(){if(showBanner=$("#showStoreBanner").html(),"browse"==PAGE_TYPE&&"true"===showBanner){var e=$(".bp-store-text").text(),t=$(".bp-store-location").text();$(".store-city-name").text();trackGA("Trust Elements on Browse Page","Shown Store Card","TITLE "+e+" DESCRIPTION "+t)}if("product"==PAGE_TYPE){window.storePincodeType=null,$(".store-on-load-section").data("guessedpin")?window.storePincodeType="Predicted":window.storePincodeType="User Specified",$("body").click(function(e){var t;"MOBILE"==deviceName&&(e.target.classList.contains("input-scroll")&&(t=0!=$(e.target).closest(".scroll-target").length?$(e.target).closest(".scroll-target").offset().top-$("header").height():$(e.target).offset().top-$("header").height()-15,window.scroll({top:t,left:0,behavior:"smooth"})));if($(e.target).closest(".find-nearest-store").length){var a=$(".store-on-load-section .get-nearest-store");"getNearestStore"!==e.target.id&&a.length&&"pin-btn fns-btn"!==e.target.className&&a.focus().setCursorPosition(6),$(e.target).closest(".find-nearest-store").addClass("focused"),"pin-btn fns-btn"==e.target.className&&$(e.target).closest(".find-nearest-store").removeClass("focused")}else{if($(".find-nearest-store").removeClass("focused"),"MOBILE"!=deviceName){var n=$(".store-delivery .delivery-pincode").text();$(".store-on-load-section .get-nearest-store").val(n)}$(".invalid-pin-error").html("")}}),$(".fns-btn").click(function(e){var t=$(".get-nearest-store").val();if(""==t)return $(".invalid-pin-error").html("Pincode is required!"),$(".store-section,.store-delivery,.early-delivery-note").addClass("hidden"),!1;$(".invalid-pin-error").html("");var a=$("#select-gold .color-val").html()||window.metalColor,n=$('input[type="radio"][name="metalPurity-'+a+'"]:checked').val()||window.metalPurity,i=$("#caratselect").val()||window.solitaireCarat||"",o=$(".select-size.clarity-wrapper #clarityselect").val()||window.solitaireClarity||"",r=$(".select-size.color-wrapper #colorselect").val()||window.solitaireColor||"",s=getCustomizationCombinationKey(a,n,diamondColorClarity,i,o,r),l=$("#customizationId").val();if(fetchAllCustomizationAndEDD(t,designId,s,!1),window.pinErr)$(".store-section,.store-delivery,.early-delivery-note").addClass("hidden");else{if("true"==isSizeableProduct){var d=getProductSizesAndEDD(s);$("#sizeDropdown").html(d.htmlData)}fetchStoreDetails(t,l),fetchAllStoresDetails(t),fetchStoreAndTahHub(t),facebookDeliveryAvailabilityChecked(),$(".store-delivery,.early-delivery-note").removeClass("hidden")}}),"MOBILE"!==deviceName&&(0!==$(".store-on-load-section").length&&(window.pageYOffset>$(".store-on-load-section").offset().top-$(".jtooltip").height()&&$(".store-on-load-section .store-available").addClass("btm-tooltip"),$(window).scroll(function(){window.pageYOffset>$(".store-on-load-section").offset().top-$(".jtooltip").height()?$(".store-on-load-section .store-available").addClass("btm-tooltip"):$(".store-on-load-section .store-available").removeClass("btm-tooltip")})),0!==$(".store-for-pincode-section").length&&(window.pageYOffset>$(".store-for-pincode-section").offset().top-$(".jtooltip").height()&&$(".store-for-pincode-section .store-available").addClass("btm-tooltip"),$(window).scroll(function(){window.pageYOffset>$(".store-for-pincode-section").offset().top-$(".jtooltip").height()?$(".store-for-pincode-section .store-available").addClass("btm-tooltip"):$(".store-for-pincode-section .store-available").removeClass("btm-tooltip")})));e=null;var a,n,i="MOBILE"==deviceName?$(".storeDetails").length>0:$("#storeDetails").length>0,o=$("#orderInventory").val(),r=$(".store-delivery strong").text();a=$(".store-on-load-section .get-nearest-store.active").val(),n=$("#cust-details .city").text(),e=" ",i&&"store inventory"==o&&($(".store-on-load-section .store-msg").text(),e=$(".store-on-load-section .msg-part-1").text()),$(".store-on-load-section").attr("data-pincode",a),$(".store-on-load-section").attr("data-pincodecity",n),$(".store-on-load-section").attr("data-storemsg",e),$(".store-on-load-section").attr("data-pincodetype",window.storePincodeType),$(".store-on-load-section").attr("data-edd",r),isDeliveryByTomorrow(r)&&trackGA("BsUI","Informed user about delivery by tomorrow on product page","DesignId "+productDetails.id),i&&trackGA("BsUI","Informed user about design availability at store on product page","DesignId "+productDetails.id+" EDD "+r)}$("body").on("click",".product-reserve-cta",handleReserveButtonClick),$(".reserve-popup-container form").on("submit",handleReserveForm)}),$.fn.setCursorPosition=function(e){return this.each(function(t,a){if("number"==typeof a.selectionStart)a.setSelectionRange(e,e);else if(void 0!==a.createTextRange){var n=a.createTextRange();n.collapse(!0),n.moveEnd("character",e),n.moveStart("character",e),n.select()}}),this},$(document).ready(function(){if($(".faq-wrapper .faq-content .title").click(function(){$(this).parents(".faq-content").siblings().removeClass("active"),$(this).parents(".faq-content").toggleClass("active"),$(this).parents(".faq-content").hasClass("left-icon")||($(this).parents(".faq-content").siblings().find(".title i").removeClass("icon-minus").addClass("icon-plus"),$(this).parents(".faq-content").hasClass("active")?$(this).parents(".faq-content").find("i").removeClass("icon-plus").addClass("icon-minus"):$(this).parents(".faq-content").find("i").removeClass("icon-minus").addClass("icon-plus"))}
51),"goldmine"===PAGE_TYPE||"goldmineapp"===PAGE_TYPE||"goldreserve"===PAGE_TYPE){var e=$(document),t="[data-rangeslider]",a=($(t),document,$(".total-payment"),$(".spl-discount"),$("#final-amount"),document.querySelector("#gms_calc")),n=!1,i=$("#amount");if(valueOutput(document.getElementById("gms_calc"),a),e.on("input",'input[type="range"], '+t,function(e){valueOutput(e.target,a),handleInputRangeBg(this),updateGramsCalculation($(this).val())}),handleInputRangeBg($('input[type="range"]')),getURLparams&&getURLparams.installment||""!==i.val())handleGMAmountPrefillFromPDflow(parseInt(getURLparams.installment)||parseInt(i.val().replace(/\D/g,"")));e.on("change","#gms_calc, #amount",function(e){$inputRange=$(t);var n=$(this).val(),i=this;updateGramsCalculation(n),setTimeout(function(){$(i).parent().hasClass("error")||($inputRange.val(n),valueOutput(i,a),handleInputRangeBg($inputRange))},0)}),e.on("change","#gmsForm #amount",handleGMAmountChange),e.on("change","#goldmineForm #amount",handleGMAmountChange),updateGramsCalculation($(a).val())}$(window).on("scroll",function(){"goldmine"===PAGE_TYPE&&($(".goldmine-calc").is(":in-viewport")&&!n&&(initChart(),n=!0))}),$(".nav-goldmine-link").click(function(){trackGA("GMS","GMS Website Header","NavBar Header")}),$("#contactNumber, #user-mobile").blur(function(){""==$("#contactNumberGhost").data("prefilled")&&fillHiddenField($(this),"#contactNumberGhost")})}),$(window).bind("load",function(){"goldmine"===PAGE_TYPE&&("MOBILE"!=deviceName&&loadScriptAsync("https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js",function(){$(".goldmine-calc").is(":in-viewport")&&initChart()}));"MOBILE"===deviceName&&(isIOS&&"product"===PAGE_TYPE&&loadScriptAsync("https://labs.ft.com/fastclick/lib/fastclick.js",function(){"addEventListener"in document&&FastClick.attach(document.body)}));"personalDetailFlow"==execution_step&&""==$("#contactNumberGhost").data("prefilled")&&fillHiddenField("#contactNumber, #user-mobile","#contactNumberGhost")});var isbpgmsShown=!1,isShown=!1,isbpShown=!1;function startCounter(e,t,a){var n=e/(60*t),i=0;!function updateCounter(){i+=n,a.textContent=Math.floor(i),i<e&&requestAnimationFrame(updateCounter)}()}function getTotalExchangedGold(){var e=0;return $.ajax({type:"GET",url:GLOBAL_CTX+"/old-gold/total-weight/",async:!1,cache:!1,dataType:"json",success:function(t){t.hasError||(e=t.totalWeight)}}),Math.floor(e)}function preventGMSFormMultiSubmission(e){var t=$(e).parents("form").attr("id");Boolean(getCookie("bsApp"));validateForm(t)&&(setTimeout(function(){e.disabled=!0},10),setTimeout(function(){e.disabled=!1},5e3),"goldreserve"===PAGE_TYPE?trackGA("GRP","Clicked GRP Start Now","GRP Start Now - Button Click"):trackGA("GMS","Clicked GMS Start Now","GMS Start Now - Button Click"))}function checkValidAccountDetailsForGMS(e,t){e&&e.preventDefault();const a=t.closest("form");if(!validateForm(a.id))return;const n=a.elements.phone;clearValidationError(n),$.ajax({type:"GET",url:GLOBAL_CTX+"/check-multiple-accounts-for-phone",data:{phone:n.value,email:EMAIL},cache:!1,async:!0,success:function(e){if(e.hasError)addValidationError(n,e.message||"Invalid phone number");else{clearValidationError(n),preventGMSFormMultiSubmission(t);const e=a.querySelector('[type="submit"]');e.id="gms_submit_id",a.submit(),e.id="submit"}},error:function(e,t,a){addValidationError(n,"Error while checking phone number")}})}function clearValidationError(e){e.parentElement.classList.remove("focused","error");const t=document.getElementById(e.id+"_error");t&&t.remove()}function addValidationError(e,t){const a=e.parentElement;a.classList.remove("success"),a.classList.add("focused","error");const n=document.createElement("ul");n.id=e.id+"_error",n.className="messages",n.innerHTML="<li>"+t+"</li>",a.appendChild(n)}function checkSessionStorageSupport(){var e="test";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}}function fiftyPercentDiscount(){var e=$("#goldMineDiscount").val(),t=parseInt($("#minimumAmount").val()),a=parseInt($("#discountPercent").val());if(null!=e&&"null"!=e&&""!=e&&0!==a){var n=parseInt($(".gms-form-wrap #amount").val()),i="<span class='WebRupee'>Rs. </span>"+parseInt(n-n*(a/100));n>0&&($("#amount").parent().hasClass("error")?$(".tooltip-gms").addClass("hidden"):(null!=t&&"null"!=t&&""!=t&&n<t?$(".discount-validation").html("Discount not applicable!"):($(".discount-validation").html("You will pay<br/> only <span class='discount-amount' id='discountAmount'>"+(100-a)+"%</span>"),$(".discount-amount").html(i)),$(".tooltip-gms").removeClass("hidden")))}}function fiftyPercentDiscountHide(){$(".tooltip-gms").addClass("hidden")}
51function flexiDiscountAmount(){var e=$("#gms_calc").val(),t=5*e,a=.25*e,n=t+a,i=7*e,o=.5*e,r=i+o;$(".slider-box .redeem-payment .total-payment").text(t.toLocaleString("en-us")),$(".slider-box .redeem-payment .spl-discount").text(a.toLocaleString("en-us")),$(".slider-box .redeem-payment .final-amount").text(n.toLocaleString("en-us")),$(".slider-box.eighth .redeem-payment .total-payment").text(i.toLocaleString("en-us")),$(".slider-box.eighth .redeem-payment .spl-discount").text(o.toLocaleString("en-us")),$(".slider-box.eighth .redeem-payment .final-amount").text(r.toLocaleString("en-us"))}function getQueryString(e,t){return"updateCustomer=true&attributeName="+e+"&attributeValue="+encodeURI(t)}function toggleButton(e,t){var a=e+" #toggleButton";return $(a).prop("checked")?$(a).prop("checked",!1):$(a).prop("checked",!0),changeOfferSubscription(e,t)}function changeOfferSubscription(e,t){var a=$(e+" #toggleButton").prop("checked");$.ajax({type:"POST",url:GLOBAL_CTX+"/account/identity",async:!1,cache:!1,dataType:"json",data:getQueryString(t,a),success:function(t){if(!t.hasError){var n=e+" #subscribe-content";return!0===a?($(n+" .success").show(),$(n+" .error").hide()):($(n+" .success").hide(),$(n+" .error").show()),!0}}})}function validateAndUpdatePassword(){validateForm("address-password-form")&&updatePassword()}
51function updatePassword(){var e=$("#old_passwd").val(),t=$("#passwd").val(),a=$("#confirmation").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/account/identity/",async:!1,cache:!1,dataType:"json",data:"updateCustomer=true&attributeName=password&oldPassword="+encodeURI(e)+"&attributeValue="+encodeURI(t)+"&confirmPassword="+encodeURI(a),success:function(e){return"MOBILE"==deviceName?e.hasError?($("#password-update-message .card-inner").html("Error : "+e.errors.join("<br />")),$("#password-update-message .card-inner").removeClass("success"),$("#password-update-message .card-inner").addClass("error"),$("#password-update-message").show(),!1):($("#password-update-message .card-inner").html("<span class='icon icon-ion-ios-checkmark'></span></span> Your Password updated Succesfully"),$("#password-update-message .card-inner").removeClass("error"),$("#password-update-message .card-inner").addClass("success"),$("#password-update-message").show(),$("#old_passwd").val(""),$("#passwd").val(""),$("#confirmation").val(""),setTimeout(function(){handleBrowseBack(),$("#password-update-message").hide()},2e3),!0):e.hasError?($("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.errors.join("<br />")+"</div><div>"),$("#popup-messages").show(),!1):($("#popup-messages").html('<div class="success-container"><div class="success-container-inner">'+e.success+"</div><div>"),$("#popup-messages").show(),$("#change-password").hide(),$("#changePasswd").show(),!0)}})}function validateAndSubmitAddress(){"MOBILE"!=deviceName?($("#address-form").validationEngine(),$("#address-form").validationEngine("validate")&&updateAddress()):validateForm("address-form")&&updateAddress()}
51function updateAddress(){var e=$("#fullname_delivery").val(),t="fullname="+encodeURIComponent(e)+"&",a=$("#id_address_delivery").val(),n=$("#address_delivery").val(),i=$("#street").val(),o=$("#locality").val(),r=$("#landmark").val(),s=$("#cityName_delivery").val(),l=$("#stateId_delivery").val(),d=$("#addressStateName").val(),c=($("#countryName").val(),$("#contactNumber_delivery").val()),u=$("#alternateContactNumber_delivery").val(),p=$("#postcode_delivery").val(),m=$("#address-update-message .card-inner");0==a.length&&(a=0),t+="address="+encodeURIComponent(n)+"&",t+="street="+encodeURIComponent(i)+"&",t+="locality="+encodeURIComponent(o)+"&",t+="landmark="+encodeURIComponent(r)+"&",t+="cityName="+encodeURIComponent(s)+"&",t+="stateId="+encodeURIComponent(l)+"&",t+="countryId="+encodeURIComponent(101)+"&",t+="contactNumber="+encodeURIComponent(c)+"&",t+="alternateContactNumber="+encodeURIComponent(u)+"&",t+="postCode="+encodeURIComponent(p)+"&",t+="token="+encodeURIComponent($("#token").val())+"&",t=(t+="createdAt="+encodeURIComponent($("#createdAt").val())+"&").substr(0,t.length-1),$.ajax({type:"POST",url:GLOBAL_CTX+"/address/saveAddress",async:!1,cache:!1,dataType:"json",data:"alias=shipping&"+t,success:function(t){if(t.hasError)if("MOBILE"==deviceName)m.html("Error : "+t.errors),m.removeClass("success"),m.addClass("error"),m=!1;else{var a="";for(error in t.errors)"indexOf"!=error&&(a+="<li>"+t.errors[error]+"</li>");var l='<div class="error-container-inner"><ol>'+(a+="</div></ol>");$("#opc_account_errors").html('<div class="error-container">'+l+"</div>").slideDown("slow"),m=!1}else"MOBILE"==deviceName?($("#addressName").html(e),$("#addressDetails").html(n+" "+i+"<br />"+o+" "+r+"<br />"+s+","),$("#pincodeDetails").html("India - "+p),$("#contactNumber").html(c),$("#altNumber").html(u),$("#stateName").html(d),$("#addressStateName").val(d),m.html('<span class="icon icon-ion-ios-checkmark"></span> Your details updated Succesfully'),m.removeClass("error"),m.addClass("success"),$("#address-update-message").show(),setTimeout(function(){handleBrowseBack(),$("#address-update-message").hide()},1e3)):($("input#opc_id_address_delivery").val(t.id_address_delivery),$("input#opc_id_address_invoice").val(t.id_address_invoice))},error:function(e,t,a){alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: "+e+"\nText status: "+t)}})}function checkDeliverByStore(){var e=$("#postcode_delivery").val(),t=$("#s-cartId").html();GLOBAL_CTX;$.ajax({type:"POST",url:GLOBAL_CTX+"/cart/validateCartForStoreOrder",async:!0,cache:!1,dataType:"json",data:"cartId="+t+"&pincode="+e,success:function(){}})}function getPaymentMethod(e){var t="";switch(e){case"creditcard":t="Credit Card";break;case"debitcard":t="Debit Card";break;case"netbanking":t="Net Banking";break;case"cashondelivery":t="Cash";break;default:t=""}return t}function initiatedPaymentEvent(){var e=$("section.open .content form").attr("name");if("goldMine"==cartType&&isAppWebView){gmsDiscountAmount.replace(/\D/g,"").trim(),getPaymentMethod(e);var t=$(".amount-deducted .text-right"),a=$("#discountCodeClv").val();gmsSubscriptionAmount=parseInt(gmsSubscriptionAmount);t.length>0&&t.text().replace(/\D/g,"").trim(),parseFloat(gmsSubscriptionAmount);var n={};n.value=parseFloat(gmsSubscriptionAmount),n.coupon=a,AppEvent.firebase("goldmine_payment_initiated",n)}}function ordinalSuffixOf(e){var t=e%10,a=e%100;return 1==t&&11!=a?e+"st":2==t&&12!=a?e+"nd":3==t&&13!=a?e+"rd":e+"th"}function getGMSDetailsForNonLoggedInUser(e){$.ajax({type:"GET",url:GLOBAL_CTX+"gmsp/getGmsDueInstalmentDetails",dataType:"json",data:"gmsId="+e,success:function(t){if(t.hasError)$(".plan-not-available").removeClass("hidden"),$(".gms-plan-id-details").addClass("hidden"),$(".gmsID").html(e);else{var a,n="";$(".gms-plan-id-details").removeClass("hidden"),$(".plan-not-available").addClass("hidden"),$(".gmsID").html(t.gmsCode);for(var i=0;i<t.existingDataList.length;i++){a=ordinalSuffixOf(t.existingDataList[i].installment);var o="",r="",s="hidden",l="";if(0!=i&&(o="btn-disabled",r="disabled"),0===i&&(l+='<form id="gmsFormNonLoggedIn" class="gmsFormNonLoggedIn" method="post" class="fl-style validate" action="'+GLOBAL_CTX+'/goldm
51ineOrder">                                     <input type="hidden" id="installmentAmount" name="amount" id="gmsInstallmentAmount" value="'+t.existingDataList[i].amount+'" />                                     <input type="hidden" name="cartType" value="goldMine">                                     <input type="hidden" name="months" value="11">                                     <input type="hidden" name="email" id="gmsCustomerEmail" value="'+t.existingDataList[i].email+'">                                     <input type="hidden" name="goldMinePlanPaymentCode" id="gmsPaymentCode" value="'+t.gmsCode+'">                                     <input type="hidden" name="goldMineInstallmentCode" id="gmsInstallmentCode" value="'+t.existingDataList[i].installmentCode+'">                                     <input type="hidden" name="goldMineInstallmentNumber" id="gmsInstallmentNum" value="'+t.existingDataList[i].installment+'">                                     <input type="hidden" name="paymentSource" value="GMS Landing">'),l+='<input type="submit" id="pay_now" name="pay_now" value="Pay Now" class="'+("MOBILE"===deviceName?"button-v2 btn-pay ":"btn pay-now ")+o+'" '+r+" />",0===i&&(l+="</form>"),"MOBILE"==deviceName)t.existingDataList[i].isOverDue&&(s=""),n+='<div class="card">                                         <div class="card-inner">                                             <div class="plan-details">                                                 <div class="item-row">                                                     <div class="installment-amount">                                                         <span class="text-class">Upcoming Installment: </span>                                                         <span class="text-value price" id="amountDue"><span class="WebRupee">Rs </span>&nbsp;'+parseInt(t.existingDataList[i].amount).toLocaleString("en-in")+'</span>                                                     </div>                                                     <div class="installment-date">                                                         <span class="text-class">Due On: </span>                                                         <span class="text-value">                                                             <span id="dueDate">'+t.existingDataList[i].dueDate+'</span><span class="ribbon-new '+s+'">Overdue</span>                                                         </span>                                                     </div>                                                     <div class="scheme-num">                                                         <span class="text-class">Installment:</span>                                                         <span class="text-value"><span id="installmentNum">'+a+'</span></span>                                                     </div>                                                     <div class="row form-submit-wrapper">',n+=l,n+='</div>                                                 </div>                                                 <i class="clear"></i>                                             </div>                                         </div>                                     </div>                                     <div class="spacer"></div>';else{var d=t.existingDataList[i].isOverDue?'<span class="ribbon-new">Overdue</span>':t.existingDataList[i].status;n+='<tr>                                     <td id="installmentNum">'+a+'</td>                                     <td id="dueDate">'+t.existingDataList[i].dueDate+'</td>                                     <td id="paymentStatus" class="payment-status">'+d+'</td>                                     <td id="amountDue"><span class="WebRupee">Rs </span>&nbsp;'+parseInt(t.existingDataList[i].amount).toLocaleString("en-in")+"</td>                                     <td>",n+=l,n+="</td ></tr >"}}document.getElementById("gmsPopupTable").innerHTML="",document.getElementById("gmsPopupTable").insertAdjacentHTML("afterbegin",n)}}})}function resetForm(e){document.getElementById(e).reset()}function removeProduct(e,t){$(e).hasClass("free-gift-cart")||$(e).parents(".bag-item").addClass("removing"),logRemovedProductFromCartEvent(t)}function confirmWalletOrder(e){$(e).addClass("loading")}function binCheck(e,t,a){t=t.replace(/\d+/g,""),$(".bank-voucher-info").removeClass("pulse animated");var n=a.parents(".fl-wrap").find(".card-logo").hasClass("visa");$.ajax({type:"GET",url:GLOBAL_CTX+"/bcs/"+e,dataType:"json",success:function(e){if("VISA"===t&&n)return $(".pay-with-bank-voucher").removeAttr("disabled","disabled").removeClass("btn-disabled"),void $(a).next().addClass("bank-cards-pay");e.hasError?$(".bank-voucher-info").addClass("pulse animated"):e.bankName===t?($(".pay-with-bank-voucher").removeAttr("disabled","disabled").removeClass("btn-disabled"),$(".card-logo").addClass("bank-cards-pay")):($(".pay-with-bank-voucher").attr("disabled","disabled").addClass("btn-disabled"),$(".card-logo").removeClass("bank-cards-pay"),$(".bank-voucher-info").addClass("pulse animated"))},error:function(e){}})}function getDeliveryInfoFromCustomization(e,t,a,n){$.ajax({type:"GET",url:GLOBAL_CTX+"/deliverydate/customization/get",async:!1,cache:!1,dataType:"json",data:"pincode="+e+"&customizationId="+t,success:function(e){a(e)},error:function(e){n(e)}})}function getDeliveryInfoFromSKU(e,t,a,n){$.ajax({type:"GET",url:GLOBAL_CTX+"/deliverydate/skuCodesWithSize/get",async:!1,cache:!1,dataType:"json",data:"pincode="+e+"&skuCodesWithSize="+t+"&isBundleTogether="+isBundleTogether,success:function(e){a(e)},error:function(e){n(e)}})}function getSizeInfo(e,t,a){$.ajax({type:"GET",url:GLOBAL_CTX+"/design/getSizeBasedPricing/"+e+"?ajax=false",async:!1,cache:!1,dataType:"json",data:"&customizationId="+e,success:function(e){weightAndPriceDetails=e,t(e)},error:function(e){a(e)}})}function getEDDOnShipping(e,t,a){var n=$("#SkuCodes").val(),i=[];getDeliveryInfoFromSKU(t,n,function(e){e.map(function(e){i.push(Object.values(e.designEddDetails)[0])});var n=getEDDWidgetHTML(i,a);$("#eddWidget").html(n),$("#snackbarwrapper").html(toastUI("The delivery date has been updated.")),setTimeout(function(){$("#snackbar").removeClass("show")},3e3),$("#pincodeWidget").html('Delivering to <strong id="currentPincode">'+t+'</strong> <span class="change-pin">Change pincode</span>'),$("#postcode_delivery").val(t),$("#postcode_delivery").parents(".fl-wrap").addClass("auto-filled")},function(t){$(".messages").remove(),$(e.target).parent().addClass("error").append('<ul id="postcode_delivery_error" class="messages"><li>Enter a valid pincode</li></ul>')})}function fetchAllCustomizationAndEDD(e,t,a,n){$(".store-available").addClass("loading"),$.ajax({type:"GET",url:GLOBAL_CTX+"/deliverydate/design/get",async:!1,dataType:"json",data:"pincode="+e+"&designId="+t,success:function(i){if(i.error)window.pinErr=!0,$(".invali
51d-pin-error").html(i.error.errorMessage),$(".store-section,.store-delivery,.early-delivery-note").addClass("hidden"),setTimeout(function(){$(".store-available").removeClass("loading")},0);else{window.eddResponse=i.designEddDetails,window.pinErr=!1,e&&(isGPin=!1);var o="";if(""!==e&&$(".fns-btn").text("Change").css("pointer-events","none"),i.designEddDetails[a].skuCodeMap[sizeKey].deliveryDateInfo&&(o=i.designEddDetails[a].skuCodeMap[sizeKey].deliveryDateInfo.expectedDeliveryDate),window.expectedDateOfDelivery=o,o){var r=eddDateFormat(o),s=""!==$("#ringselect").val();isSizeableProduct&&!s&&(r=eddDateFormat(o=getEarlyDeliveryDate(i.designEddDetails[a].skuCodeMap)));var l=i.designEddDetails[a].skuCodeMap[sizeKey].deliveryDateInfo.pincode;$(".store-delivery").html('Delivery By <strong class="fetch-edd">'+r+'</strong> for <span class="strong">Pincode <span class="delivery-pincode">'+l+"</span></span>"),eddAdditionalInfo(o),$(".delivery-pincode").text(l),$(".invalid-pin-error").html("");var d=getDifferenceBetweenTwoDates(new Date,new Date(o));!isDeliveryByTomorrow(o)&&d>3&&eddUtil.init(a)}if(o){var c=!1;Object.keys(eddResponse).forEach(function(e){eddResponse[e].isTAHPossible&&!c&&($("#tahWrapper").removeClass("hidden"),$("#custIdTah").val(eddResponse[e].customizationId),c=!0)})}productViewedEvent(t,o,i.collectionName,i.designMetalWeightVersion,i.designBaseMetalWeight),setTimeout(function(){$(".store-available").removeClass("loading")},100),n&&trackGAPageView(productDetails,d,l)}},error:function(e){window.pinErr=!0;var t=JSON.parse(e.responseText).error.errorMessage;$(".invalid-pin-error").html(t),setTimeout(function(){$(".store-available").removeClass("loading")},0)}})}function getEarlyDeliveryDate(e){var t=[];return Object.keys(e).sort().forEach(function(a){t.push(e[a].deliveryDateInfo.expectedDeliveryDate)}),t.sort(function(e,t){return new Date(e)-new Date(t)})[0]}function getCustomizationCombinationKey(e,t,a,n,i,o){return $("#preSetSolitaire-details").length>0?(e+t+n+(i+o||a)).replace(" ","").toUpperCase():(e+t+a+n+i+o).replace(" ","").toUpperCase()}function getProductSizesAndEDD(e,t,a,n,i){var o="",r="",s="",l="",d="",c=""!==$("#ringselect").val(),u="Select Size",p={},m=!1;if(a&&(sizeKey=a),t){var v=i,h=Object.keys(e)[0];e[h].skuCodeMap?(d=e[h].skuCodeMap,m=!0):d=weightAndPriceDetails,isNddProduct=!1}else eddResponse&&(d=eddResponse[e].skuCodeMap)[sizeKey].deliveryDateInfo&&(m=!0);return o+=m?'<li class="labels no-events"><div class="dropHead">'+("chains"===v||"necklaces"===v||"anklets"===v||"mangalsutra chains"===v?"Length":"Size")+'</div><div class="dropHead">Delivery By</div></li>':'<li class="labels no-events"><div class="dropHead">'+("chains"===v||"necklaces"===v||"anklets"===v||"mangalsutra chains"===v?"Length":"Size")+"</div></li>",Object.keys(d).sort().forEach(function(e){if((isNddProduct||c)&&e===sizeKey?(r=" size-selected",s=" active",u=d[e].displaySize):(r="",s=""),m){var t=d[e].deliveryDateInfo.expectedDeliveryDate;l=isDeliveryByToday(t)||isDeliveryByTomorrow(t)?" tomorrow":""}o+=n?'<li onclick="selectRingSize(this)" data-key="'+e+'" class="'+r+l+'" data-action="'+n+'">':'<li onclick="selectRingSize(this)" data-key="'+e+'" class="'+r+l+'">',o+='<span class="icon-ion-ios-checkmark-empty'+s+'"></span><span class="size">'+d[e].displaySize+"</span>",m&&(o+='<span class="deliverBy">'+eddDateFormat(d[e].deliveryDateInfo.expectedDeliveryDate)+"</span>"),o+="</li>"}),p.htmlData=o,p.selectedSizeDisplay=u,p}function eddDateFormat(e){var t=new Date;(new Date).setDate(t.getDate()+1);var a=new Date(e);return isDeliveryByToday(e)?"Today Evening ("+numberSuffix(a.getDate())+"&nbsp;"+monthAsShortString(a.getMonth())+")":isDeliveryByTomorrow(e)?"Tomorrow ("+numberSuffix(a.getDate())+"&nbsp;"+monthAsShortString(a.getMonth())+")":DayAsString(a.getDay())+", "+monthAsShortString(a.getMonth())+" "+a.getDate()}function isDeliveryByToday(e){var t=new Date;return new Date(e).toDateString()==t.toDateString()}function isDeliveryByTomorrow(e){var t=new Date,a=new Date;return a.setDate(t.getDate()+1),new Date(e).toDateString()==a.toDateString()}function eddAdditionalInfo(e){$("#ringselect").val();var t="",a=new Date,n=a.getFullYear()+"/"+a.getMonth()+"/"+a.getDate(),i=a.getHours()+":"+a.getMinutes()+":"+a.getSeconds();Date.parse(n+" "+i)<Date.parse(n+" 16:00:00")&&(isDeliveryByToday(e)?t="(Order before 4pm for same-day-delivery)":isDeliveryByTomorrow(e)&&(t="(Order before 4pm for next-d
51ay-delivery)")),$(".early-delivery-note").html(t)}$(document).ready(function(){var e=Boolean(getCookie("bsApp"));$(".subscribed-amount").length>0&&parseInt($(".subscribed-amount").text().replace(/\D+/g,"")),$(".first-discount-content .amount-deducted .text-right").length>0&&parseInt($(".first-discount-content .amount-deducted .text-right").text().replace(/\D+/g,"")),$(".gms-payment .btn-block").click(function(){trackGA("GMS","Clicked Pay Now","GMS clicked Pay Now in Payment Page")}),$(".bscash-subscribe").click(function(){e&&invokeAppBridge("code","My_Scheme_Details");$("#available-bs-cash").text()});var t=$("#isFirstExecutionStep").val();if("personalDetailFlow"==execution_step||"nomineeDetailFlow"==execution_step&&"true"==t)$("#fullname").val(),$("#email").val(),"MOBILE"==deviceName?$("#user-mobile").val():$("#contactNumber").val(),$("#isPlanExist").val()&&gms_value_var;if($("#multiGMSStart").on("click",function(){"myAccount"==PAGE_TYPE?trackGA("GMS","Initiated Multi Subscription","Dashboard"):"goldmine"==PAGE_TYPE&&trackGA("GMS","Initiated Multi Subscription","Landing Page")}),"goldMine"==cartType){$("#fullname").val(),$("#email").val(),"MOBILE"==deviceName?$("#user-mobile").val():$("#contactNumber").val();$("#address-form").submit(function(e){validateForm("address-form")&&($("#address-form").hasClass("gms-address-form")?trackGA("GMS","Clicked Next in PDP","GMS clicked Next button in Details Page"):$("#address-form").hasClass("gms-nominee-form")&&trackGA("GMS","Clicked Next in Nominee","GMS clicked Next button in Nominee Page"))}),"Payment_Success_GMS"==PAGE_TYPE&&$(".plan-next-occasion img").on("click",function(){trackGA("GMS","Clicked on GMS Success Banner","Payment Success Page")})}"goldmine"!=PAGE_TYPE&&"oldgoldexchange"!==PAGE_TYPE||setTimeout(function(){v2.Form.prototype.scrollToFirstWhenFail=!1},3e3),"oldgoldexchange"===PAGE_TYPE&&(window.onload=function(){var e=getTotalExchangedGold(),t=document.getElementById("totalExchangedGold");t.innerHTML=e,setTimeout(function(){startCounter(e,5,t)},1e3)})}),$(document).ready(function(){if("goldMine"===cartType){var e=$(".send-email").text(),t=localStorage.getItem("payByCashShown");e&&!t&&("NORMAL"==deviceName?(openPopup(),$(".btn-cod").attr("disabled","disabled"),$(".btn-cod").addClass("btn-disabled")):openPaymentCash()),"personalDetailFlow"!=execution_step||null!=e&&""!=e||localStorage.removeItem("payByCashShown"),"checkoutPaymentDetails"==execution_step&&t&&($(".btn-cod").attr("disabled","disabled"),$(".btn-cod").addClass("btn-disabled"))}}),$(document).ready(function(){if($(".amount-recommended-gms .amount.btn").on("click",function(){var e=$
51(this).text().replace(/\D+/g,"");$("#amount").val(parseInt(e)),$("#amount").parent().addClass("auto-filled"),"goldmine"==PAGE_TYPE&&handleGMAmountPrefillFromPDflow(e)}),"goldmine"!=PAGE_TYPE&&"myAccount"!=PAGE_TYPE||"NORMAL"!=deviceName&&"TABLET"!=deviceName||$(".occasion-carousel").addClass("active"),"paymentSuccessView"==execution_step&&$("#installmentPaid").length>0){var e=ordinalSuffixOf(parseInt($("#installmentPaid").text()));$(".installment-with-ordinal").html(e)}if("goldMine"===cartType&&("personalDetailFlow"==execution_step||"nomineeDetailFlow"==execution_step||"checkoutPaymentDetails"==execution_step)){e=ordinalSuffixOf(parseInt($(".installment-number .text-right").html()));$(".installment-number .text-right").html(e)}"true"===$("#isPartialCodPayment").val()&&getEDDForCOD()}),$(document).ready(function(){$(".gms-otp").on("click",function(){var e=$(this);$(".invalid-otp-code").addClass("hidden");var t=$(".scheme-num").text();$.ajax({type:"POST",url:GLOBAL_CTX+"/account/goldmine/send-redeem-otp",async:!1,cache:!1,dataType:"json",data:"code="+t,success:function(t){$(e).hasClass("resend-otp")&&($(e).addClass("hidden"),$(".otp-resent").removeClass("hidden"),setTimeout(function(){$(e).removeClass("hidden"),$(".otp-resent").addClass("hidden")},6e3))},error:function(t){$(e).hasClass("resend-otp")&&($(".otp-resent").addClass("hidden"),$(e).removeClass("hidden"))}})}),$("#verify-otp").on("submit",function(e){e.preventDefault(),setTimeout(function(){v2.Form.prototype.scrollToFirstWhenFail=!1},3e3);var t=$("#otp").val(),a=$(".scheme-num").text();if(!validateForm("verify-otp"))return!1;$.ajax({type:"POST",url:GLOBAL_CTX+"/account/goldmine/verify-otp-and-redeem",async:!1,cache:!1,dataType:"json",data:"code="+a+"&otp="+t,success:function(e){e.hasError?($("#otp-error").text(e.errorMessage),$(".invalid-otp-code").removeClass("hidden")):($(".invalid-otp-code").addClass("hidden"),$("#redeeem-success").submit())},error:function(e){}})})}),"product"!=PAGE_TYPE||isSISUser||(window.eddResponse="",$(document).ready(function(){var e=getCustomizationCombinationKey(metalColor,metalPurity,diamondColorClarity,solitaireCarat,solitaireClarity,solitaireColor),t=$("#customizationId").val(),a=$(".get-nearest-store ").val();if(fetchAllCustomizationAndEDD(a,designId,e,!0),$("#earlyDeliveryCustomizations").height()>$(".customization-available-inner").height()&&$(".view-more-customizations").removeClass("hidden"),window.pinErr||(fetchStoreDetails(a,t),fetchAllStoresDetails(a),fetchStoreAndTahHub(a)),"true"==isSizeableProduct){var n=getProductSizesAndEDD(e);$("#sizeDropdown").html(n.htmlData)}$("body").on("click",".store-tooltip-overlay",function(){$(".jtooltip").removeClass("active"),$(this).remove()}),setTimeout(function(){isNddProduct||"Solitaire Ring Mount"===productDetails.category||$("#ringselect").val("")},100)})),window.pinErr=!1,window.expectedDateOfDelivery="";var eddUtil={getEarlyDeliveryCustomizations:function(e,t){var a=new Date,n=new Date;n.setDate(a.getDate()+t);var i=[];return Object.keys(eddResponse).forEach(function(e){var t=eddResponse[e].skuCodeMap;Object.keys(t).forEach(function(a,o){var r={};new Date(t[a].deliveryDateInfo.expectedDeliveryDate)<n&&(r.customizationId=eddResponse[e].customizationId,r.metalColor=eddResponse[e].metalColor,r.MetalPurity=eddResponse[e].MetalPurity,r.metalType=eddResponse[e].metalType,r.diamondClarity=eddResponse[e].diamondClarity,r.diamondColor=eddResponse[e].diamondColor,r.solitaireCarat=eddResponse[e].solitaireCarat,r.solitaireClarity=eddResponse[e].solitaireClarity,r.solitaireColor=eddResponse[e].solitaireColor,r.size=t[a],Object.keys(r).length>0&&i.push(r))})}),i},cacheDom:function(){this.customizationUL=document.getElementById("earlyDeliveryCustomizations"),this.customizationULWrapper=document.getElementById("earlyDeliveryCustomizationsWrapper"),this.showMore=document.querySelector(".view-more-customizations")},renderUI:function(e){var t="";return e.forEach(function(e){var a;a=eddDateFormat(e.size.deliveryDateInfo.expectedDeliveryDate),t+="<li><span>",e.MetalPurity&&(t+="<span id='purity'>"+e.MetalPurity+"</span> kt"),e.metalColor&&(t+=" <span id='metalColor'>"+e.metalColor+"</span>"),e.diamondClarity&&(t+=", <span id='diamondClarity'>"+e.diamondClarity+"</span>&nbsp"),e.diamondColor&&(t+="<span id='diamondColor'>"+e.diamondColor+"</span> Diamonds"),e.solitaireCarat&&(t+=", <span id='solitaireCarat'>"+e.solitaireCarat+"</span>"),e.solitaireClarity&&(t+="<span id='solitaireClarity'>"+e.solitaireClarity+"</span>&nbsp"),e.solitaireColor&&(t+="<span id='solitaireColor'>"+e.solitaireColor+"</span> Solitaire"),"00"!==e.size.size&&(t+="<span id='available-size' data-sizekey='"+e.size.size+"' data-sizevalue='"+e.size.displaySize+"'>, Size "+e.size.displaySize+"</span>"),t+=" <span class='delivery-date'>(Delivery by "+a+")</span>",t+=" <span onclick='updateCustomization(this.parentElement)'><strong>View&nbsp;Details</strong></span>",t+="</span></li>"}),t},init:function(e){this.cacheDom();var t="",a=this.getEarlyDeliveryCustomizations(e,3);a.length>0&&(t=this.renderUI(a),this.customizationUL.innerHTML=t,a.length>3?this.showMore.classList.remove("hidden"):this.showMore.classList.add("hidden")),""!=t?this.customizationULWrapper.classList.remove("hidden"):this.customizationULWrapper.classList.add("hidden")}};function productViewedEvent(e,t,a,n,i){var o=getDifferenceBetweenTwoDates(new Date,new Date(t)),r={};r.pageType=getCurrentPageType(),r.id=e,r.designId=e,1==history.length?r.is_new_tab="true":r.is_new_tab="false",void 0!==getURLparams.posEvent?r.position=getURLparams.posEvent:r.position="-1",r.sortOption=getURLparams.sortbyEvent,r.impEvent=getURLparams.impEvent,r.tagEvent=getURLparams.tagEvent,r.ndd=getURLparams.ndd,r.sellingPrice=$("#discountedPriceSpan").text(),r.priceMrp=parsePrice($("#our_price_display").text()),r.offerLabel=$
51(".inner2").text(),r.numberOfDaysToDeliver=o,r.collectionName=a,r.source="online",r.eventSource="online",r.metalSpecVersion=n,r.baseMetalWeight=i,setTimeout(function(){logServerEvent("product_viewed",r)},1e3)}function getDifferenceBetweenTwoDates(e,t){return Math.round((t-e)/864e5)}function expandCustomizations(){$(".customization-available-inner").removeClass("hide-content").addClass("show-content"),$(".view-more-customizations").addClass("hidden")}function fetchStoreDetails(e,t){$.ajax({type:"GET",url:GLOBAL_CTX+"/physical-store/store-for-customization",async:!1,cache:!1,dataType:"json",data:"pincode="+e+"&customizationId="+t,success:function(e){$.isEmptyObject(e)?$("#storeDetails").hasClass("hidden")||($("#storeDetails").addClass("hidden"),$(".store-section").addClass("hidden")):($("#storeDetails").removeClass("hidden"),$(".store-section").removeClass("hidden"),e.allNearbyStores.length>0&&($("#storeDetails .msg-part-1").html("Available in <a href='javascript:void(0)' class='view-store-msg' id='inventoryInNearbyStoreMsg' onclick='openStoreTooltip(this,\"#nearbyStoreListPopup\"); facebookDeliveryAvailabilityChecked();'>"+e.allNearbyStores.length+" store(s)</a> near you. Find it at <strong class='nowrap store-name'>"+e.storeName+"</strong>, your closest location!"),$("#nearbyStoreListPopup .popup-content").html(getStoreDetailsHTML(e.allNearbyStores,"nearby"))))},error:function(e){$("#storeDetails").hasClass("hidden")||($("#storeDetails").addClass("hidden"),$(".store-section").addClass("hidden"))}})}function fetchAllStoresDetails(e){$.ajax({type:"GET",url:GLOBAL_CTX+"/physical-store/store-details-for-product-page",async:!1,cache:!1,dataType:"json",data:"pincode="+e,success:function(e){if($.isEmptyObject(e))$("#allStoreMsg").addClass("hidden"),$(".store-section").addClass("hidden");else{$("#allStoreMsg").removeClass("hidden"),$(".store-section").removeClass("hidden"),$("#viewStoreMsg").html("View all designs in stores near you");var t=getStoreDetailsHTML(e.storeDetails,"available");$("#availableStoreListPopup .popup-content").html(t)}},error:function(e){$("#allStoreMsg").addClass("hidden"),$(".store-section").addClass("hidden")}})}function fetchStoreAndTahHub(e){return $.ajax({type:"GET",url:GLOBAL_CTX+"/physical-store/store-and-tahhub-details",async:!1,cache:!1,dataType:"json",data:"pincode="+e,success:function(e){$.isEmptyObject(e)||(setLocalStorageWithExpiry("isPincodeUpdated",!0,1),setLocalStorageWithExpiry("isTAH",e.hasTAH,1),setLocalStorageWithExpiry("isStores",e.hasStores,1),setLocalStorageWithExpiry("tahHubId",e.wid,1),setLocalStorageWithExpiry("storeIds",e.sid,1))},error:function(e){}})}function pincodePopupData(e,t){return"STORE"===t?{title:e?"Currently, there are no stores in your area, but we're working on it! Double-check your pincode or try a different one.":"",description:e?"":"Find the closest store for browsing our latest designs. Order your desired jewellery online and collect it from the store.",btnText:"Explore Other Designs",type:"STORE"}:"BROWSE"===t?{title:"Check Availability In Your Pincode",description:"Browse our exquisite designs: locate stores near you!",btnText:"Explore Other Designs",type:"BROWSE"}:{title:"Check Availability In Your Pincode",description:"",btnText:"",type:""}}function loadFilterDesign(e){var t=window.location.search.split("?")[1],a=t?parseParams(t):{},n="",i=getLocalStorageWithExpiry("isPincodeUpdated");"BROWSE"===e&&a.hasOwnProperty("wid")?e="TAH":"BROWSE"===e&&(a.hasOwnProperty("storeIds")||a.hasOwnProperty("sid"))&&(e="STORE");var o=pincodePopupData(i,e);if("TAH"===e||"BROWSE"===e&&a.hasOwnProperty("wid")?getLocalStorageWithExpiry("isTAH")?((a.hasOwnProperty("sid")||a.hasOwnProperty("storeIds"))&&(delete a.sid,delete a.storeIds),a.wid=getLocalStorageWithExpiry("tahHubId")):(n=o,$(".middle-filters .filter-item").removeClass("active"),$(".middle-filters .tah .filter-item").addClass("active")):"STORE"===e||"BROWSE"===e&&(a.hasOwnProperty("storeIds")||a.hasOwnProperty("sid"))?getLocalStorageWithExpiry("isStores")?((a.hasOwnProperty("wid")||a.hasOwnProperty("storeIds"))&&(delete a.wid,delete a.storeIds),a.sid=getLocalStorageWithExpiry("storeIds")):(n=o,$(".middle-filters .filter-item").removeClass("active"),$(".middle-filters .store .filter-item").addClass("active")):"ALL"===e&&(a.hasOwnProperty("wid")||a.hasOwnProperty("storeIds")||a.hasOwnProperty("sid"))&&(delete a.wid,delete a.sid,delete a.storeIds),""!=n){$.fancybox.close();var r=getTahStoreUnAvailableHTML(n,e);$(".jewellery-columns-wrap").html(r)}else{var s=window.location.pathname+(Object.keys(a).length>0?"?"+objectToQueryParams(a):"");window.location.href=s}}function getTahStoreUnAvailableHTML(e,t){var a="";return a+='<div class="no-designs-found">',a+='<div class="inner">',a+='<div class="icon"><span class="icon icon-address"></span></div>',a+='<div class="title">'+e.title+"</div>",a+='<div class="description">'+e.description+"</div>",a+='<div class="update-pin"><span class="btn btn-flat" onclick="updateTAHandStoreBrowseButtons(\''+t+"','',"+!0+')">Change Pincode</span></div>',a+='<div class="btn-link-wrapper">or <a href="javascript:void(0)" class="btn-link" onclick="loadFilterDesign(\'ALL\')">'+e.btnText+"</a></div>",a+="</div>",a+="</div>"}function objectToQueryParams(e){var t=[];return Object.keys(e).forEach(function(a){e.hasOwnProperty(a)&&""!=a&&t.push(encodeURIComponent(a)+"="+encodeURIComponent(e[a]))}),t.join("&")}function getStoreDetailsHTML(e,t){var a,n="";return n+="<div class='store-select-popup'>","available"===t?n+="<div class='title title-7'>Select / un-select Stores</div>":"nearby"===t&&(n+="<div class='title title-7'>Product also available in</div>"),n+="<div class='content-wrap "+t+" '>",e.forEach(function(e,i){n+="<div class='store-list nearByStoreCheckbox",0===i&&(a=e.cityName),n+="nearby"===t?" active'":"'","available"===t&&(n+="onclick='handleStoreSelection(event)'"),n+="data-sid='"+e.sid+"' id='store-"+e.sid+"'>
51",n+="<span class='icon icon-ion-ios-checkmark-empty'></span>",n+="<label for='store-"+e.sid+"'><strong>"+e.storeName+"</strong></label>",n+="<p>"+e.storeAddress+"</p>",n+="<p>Phone: "+e.contactNumber+"</p>","available"===t&&(n+="<div class='inner-actions'>",n+="<a onclick=\"facebookStoreInventoryViewed('"+e.storeId+"','"+e.storeName+"','"+e.cityName+"','PDP')\" class='btn btn-flat btn-gray btn-round' href='/stores/"+scProcessStoreNameForURL(e.storeName)+"-"+scProcessCityNameForURL(e.cityName)+"-reslnk-"+encodeURIComponent(btoa(e.sid))+"/catalog.html'>View designs for this store</a>",n+="</div>"),n+="</div>"}),n+="</div>","available"===t&&(n+="<div class='action'><a href='javascript:void(0)' id='storeDesignsBtn' onclick='getStoreDesigns(this, \""+t+'", "'+a+"\")' class='btn btn-flat btn-block btn-disabled'>View all Designs in Stores</a></div>"),n+="</div>"}function handleStoreSelection(e){getSelectedStoresCount()>=5?(document.querySelector("#availableStoreListPopup #snackbarwrapper").innerHTML=toastUI("Please select up to 5 stores"),setTimeout(function(){var e=document.querySelector("#availableStoreListPopup #snackbarwrapper #snackbar");e.classList.remove("show"),e.innerHTML=""},3e3)):$(e.target).toggleClass("active"),isStoreSelected()?($("#storeDesignsBtn").removeClass("btn-disabled"),$(".select-all-stores").addClass("active")):($("#storeDesignsBtn").addClass("btn-disabled"),$(".select-all-stores").removeClass("active"))}function isStoreSelected(){for(var e=$(".content-wrap.available .nearByStoreCheckbox"),t=[],a=0;a<e.length;a++)$(e[a]).hasClass("active")&&t.push("true");return t.length>0}function getSelectedStoresCount(){var e=0;return $("#availableStoreListPopup .store-list").each(function(){1===$(this).closest(".active").length&&e++}),e}function checkUnCheckAllStores(e){isStoreSelected()?($(e.target).removeClass("active"),$(".nearByStoreCheckbox").removeClass("active"),$("#storeDesignsBtn").addClass("btn-disabled")):($(e.target).addClass("active"),$(".nearByStoreCheckbox").addClass("active"),$("#storeDesignsBtn").removeClass("btn-disabled"))}function getStoreDesigns(e,t,a){for(var n=$("."+t+" .nearByStoreCheckbox.active"),i=[],o=0;o<n.length;o++)i.push(n[o].getAttribute("data-sid"));var r=i.sort().join(","),s=btoa(r);isStoreSelected()?window.location.href=GLOBAL_CTX+"/stores/"+scProcessCityNameForURL(a)+"-reslnk-"+encodeURIComponent(s)+"/catalog.html":alert("Please select a store")}function openStoreTooltip(e,t){commonFancyBox({width:750,wrapCSS:"fancybox-style-4",href:t,resetPopup:function(){},afterLoad:function(){$("body").addClass("popup-active")}})}function closeStoreTooltip(){$(".jtooltip").removeClass("active"),$(".store-tooltip-overlay").remove()}function getDesignCustomization(e,t,a,n,i,o,r){$.ajax({type:"GET",url:GLOBAL_CTX+"/design/getcustomization",async:!1,cache:!0,dataType:"text",data:"customizationId="+e+"&pincode="+t+"&size="+a+"&sameDayDelivery="+n+"&engravingApplied="+i,success:function(e){var t=JSON.parse(e);if(!t.isError){$("#details-top-right #details-top-right-inner #short_desc").html(t.shortDescription),$("#details-top-right #details-top-right-inner #our_price_display").html(t.price);var i=parseInt(t.discountedPrice.replace(/,/g,"")),s=$(".text .voucher-desc");if(s.length>0)if(i>1e4)s.html('Get additional discount worth &nbsp;<span class="WebRupee">Rs.</span><strong>10,000</strong>'),$("#gms-voucher-start a").attr("href",GLOBAL_CTX+"/goldmine.html?installment=10000");else{s.html("Get this product for FREE! ");var l=100*Math.ceil(i/100);$("#gms-voucher-start a").attr("href",GLOBAL_CTX+"/goldmine.html?installment="+l)}var d=t.price.replace(/,/g,"");$("#cashback-amount").text(Math.ceil(d/5)),$("#mcd_Dash .mc-off").html("("+t.mcdDash+"% OFF)"),t.mcdDash<=0?($("#mcd_Dash").hide(),$("#makingChargesNew_b").hide(),$(".making-charges-old").removeClass("line-through")):($("#mcd_Dash").show(),$("#makingChargesNew_b").show(),$(".making-charges-old").addClass("line-through")),t.hasMakingChargeDiscount?($("#mcd_Dash").show(),$("#makingChargesNew_b").show(),$(".making-charges-old").addClass("line-through"),$(".item-type-title-ndd").addClass("making-charges")):$(".item-type-title-ndd").removeClass("making-charges");
51var c=parseInt(t.discountedPrice.replace(/,/g,"")).toLocaleString(),u=parseInt(t.price.replace(/,/g,"")).toLocaleString(),p=parseFloat(t.price.replace(/,/g,""))-parseFloat(t.discountedPrice.replace(/,/g,""))-(parseFloat(t.makingCharges.replace(/,/g,""))-parseFloat(t.makingChargesNew.replace(/,/g,"")))-(void 0!==t.diamondCostNew?parseFloat(t.diamondCost.replace(/,/g,""))-parseFloat(t.diamondCostNew.replace(/,/g,"")):0)-(parseFloat(t.taxOnSellingPrice.replace(/,/g,""))-parseFloat(t.tax.replace(/,/g,"")));if(setDiscountedPrice(c),c<u?$(".our_price_display.original-price").show():$(".our_price_display.original-price").hide(),$("#details-top-right #details-top-right-inner #our_price_display_b").html(t.poDash),$("#makingChargesWithoutDiscount_b").html(t.mcoDash+"/-"),$("#details-top-right #details-top-right-inner .new-price #our_price_display").html(t.discountedPrice),$("#details-top-right #details-top-right-inner .updated-price #our_price_display").html(t.discountedPrice),$("#details-top-right #details-top-right-inner #product-code").html("Product code "+t.productCode),updateBestPrice(t.discountedPrice,c,t.price,u,t.bestPriceAmount),$("#goldCost_b").html(t.goldCost+"/-"),t.showNewGoldCost&&$("#goldCost_new").html(t.newGoldCost+"/-"),null!=t.diamondCostNew&&$("#diamondCost_b").html(t.diamondCostNew+"/-"),$("#diamondCostWithoutDiscount_b").html(t.diamondCost+"/-"),$("#coloredStoneCost_b").html(t.coloredStoneCost+"/-"),$("#preSetSolitaireCost_b").html(t.preSetSolitaireCost+"/-"),$("#taxes_b").html(t.tax+"/-"),$("#makingChargesWithoutDiscount_b1").html(t.makingCharges+"/-"),$("#makingChargesWithoutDiscount_b1-ndd").html(t.makingCharges+"/-"),$("#discountAmount").html(p.toLocaleString()+"/-"),$("#bottomActualPrice").html(u),$("#bottomSellingPrice").html(c),t.makingChargesNew&&($("#makingChargesNew_b").html(t.makingChargesNew+"/-"),$("#makingChargesNew_b-ndd").html(t.makingChargesNew+"/-")),$(".etd-date").html(t.expectedDeliveryDate),"MOBILE"==deviceName&&n!=r&&(1==t.sameDayDelivery||"true"==t.sameDayDelivery)&&$("#ringselect").length>0){var m=document.getElementById("ringselect");$("#nddSizeKey").val(m.options[m.selectedIndex].value),$("#nddSizeValue").val(m.options[m.selectedIndex].text)}"MOBILE"==deviceName&&showHideSameDayDeliveryMessage(t),$("#normal-delivery-size").hide(),$(".ndd-static-msg").show(),$(".content #detail-product-code").html(t.productCode),$("#customizationId").val(t.customizationId),$("#textForSelectedQuality #metalQuality").text(metalPurity+"Kt"),$("#textForSelectedQuality #selectedMetalColor").text(metalColor),$("#metalPurityId").text(t.metalPurity),"Yellow"!==metalColor?$("#metalColorId").text(metalColor):$("#metalColorId").text(""),$("#product_total_weight").html(t.totalWeight+" gram");var v=Math.floor(100*t.metalWeight)/100;if(v<.01&&(v=.01),$("#metal-details #metalWeight").html(v),o&&($("#textForSelectedQuality #clarity").text("clarity "+o.split(" ")[0]),$("#textForSelectedQuality #color").text("color "+o.split(" ")[1]),$(".diamondClarityDetails").html(o.split(" ")[0]),$(".diamondColorDetails").html(o.split(" ")[1])),void 0!==t.isPreSetSolitaire&&(1==t.isPreSetSolitaire||"true"==t.isPreSetSolitaire)){var h=$("#caratselect").val();$("#preSetSolitaireCarat").html(h),$("#textForSelectedQuality #psscarat").text("[carat "+h);var g=$("#clarityselect").val();if(g){$("#preSetSolitaireClarity").html(g);var f=$("#colorselect").val();$("#preSetSolitaireColor").html(f),$("#textForSelectedQuality #pssclarity").text("clarity "+g),$("#textForSelectedQuality #psscolor").text("color "+f+"]")}else{var y=$("#qualityselect").val().split(" ");$("#preSetSolitaireClarity").html(y[0]),$("#preSetSolitaireColor").html(y[1]),$("#textForSelectedQuality #pssclarity").text("clarity "+y[0]),$("#textForSelectedQuality #psscolor").text("color "+y[1]+"]")}void 0===t.hasSideDiamonds||1!=t.hasSideDiamonds&&"true"!=t.hasSideDiamonds||($(".diamondClarityDetails").html(t.diamondClarityDetails),$(".diamondColorDetails").html(t.diamondColorDetails),$("#textForSelectedQuality #clarity").text("[clarity:"+t.diamondClarityDetails),$("#textForSelectedQuality #color").text("color:"+t.diamondColorDetails+"]"))}if(n==r){var b="metalPurity-"+metalColor,C=t.metalPurity;radionButtonSelectedValueSet(b,C),t.diamondQuality&&radionButtonSelectedValueSet(b="diamondQuality",C=t.diamondQuality);var w=t.metalColor,P=$("#select-gold .selected");P.removeClass("yellow-gold"),P.removeClass("white-gold"),P.addClass(w.toLowerCase()+"-gold"),P.find(".color-val").text(w),$("#colorCustomizationSelect").length>0&&($("#colorCustomizationSelect").val(w),$("#select-gold .color-val").html(w),$("#select-gold 
51select").removeClass(),$("#select-gold select").addClass(w)),$("#details-top-sub-sub-inner").removeClass("no-image-available-white-gold no-image-available-yellow-gold no-image-available-rose-gold no-image-available-brown-gold"),$(this).hasClass("no-image-available-yellow")&&$("#details-top-sub-sub-inner").addClass("no-image-available-yellow-gold"),$(this).hasClass("no-image-available-white")&&$("#details-top-sub-sub-inner").addClass("no-image-available-white-gold"),$(this).hasClass("no-image-available-rose")&&$("#details-top-sub-sub-inner").addClass("no-image-available-rose-gold"),$(this).hasClass("no-image-available-brown")&&$("#details-top-sub-sub-inner").addClass("no-image-available-brown-gold"),1!=t.sameDayDelivery&&"true"!=t.sameDayDelivery||$("#ringselect").length>0&&$("#nddSizeKey").val().length>0&&($("#ringselect").val($("#nddSizeKey").val()),$(".select-size .selectyzeValue").html($("#nddSizeValue").val()))}if(weightAndPriceDetails=t.weightAndPriceDetails,getPriceOnSize(),appendShortDesc(),null!=t.childCustomizations&&""!=t.childCustomizations){for(var S=0;S<document.getElementsByName("ringType").length;S++)"For Him"==document.getElementsByName("ringType")[S]?document.getElementsByName("childCustomizationId")[S]=t.forHim:"For Her"==document.getElementsByName("ringType")[S]&&(document.getElementsByName("childCustomizationId")[S]=t.forHer);!t.isSizedSKU||"-1"==$("#ringSizeSet1").val()&&"-1"==$("#ringSizeSet2").val()||($("#parentDefaultPrice").val(t.parentDefaultPrice),$("#parentMetalWeight").val(t.metalWeight),$("#parentGoldCost").val(t.goldCost),$("#parentMakingCharges").val(t.makingCharges),$("#parentTax").val(t.tax),updatePriceOnSizeForSets())}null!=t.nddUrlForBrowsePage&&""!=t.nddUrlForBrowsePage?($("#nddUrlForSize").attr("href",t.nddUrlForBrowsePage),$("#nddUrlForSize").show()):$("#nddUrlForSize").hide(),updateGoldminePlanOnCustomization(),a=getSelectedSize(),$("form#reserve #customizationId").val(t.customizationId),$("form#reserve #size").val(a)}changeEDDToOccasionDate(),trackGA("BsUI","changed-customization","clicked_"+metalColor+"_"+metalPurity+"_"+o)}})}function handleStoreQueryParamsForFilter(e){var t="";e&&(t=e.replace(/@/g,"/").replace("!!",".html"),location.href=GLOBAL_CTX+"/"+t)}function convertToProperCase(e){var t=e.target.value.split(/(\s+|\.+)/),a=[];for(var n in t)a.push(t[n].charAt(0).toUpperCase()+t[n].slice(1).toLowerCase());var i=a.join("");e.target.value=i}function showSizerPincodeError(){$("#pincode-error").removeClass("hidden"),$("#pincode-error").text("Invalid Pincode!"),setTimeout(function(){$("#pincode-error").addClass("hidden"),$("#pincode-error").text("")},5e3)}function getCityStateByPincode(e,t,a){return $.ajax({type:"GET",url:GLOBAL_CTX+"/address/",async:!1,cache:!0,dataType:"json",data:"ajax=true&submiPtincode=true&pincode="+e,success:function(e){e.hasError?"sizer"===a&&($("#pincode-valid").val("false"),showSizerPincodeError()):($(t+" #cityName").val(e.city),$(t+" #state").val(e.id_state),$(t+" #cityName").parent().addClass("auto-filled"),$(t+" #state").parent().addClass("auto-filled"),"sizer"===a&&($("#pincode-error").addClass("hidden"),$("#pincode-error").val(""),$("#pincode-valid").val("false"),e.isPincodeValid?($(t+" #city").val(e.city),$(t+" #state").val(e.statename),$("#pincode-valid").val("true")):showSizerPincodeError()))},error:function(e){"sizer"===a&&$("#pincode-valid").val("false")}})}function getCurrencySymbolForCountry(e){return"United Kingdom"==e?"&pound;":"India"==e?'<span class="WebRupee">Rs.</span>':"$"}function formatPrice(e){return getCurrencySymbolForCountry("India")+"&nbsp;"+parseInt(e).toLocaleString("en-in")}function maskNumber(e,t,a){return"0"===e.substring(0,1)&&(e=e.substring(1)),e.substring(0,t)+e.substring(t,a).replace(/[0-9]/g,"X")+e.substring(a,e.length)}function maskEmail(e){var t=e.replace(/([^@\.])/g,"*").split(""),a="";for(i=0;i<t.length;i++)(i<=1||"."==a||"@"==a)&&(t[i]=e[i]),a=e[i];return t.join("")}function clearLocalStorageItem(e){localStorage.removeItem(e)}function clearRadio(e){$(e).parents(".form-group").find("input[type='radio']").each(function(){$(this)[0].checked=!1}
51)}function debounce(e,t){let a;function debounced(){const n=this,i=arguments;clearTimeout(a),a=setTimeout(function(){e.apply(n,i)},t)}return debounced.cancel=function(){clearTimeout(a)},debounced}$(document).ready(function(){if(addDeviceTypeToCookie(),!Boolean(getCookie("bsApp")))try{webengage.onReady(function(){createCookie("we_luid",webengage.state.getForever().luid,365)})}catch(e){}checkIfPushNotificationSupported()}),otpUtilNew=function(){var e="";function sendOTP(t,a,n,i,o,r,s){r=r||EMAIL,o=o||CUSTOMER_PHONE;var l="email="+r+"&otpType="+a+"&voucherCode="+n+"&cartId="+i+"&customerphone="+o+"&otpId="+e;s&&(l+="&otpDeliveryMode="+s);var d=$.ajax({type:"POST",async:!1,url:GLOBAL_CTX+"/otp/send-otp",dataType:"json",data:l,success:function(t){e=t.otpId,a===OTP_TYPE.BSCASH?$("#bsCashOtpId").val(e):a===OTP_TYPE.BSCREDIT?$("#bsCreditOtpId").val(e):$("#otpId").val(e)},error:function(e){return{hasError:!0,errorMsg:e.errorMessage}}}).responseText;return JSON.parse(d)}return{sendOTP:sendOTP,resendOTP:function resendOTP(e,t,a,n,i,o,r,s){var l=sendOTP(0,t,a,n,i,o,r);return l.hasError||(r&&"function"==typeof s?s(l):$(e.target).hasClass("resend-otp")&&($(e.target).addClass("hidden"),$(".otp-resent").removeClass("hidden"),setTimeout(function(){$(e.target).removeClass("hidden"),$(".otp-resent").addClass("hidden")},6e3))),l},verifyOTP:function verifyOTP(t,a){a=a||"";var n=$.ajax({type:"POST",async:!1,url:GLOBAL_CTX+"/otp/verify-otp",dataType:"json",data:"otpId="+e+"&otpString="+t+"&cartId="+a,success:function(e){},error:function(e){}}).responseText;return JSON.parse(n)}}}(),giftCardUtil={getGiftCardProperties:function getGiftCardProperties(e,t,a){var n="store-customer-details"===PAGE_TYPE?"&inventoryIds=":"&productIds=",i=$.ajax({type:"POST",async:!1,url:GLOBAL_CTX+"/giftcardvoucher/giftcard-properties",dataType:"json",data:"giftCardCode="+t+n+a,success:function(e){},error:function(e){}}).responseText;return JSON.parse(i)},validateAndRedeemGC:function validateAndRedeemGC(e,t,a,n,i,o){var r="captchaResponse="+e+"&giftCardCode="+a+"&cartAmount="+t+"&pin="+n+"&phoneNumber="+i+"&otpString="+o,s=$.ajax({type:"POST",async:!1,url:GLOBAL_CTX+"/giftcardvoucher/giftcard-validation-and-redemption",dataType:"json",data:r,success:function(e){},error:function(e){}}).responseText;return JSON.parse(s)}},utilityFuncForOTP={addMaskedNumber:function(e){var t=maskNumber(e,2,6);$("#maskedMobileNumber").html(t)},showOTPPopup:function(e,t,a){(a=a||"#bsWalletOTPPopup","MOBILE"!=deviceName)?commonFancyBox({width:750,wrapCSS:"fancybox-style-4",href:a,resetPopup:function(){"bscash"===t?(changeCheckboxCheckedStatus("#bscash",e),$("#verifyBsWalletOTP").attr("data-paymentmode","bscash")):"bscredit"===t&&(changeCheckboxCheckedStatus("#bscredit",e),$("#verifyBsWalletOTP").attr("data-paymentmode","bscredit"))},afterLoad:function(){setTimeout(function(){"bscash"===t?$("#verifyBsWalletOTP").attr("data-paymentmode","bscash"):"bscredit"===t&&$("#verifyBsWalletOTP").attr("data-paymentmode","bscredit")},100)}}):openWalletPopup(t)}
51,showOtpErrorMessage:function(e,t){$(e+" .invalid-otp-code").removeClass("hidden"),$(e+" #otp-error").text(t)},showOtpSuccessMessage:function(e,t){$(e+" .success-otp-code").removeClass("hidden"),$(e+" #otp-success").text(t)}};var OTP_TYPE={BSCASH:"bscash",BSCREDIT:"bscredit",NEFT:"neft",VOUCHER:"voucher",LOGIN:"newPaymentLogin"};function changeCheckboxCheckedStatus(e,t){$(e).prop("checked",t)}Object.freeze(OTP_TYPE);var isDigiVoucher=!1;function extendGMSVoucherValidity(e){var t="voucherCode="+e,a=$.ajax({type:"POST",async:!1,url:GLOBAL_CTX+"/extend-gms-voucher-validity",dataType:"json",data:t,success:function(e){},error:function(e){}}).responseText;return JSON.parse(a)}function createFranchiseLeads(e){$.ajax({type:"POST",url:GLOBAL_CTX+"/physical-store/franchise-lead/create",async:!1,dataType:"json",data:e,success:function(e){$(".leads-section").append("<span class='icon icon-i-tick'></span><br />Thanks for contacting us. <br />We will get back to you soon."),$("#franchiseInquiryForm").remove()},error:function(e){}})}function addDeviceTypeToCookie(){$.ajax({type:"GET",url:GLOBAL_CTX+"/user-context/add-device-type",async:!1,data:"",success:function(){},error:function(e){}})}function sendPaymentLogs(e){$.ajax({type:"POST",async:!1,url:GLOBAL_CTX+"/log/client/payment-data",dataType:"json",data:"data="+e,success:function(e){}})}function getProductIdsForGCApplication(){var e=[],t=document.querySelectorAll(".product-code");if(t.length>0)for(var a=0;a<t.length;a++){var n=t[a].innerHTML.split(":")[1].split("-");n.length>1?e.push(n[1].trim()):e.push(n[0].trim())}return e.join(",")}function openGiftCardPopup(e){e.giftCardProperties.isPinRequired?($(".gc-otp-verify .gc-pin").removeClass("hidden"),$(".gc-otp-verify .gc-mobile").removeClass("col-xs-12").addClass("col-xs-7")):($(".gc-otp-verify .gc-pin").addClass("hidden"),$(".gc-otp-verify .gc-mobile").addClass("col-xs-12").removeClass("col-xs-7")),"VOUCHAGRAM"==e.giftCardProperties.giftCardPartyCode?$(".gc-otp-verify .gc-captcha").removeClass("hidden"):$(".gc-otp-verify .gc-captcha").addClass("hidden"),utilityFuncForOTP.showOTPPopup("","","#giftCardPopup")}function resetGiftCardPopup(){$(".formError").remove(),$(".gc-mobile").removeClass("success focused error"),$(".gc-pin").removeClass("success focused error"),$("#phoneNumber_error").remove(),$("#pin_error").remove(),$("#giftCardPopup .invalid-otp-code").addClass("hidden"),$("#giftCardPopup #otp-error").text(""),$("#giftCardPopup .success-otp-code").addClass("hidden"),$("#giftCardPopup #otp-success").text(""),resetForm("verifyOTPOrPinForGC")}function logServerEvent(e,t){t._eventId=e,"product"===PAGE_TYPE?(t.productCategory=content_category_var||"",t.productName=content_name_var||[]):(t.productCategory=JSON.stringify(content_category_var),t.productName=JSON.stringify(content_name_var)),t.ids=JSON.stringify(content_ids_var),t.content_type=content_type_var,t.contents=JSON.stringify(contents_var),t.price=parsePrice(value_var),t.currency=currency_var,t.currentURL=window.location.href,processServerEvent(t)}function parseParams(e){var t={};return e.split("&").forEach(function(e){e=e.split("="),t[e[0]]=decodeURIComponent(e[1]||"")}),t}function checkTAHPincode(e){$(".tahPin-tooltip").remove();var t=e.target.value;6===t.length&&$.ajax({type:"GET",url:GLOBAL_CTX+"/homeTryOn/validate-pincode",async:!1,data:"tahPincode="+t,dataType:"json",success:function(t){t.hasError||$(e.target).parent().append('<div class="bs-tt dark-bg bs-tt-hcb tahPin-tooltip info-block pink-bg tl active"><p>'+t.message+"</p></div>")},error:function(e){}})}function handleGSTOnBlur(e,t){15===e.target.value.length?"store-customer-details"!==PAGE_TYPE&&$(t).is(":checked")?($(t).trigger("click"),$("#billing-address-form").show(),$(".add-billing-address").addClass("disabled")):("store-customer-details"===PAGE_TYPE&&$(t).is(":not(:checked)")&&$(t).trigger("click"),"MOBILE"===deviceName&&($("#billing-address-form").show(),$(".add-billing-address").addClass("disabled"))):($(t).attr("disabled",!1),$(".add-billing-address").removeClass("disabled"))}function getDateInDefaultBrowserFormat(e){return e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)}function updateCODRmngAmt(e,t,a){var n=+e.target.value;n>
51a||n<1e3||$(".partialPayBtn #amt").text((t-n).toLocaleString())}function payRemainingCODAmount(e,t){var a=$("#partialCODAmt").val(),n=$("#partialCODAmt").data("flowurl");a>t||a<1e3||(location.href=n+"&_eventId=partialPaymentForCod&partialCodAmount="+a)}function upperCaseInput(e){var t=e.selectionStart;e.value=e.value.toUpperCase(),e.setSelectionRange(t,t)}function createCookie(e,t,a){if(a){var n=new Date;n.setTime(n.getTime()+24*a*60*60*1e3);var i="; expires="+n.toGMTString()}else i="";document.cookie=e+"="+t+i+"; path=/"}function getCookie(e){for(var t=e+"=",a=document.cookie.split(";"),n=0;n<a.length;n++){for(var i=a[n];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(t))return i.substring(t.length,i.length)}return""}function deleteCookie(e){document.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"}function webengageSignOut(){webengage&&webengage.user.logout()}function checkIfPushNotificationSupported(){try{if(!("serviceWorker"in navigator))throw new Error("No Service Worker support!");if(!("showNotification"in ServiceWorkerRegistration.prototype))throw new Error("Notifications aren't supported.");if(!("PushManager"in window))throw new Error("No Push API Support!")}catch(e){}}function registerServiceWorker(){try{window.addEventListener("load",function(){navigator.serviceWorker.register(GLOBAL_CTX+"/firebase-messaging-sw.js").then(function(e){e.active.postMessage({buildMode:MODE})})})}catch(e){}}function getLTEEstimate(e,t){$.ajax({type:"GET",url:"/account/expected-lte-value",async:!1,cache:!1,dataType:"json",data:"orderItemId="+encodeURI(e),success:function(a){if(!a.hasError){var n=$(".item-"+e).data("productcategory"),i=getLteBBList(a.lteValue,e,t,n);$("#lteBB-ph-"+e).html(i),$("#lteBB-ph-"+e).removeClass("hidden")}}})}function getLteBBList(e,t,a,n){var i="";return e.solitaireValuationDone?(i+='<div class="col-xs-6 lte-section">',i+='<h3 class="title title-4">Lifetime Exchange (Approx. estimate)</h3>',i+='<table border"0" width="100%">',i+="<tbody>",e.lteDiamondValue>0&&(i+="<tr>",i+='<td align="left"><strong>Diamond Value</strong></td>',i+='<td align="center">('+e.diamondWtInCarat+" Carat)</td>",i+='<td align="right">'+formatPrice(e.lteDiamondValue)+"</td>",i+="</tr>"),e.lteSolitaireValue>0&&(i+="<tr>",i+='<td align="left"><strong>Solitaire Value</strong></td>',i+="<td></td>",i+='<td align="right">'+formatPrice(e.lteSolitaireValue)+"</td>",i+="</tr>"),e.ltePresetSolitaireValue>0&&(i+="<tr>",i+='<td align="left"><strong>Preset Solitaire Value</strong></td>',i+="<td></td>",i+='<td align="right">'+formatPrice(e.ltePresetSolitaireValue)+"</td>",i+="</tr>"),e.lteStoneValue>0&&(i+="<tr>",i+='<td align="left"><strong>Stone Value</strong></td>',i+="<td></td>",i+='<td align="right">'+formatPrice(e.lteStoneValue)+"</td>",i+="</tr>"),e.metalValue>0&&(i+="<tr>",i+='<td align="left"><strong>Metal Value</strong></td>',i+='<td align="center">('+e.metalWtInGram+" Gram)</td>",i+='<td align="right">'+formatPrice(e.metalValue)+"</td>",i+="</tr>"),e.discountAmount>0&&(i+="<tr>",i+='<td align="left"><strong>Discount Value</strong></td>',i+="<td></td>",i+='<td align="right">- '+formatPrice(e.discountAmount)+"</td>",i+="</tr>"),e.bonusCreditAmount>0&&(i+="<tr>",i+='<td align="left"><strong>Signup Bonus</strong></td>',i+="<td></td>",i+='<td align="right">- '+formatPrice(e.bonusCreditAmount)+"</td>",i+="</tr>"),e.handlingCharges>0&&(i+="<tr>",i+='<td align="left"><strong>Handling Charges</strong></td>',i+="<td></td>",i+='<td align="right">- '+formatPrice(e.handlingCharges)+"</td>",i+="</tr>"),e.certificateCost>0&&(i+="<tr>",i+='<td align="left"><strong>Certificate Cost</strong></td>',i+="<td></td>",i+='<td align="right">- '+formatPrice(e.certificateCost)+"</td>",i+="</tr>"),i+='<tr class="total">',i+='<td align="left"><strong>Total LTE Value</strong></td>',i+="<td></td>",i+='<td align="right" class="green-text">'+formatPrice(e.lteFinalValue)+"</td>",i+="</tr>",i+="</tbody>",i+="</table>",i+='<div class="lte-initiate-button text-center"><input type="button" onClick="initiateLTEBB(false,'+t+');" value="Proceed with Life Time Exchange" class="btn btn-narrow style2 order-item-lte-initiate"></div>',i+="</div>",i+='<div class="col-xs-6 lbb-section">',i+='<h3 class="title title-4">Lifetime Buy-Back (Approx. estimate)</h3>',i+='<table border"0" width="100%">',i+="<tbody>",e.bbDiamondValue>0&&(i+="<tr>",i+='<td align="left"><strong>Diamond Value</strong></td>',i+='<td align="center">('+e.diamondWtInCarat+" Carat)</td>",i+='<td align="right">'+formatPrice(e.bbDiamondValue)+"</td>",i+="</tr>"),e.bbSolitaireValue>0&&(i+="<tr>",i+='<td align="left"><strong>Solitaire Value</strong></td>',i+="<td></td>",i+='<td align="right">'+formatPrice(e.bbSolitaireValue)+"</td>",i+="</tr>"),e.bbPresetSolitaireValue>0&&(i+="<tr>",i+='<td align="left"><strong>Preset Solitaire Value</strong></td>',i+="<td></td>",i+='<td align="right">'+formatPrice(e.bbPresetSolitaireValue)+"</td>",i+="</tr>"),e.bbStoneValue>0&&(i+="<tr>",i+='<td align="left"><strong>Stone Value</strong></td>',i+="<td></td>",i+='<td align="right">'+formatPrice(e.bbStoneValue)+"</td>",i+="</tr>"),e.metalValue>0&&(i+="<tr>",i+='<td align="left"><strong>
51Metal Value</strong></td>',i+='<td align="center">('+e.metalWtInGram+" Gram)</td>",i+='<td align="right">'+formatPrice(e.metalValue)+"</td>",i+="</tr>"),e.discountAmount>0&&(i+="<tr>",i+='<td align="left"><strong>Discount Value</strong></td>',i+="<td></td>",i+='<td align="right">- '+formatPrice(e.discountAmount)+"</td>",i+="</tr>"),e.bonusCreditAmount>0&&(i+="<tr>",i+='<td align="left"><strong>Signup Bonus</strong></td>',i+="<td></td>",i+='<td align="right">- '+formatPrice(e.bonusCreditAmount)+"</td>",i+="</tr>"),e.handlingCharges>0&&(i+="<tr>",i+='<td align="left"><strong>Handling Charges</strong></td>',i+="<td></td>",i+='<td align="right">- '+formatPrice(e.handlingCharges)+"</td>",i+="</tr>"),e.certificateCost>0&&(i+="<tr>",i+='<td align="left"><strong>Certificate Cost</strong></td>',i+="<td></td>",i+='<td align="right">- '+formatPrice(e.certificateCost)+"</td>",i+="</tr>"),i+='<tr class="total">',i+='<td align="left"><strong>Total LBB Value</strong></td>',i+="<td></td>",i+='<td align="right" class="green-text">'+formatPrice(e.bbFinalValue)+"</td>",i+="</tr>",i+="</tbody>",i+="</table>",i+='<div class="lte-initiate-button text-center"><input type="button" onClick="initiateLTEBB(true,'+t+');" value="Proceed with Life Time BuyBack" class="btn btn-narrow style2 order-item-lte-initiate"></div>',i+="</div>",i+='<div class="info-block">',i+="<strong>Note:</strong>",i+="<ol>",i+="<li>Failure to return the original product certificate in the case of a solitaire jewellery will result in a deduction of Rs. 3500. (For larger solitaires, the deduction may be higher).</li>",i+="<li>The above values for material (gram, carat) are estimates only. Final value will be notified to you after we receive the product and we do a quality check (QC) for the same</li>",i+="<li>Gold rate applied will be as per today's gold rate</li>",i+="<li>If you choose to avail Lifetime Exchange, the final value will be loaded as Blue Credits in your BlueStone account after Quality Check. The Blue Credits will remain valid for 365 days and can be used to purchase jewellery (except Silver Jewellery, Silver Coins, Gold Coins and Solitaires) with us. You cannot encash the amount.</li>",i+="</ol>",i+="</div>"):(i+='<p class="text-center">We will need a few days (2-3 business days, typically within 24 hours) to calculate the Lifetime Exchange/Lifetime Buy-Back value. Please check after a few days.</p>',i+='<p class="text-center"><input type="button" onClick="closePopup();" value="OK" class="btn btn-narrow style2 order-item-solitaire-lte"></p>')}function initiateLTEBB(e,t){$("#lteBB-ph-"+t).addClass("hidden"),$(".lte-button").removeClass("hidden"),$(".lte-policy").removeClass("hidden"),$(".lte-estimate").removeClass("hidden"),$(".pickup-address").removeClass("hidden"),$(".is-buyback-flag").val(e),e?$(".order-item-lte-initiate").val("Confirm BuyBack Request"):$(".order-item-lte-initiate").val("Confirm LTE Request")}function estimateLteBuyback(e,t,a,n){$.ajax({type:"GET",url:"/account/final-lte-lbb-value",async:!1,cache:!1,dataType:"json",data:"orderItemId="+encodeURI(e)+"&pickupItemId="+encodeURI(t)+"&pickupType="+encodeURI(a),success:function(i){if(!i.hasError){var o=$("#orderItem-confirmLTE_"+e).data("isbuyback"),r=getLteBBEstimate(i.lteValue,e,t,a,o,n);$("#orderItem-confirmLTE_"+e+" #lteConfirmDetails, #itemreturn_"+e+" #lteConfirmDetails").html(r)}}})}function reConfirmLTEBB(e,t,a,n,i){confirm("Are you sure?")&&confirmLTEBB(e,t,a,n,i)}function confirmLTEBB(e,t,a,n,i){$.ajax({type:"POST",url:"/account/confirm/lte-buyback-repair",async:!1,cache:!1,dataType:"json",data:"orderItemId="+encodeURI(e)+"&pickupItemId="+encodeURI(t)+"&pickupType="+encodeURI(a)+"&isBuyBack="+encodeURI(i),success:function(t){t.hasError||$("#orderItem-confirmLTE_"+e+" #lteConfirmDetails, #itemreturn_"+e+" #lteConfirmDetails").html(lteSuccessScreen(e,n,i))}})}function lteSuccessScreen(e,t,a){var n="";return n+='<div class="lte-success-screen text-center">',n+="<p>Refund success!</p>",n+='<button class="btn-new" onclick="closeLteLBBPopup(\''+t+"',"+e+')">Ok</button>',n+="</div>"}function closeLteLBBPopup(e,t){"MOBILE"!==deviceName?(showOrder(1,e,"order-detail"),$.fancybox.close()):(getOrderItemDetails(t),closeBsPopup())}function rejectLTEBB(e,t,a,n){$.ajax({type:"POST",url:"/account/reject/lte-buyback-repair",async:!1,cache:!1,dataType:"json",data:"orderItemId="+encodeURI(e)+"&pickupItemId="+encodeURI(t)+"&pickupType="+encodeURI(a),success:function(t){t.hasError||closeLteLBBPopup(n,e)}})}function getLteBBEstimate(e,t,a,n,i,o){var r="";return r+='<div class="col-xs-12">',"LBB"===n?(r+='<table border"0" width="100%">',r+="<tbody>",e.bbDiamondValue>0&&(r+="<tr>",r+='<td align="left"><strong>Diamond Value</strong></td>',r+='<td align="center">('+e.diamondWtInCarat+" Carat)</td>",r+='<td align="right">'+formatPrice(e.bbDiamondValue)+"</td>",r+="</tr>"),e.bbSolitaireValue>0&&(r+="<tr>",r+='<td align="left"><strong>Solitaire Value</strong></td>',r+="<td></td>",r+='<td align="right">'+formatPrice(e.bbSolitaireValue)+"</td>",r+="</tr>"),e.bbPresetSolitaireValue>0&&(r+="<tr>",r+='<td align="left"><strong>Preset Solitaire Value</strong></td>',r+="<td></td>",r+='<td align="right">'+formatPrice(e.bbPresetSolitaireValue)+"</td>",r+="</tr>"),e.bbStoneValue>0&&(r+="<tr>",r+='<td align="left"><strong>Stone Value</strong></td>',r+="<td></td>",r+='<td align="right">'+formatPrice(e.bbStoneValue)+"</td>",r+="</tr>"),e.metalValue>0&&(r+="<tr>",r+='<td align="left"><strong>
51Metal Value</strong></td>',r+='<td align="center">('+e.metalWtInGram+" Gram)</td>",r+='<td align="right">'+formatPrice(e.metalValue)+"</td>",r+="</tr>"),e.discountAmount>0&&(r+="<tr>",r+='<td align="left"><strong>Discount Value</strong></td>',r+="<td></td>",r+='<td align="right">- '+formatPrice(e.discountAmount)+"</td>",r+="</tr>"),e.bonusCreditAmount>0&&(r+="<tr>",r+='<td align="left"><strong>Signup Bonus</strong></td>',r+="<td></td>",r+='<td align="right">- '+formatPrice(e.bonusCreditAmount)+"</td>",r+="</tr>"),e.handlingCharges>0&&(r+="<tr>",r+='<td align="left"><strong>Handling Charges</strong></td>',r+="<td></td>",r+='<td align="right">- '+formatPrice(e.handlingCharges)+"</td>",r+="</tr>"),e.certificateCost>0&&(r+="<tr>",r+='<td align="left"><strong>Certificate Cost</strong></td>',r+="<td></td>",r+='<td align="right">- '+formatPrice(e.certificateCost)+"</td>",r+="</tr>"),r+='<tr class="total">',r+='<td align="left"><strong>Total Value</strong></td>',r+="<td></td>",r+='<td align="right" class="green-text">'+formatPrice(e.bbFinalValue)+"</td>",r+="</tr>",r+="</tbody>",r+="</table>",r+="<p>You stand to receive <strong>"+formatPrice(e.lteFinalValue)+" Blue Credits</strong> if you opt for <strong>Lifetime Exchange</strong> instead of Lifetime Buy-Back. Blue Credits can be used for a future jewellery purchase (cannot be used for solitaires and coins), they cannot be transferred to your bank account.</p>",r+='<p class="text-center"><input type="button" onClick="reConfirmLTEBB('+t+","+a+",'"+n+"','"+o+"',"+!1+');" value="Change to LifeTime Exchange" class="btn btn-narrow style2 order-item-lte-confirm"></p>',r+='<p class="text-center">Or</p>'):(r+='<table border"0" width="100%">',r+="<tbody>",e.lteDiamondValue>0&&(r+="<tr>",r+='<td align="left"><strong>Diamond Value</strong></td>',r+='<td align="center">('+e.diamondWtInCarat+" Carat)</td>",r+='<td align="right">'+formatPrice(e.lteDiamondValue)+"</td>",r+="</tr>"),e.lteSolitaireValue>0&&(r+="<tr>",r+='<td align="left"><strong>Solitaire Value</strong></td>',r+="<td></td>",r+='<td align="right">'+formatPrice(e.lteSolitaireValue)+"</td>",r+="</tr>"),e.ltePresetSolitaireValue>0&&(r+="<tr>",r+='<td align="left"><strong>Preset Solitaire Value</strong></td>',r+="<td></td>",r+='<td align="right">'+formatPrice(e.ltePresetSolitaireValue)+"</td>",r+="</tr>"),e.lteStoneValue>0&&(r+="<tr>",r+='<td align="left"><strong>Stone Value</strong></td>',r+="<td></td>",r+='<td align="right">'+formatPrice(e.lteStoneValue)+"</td>",r+="</tr>"),e.metalValue>0&&(r+="<tr>",r+='<td align="left"><strong>Metal Value</strong></td>',r+='<td align="center">('+e.metalWtInGram+" Gram)</td>",r+='<td align="right">'+formatPrice(e.metalValue)+"</td>",r+="</tr>"),e.discountAmount>0&&(r+="<tr>",r+='<td align="left"><strong>Discount Value</strong></td>',r+="<td></td>",r+='<td align="right">- '+formatPrice(e.discountAmount)+"</td>",r+="</tr>"),e.bonusCreditAmount>0&&(r+="<tr>",r+='<td align="left"><strong>Signup Bonus</strong></td>',r+="<td></td>",r+='<td align="right">- '+formatPrice(e.bonusCreditAmount)+"</td>",r+="</tr>"),e.handlingCharges>0&&(r+="<tr>",r+='<td align="left"><strong>Handling Charges</strong></td>',r+="<td></td>",r+='<td align="right">- '+formatPrice(e.handlingCharges)+"</td>",r+="</tr>"),e.certificateCost>0&&(r+="<tr>",r+='<td align="left"><strong>Certificate Cost</strong></td>',r+="<td></td>",r+='<td align="right">- '+formatPrice(e.certificateCost)+"</td>",r+="</tr>"),r+='<tr class="total">',r+='<td align="left"><strong>Total LTE Value</strong></td>',r+="<td></td>",r+='<td align="right" class="green-text">'+formatPrice(e.lteFinalValue)+"</td>",r+="</tr>",r+="</tbody>",r+="</table>"),r+='<div class="lte-initiate-button text-center">',"LBB"===n?(r+="<p>Do you want to continue with Lifetime BuyBack?</p>",i=!0):(r+="<p>Do you want to go for Lifetime Exchange?</p>",i=!1),r+='<input type="button" onClick="reConfirmLTEBB('+t+","+a+",'"+n+"','"+o+"',"+i+');" value="Yes" class="btn btn-narrow style2 order-item-lte-confirm">',r+='<input type="button" onClick="rejectLTEBB('+t+","+a+",'"+n+"','"+o+'\');" value="No" class="btn btn-gray btn-narrow style2 order-item-lte-reject">',r+="</div>",r+="</div>"}function closePopup(){"MOBILE"==deviceName?closeBsPopup():$.fancybox.close()}function updateTAHAppointment(e,t){e.preventDefault();var a="appointmentId="+t;$.ajax({type:"GET",url:GLOBAL_CTX+"/homeTryOn/update-appointment",async:!1,cache:!1,dataType:"json",data:a,success:function(e){e.hasError||(location.href=e.redirectUrl)}})}function showHideTAHItems(e,t){e.preventDefault(),$("#table_"+t).toggleClass("hidden")}function toastUI(e){return'<div id="snackbar" class="show">'+e+"</div>"}function slide(e,t,a,n){var i,o,r=0,s=0,l=t.getElementsByClassName("slide"),d=l.length,c=0,u=e.offsetWidth,p=l[0],m=l[d-1],v=p.cloneNode(!0),h=m.cloneNode(!0),g=0,f=!0,y=!1;
51function autoSlide(){var e=$("#slides").css("left");parseInt(e)%u===0?shiftSlide(1):(clearInterval(y),y=!1)}function handleSliderIndicatorChange(){$("#bs-slider-indicators-container").children().each(function(e){$(this).removeClass("bs-slider-indicator-active")}),$(".bs-slider-indicator-"+g).addClass("bs-slider-indicator-active")}function dragStart(e){e=e||window.event,"MOBILE"!=deviceName&&e.preventDefault(),i=t.offsetLeft,"touchstart"==e.type?r=e.touches[0].clientX:(r=e.clientX,document.onmouseup=dragEnd,document.onmousemove=dragAction)}function dragAction(e){"touchmove"==(e=e||window.event).type?(s=r-e.touches[0].clientX,r=e.touches[0].clientX):(s=r-e.clientX,r=e.clientX),t.style.left=t.offsetLeft-s+"px"}function dragEnd(e){(o=t.offsetLeft)-i<-100?shiftSlide(1,"drag"):o-i>100?shiftSlide(-1,"drag"):t.style.left=i+"px",document.onmouseup=null,document.onmousemove=null}function shiftSlide(e,a){t.classList.add("shifting"),f&&(a||(i=t.offsetLeft),1==e?(t.style.left=i-c+"px",g++):-1==e&&(t.style.left=i+c+"px",g--)),f=!1}function updateSlideSize(){Array.from(l).forEach(function(e,t){e.style.width=u+"px",e.className="slide slide-"+t,1===t&&(e.className="active slide slide-"+t)})}"NORMAL"==deviceName&&$(document).on({mouseenter:function(){clearInterval(y)},mouseleave:function(){y=setInterval(function(){autoSlide()},3e3)}},"#bs-slider"),t.appendChild(v),t.insertBefore(h,p),e.classList.add("loaded"),updateSlideSize(),c=t.getElementsByClassName("slide")[0].offsetWidth,t.onmousedown=dragStart,t.onmouseup=dragEnd,t.addEventListener("touchstart",dragStart),t.addEventListener("touchend",dragEnd),t.addEventListener("touchmove",dragAction),a.addEventListener("click",function(){shiftSlide(-1)}),n.addEventListener("click",function(){shiftSlide(1)}),d>1?(y=setInterval(function(){autoSlide()},3e3),handleSliderIndicatorChange()):$("#bs-slider-indicators-container").addClass("hidden"),t.addEventListener("transitionend",function checkIndex(){t.classList.remove("shifting"),-1==g&&(t.style.left=-d*c+"px",g=d-1);g==d&&(t.style.left=-1*c+"px",g=0);$(".slide").removeClass("active"),$(".slide-"+(g+1)).addClass("active"),!1===y&&(y=setInterval(function(){autoSlide()},3e3));handleSliderIndicatorChange(),f=!0}),window.addEventListener("resize",function(e){updateSlideSize()})}function handleSlideNavClick(e){var t=$(".slide.active").data("salename");trackGA("BsUI","Home page sale banner",e+" clicked on slide "+t)}function showTAHPopupAlert(e){if($("#tahAppointmentId").val(e),"MOBILE"==deviceName)openBsPopup("tahupdate");else{commonFancyBox({width:750,wrapCSS:"fancybox-style-4",href:"#tahUpdateAlert",resetPopup:function(){}})}}function alertTAHUpdate(e){updateTAHAppointment(e,$("#tahAppointmentId").val())}function addLoaderToBtn(e){$(".add-btn-loader").addClass("loading"),Boolean(getCookie("bsApp"))&&(isIOS?setDataForIOS("VC_schedule_app"):AndroidBridge.setData("VC_schedule_app"))}function accountDeactivateAndDelete(e,t,a){e>0?"deactivate"===a?alert("Account deactivation is not allowed as you have blue cash!"):"deletion"===a&&alert("Account deletion is not allowed as you have blue cash!"):window.location=t}function deActivateCustomer(){var e=$(".profile-modal #password").val(),t=$(".profile-modal #deactivate-keyword").val();e&&t?$.ajax({type:"POST",url:GLOBAL_CTX+"/account/identity/de-activate?password="+e+"&deActivateKeyword="+t,async:!1,dataType:"json",success:function(e){e.hasError?alert(e.errors[0]):(signOut(),alert("Your account is deactivated."),location.href=GLOBAL_CTX)},error:function(e){alert("Something went wrong. Please try later!")}}):alert("Please re-enter password or DEACTIVATE keyword")}function signOut(){$.ajax({type:"GET",url:GLOBAL_CTX+"/signout",async:!1,dataType:"json"})}function deleteCustomer(){var e=$(".profile-modal #password").val(),t=$(".profile-modal #delete-keyword").val();e&&t?$.ajax({type:"POST",url:GLOBAL_CTX+"/account/identity/delete?password="+e+"&deleteKeyword="+t,async:!1,dataType:"json",success:function(e){if(e.hasError)alert(e.errors[0]);else{signOut();alert("Your account has been marked for deletion. Your request will be actioned within 30 days."),location.href=GLOBAL_CTX}},error:function(e){alert("Something went wrong. Please try later!")}}):alert("Please re-enter password or DELETE keyword")}function gmsConfirmationPopup(){$.fancybox({width:600,wrapCSS:"fancybox-style-4",href:"#conformationPopup",helpers:{overlay:{closeClick:!1}},closeBtn:!0,autoSize:!1})}function checkIfUserConfirmedRedeem(e){if("redeem"===$("#redeemConfirmationUserInput").val().toLowerCase()){$.fancybox.close();$.fancybox({width:600,wrapCSS:"fancybox-style-1",href:"#redeemPopup",helpers:{overlay:{closeClick:!0}},closeBtn:!0,autoSize:!1}
51),$(".invalid-otp-code").addClass("hidden");var t=$(".scheme-num").text();$.ajax({type:"POST",url:GLOBAL_CTX+"/account/goldmine/send-redeem-otp",async:!1,cache:!1,dataType:"json",data:"code="+t,success:function(t){$(e.target).hasClass("resend-otp")&&($(e.target).addClass("hidden"),$(".otp-resent").removeClass("hidden"),setTimeout(function(){$(e.target).removeClass("hidden"),$(".otp-resent").addClass("hidden")},6e3))},error:function(t){$(e.target).hasClass("resend-otp")&&($(".otp-resent").addClass("hidden"),$(e.target).removeClass("hidden"))}})}}function handleRedeemUserInput(e){"redeem"===e.target.value.toLowerCase()?($("#redeemConfirmationButton").attr("disabled",!1),$("#redeemConfirmationButton").removeClass("btn-gray")):($("#redeemConfirmationButton").attr("disabled",!0),$("#redeemConfirmationButton").addClass("btn-gray"))}function addCustomHeader(e){var t=$("input[name='_ergh']").attr("value"),a=$("input[name='_fhtk']").attr("value");e.setRequestHeader(a,t)}function handleSliderOpen(){$(".mobile-bottom-slider").toggleClass("close"),$(".mobile-bottom-slider-overlay").toggleClass("close"),$("body").addClass("popup-active"),$("#fc_frame").length>0&&$("#fc_frame").addClass("hidden")}function handleSliderClose(){$(".mobile-bottom-slider").toggleClass("close"),$(".mobile-bottom-slider-overlay").toggleClass("close"),$("body").removeClass("popup-active"),$("#fc_frame").length>0&&$("#fc_frame").removeClass("hidden")}function handleRedeemConfirmInputMobile(e){"redeem"===e.target.value.toLowerCase()?($("#redeemConfirmBtnMobile").attr("href","#mWredeem"),$("#redeemConfirmBtnMobile").removeClass("gray")):($("#redeemConfirmBtnMobile").attr("href","javascript:void(0)"),$("#redeemConfirmBtnMobile").addClass("gray"))}function setLocalStorageWithExpiry(e,t,a){const n={value:t,expiry:(new Date).getTime()+24*a*60*60*1e3};localStorage.setItem(e,JSON.stringify(n))}function getLocalStorageWithExpiry(e){const t=localStorage.getItem(e);if(!t)return null;const a=JSON.parse(t);return(new Date).getTime()>a.expiry?(localStorage.removeItem(e),null):a.value}function loginForDeletion(e){e.preventDefault(),$("#acc-del-login").addClass("loading");var t=accountDeletionLogin({email:$("#del-email-id").val().toLowerCase(),password:$("#del-password").val()});if(t.hasError)$("#acc-del-form #popup-messages").html('<div class="error-container"><div class="error-container-inner">'+t.message+"</div><div>").show(),$("#acc-del-login").removeClass("loading");else if(t.bsCash>0)alert("Account deactivation is not allowed as you have blue cash!");else{var a=GLOBAL_CTX+"/account/identity/customer-deletion";window.location=a}}function accountDeletionLogin(e){var t={};return $.ajax({type:"POST",url:GLOBAL_CTX+"/account-deletion-login",async:!1,cache:!1,dataType:"json",data:"email="+e.email+"&passwordStr="+e.password,success:function(e){t=e},error:function(e){t=e}}),t}function getEnhancedSearchHTML(e,t,a){var n="";if(t&&t.list&&t.list.length>0){t.trendingTitle&&(n+="<h3>"+t.trendingTitle+"</h3>"),n+='<div class="trending-items items">';for(var i=0;i<t.list.length;i++)n+='<div class="item">',n+='<a href="'+t.list[i].url+"\" onclick=\"trackGA('BsUI','"+window.location.href+"','Clicked "+t.list[i].name+"')\">"+t.list[i].name+"</a>",n+="</div>";n+="</div>"}if(e&&e.list&&e.list.length>0){e.productTitle&&(n+="<h3>"+e.productTitle+"</h3>"),n+='<div class="bs-row items">';for(i=0;i<e.list.length;i++)n+='<div class="item">',n+='<a href="'+e.list[i].url+"\" onclick=\"trackGA('BsUI','"+window.location.href+"','Clicked "+e.list[i].name+'\')"><img src="'+e.list[i].image+'" class="img-responsive" width="100%" />',n+="<caption>"+e.list[i].name+"</caption></a>",n+="</div>";n+="</div>"}return a&&("MOBILE"==deviceName?(n+='<div class="img-search">',n+="<div class=\"img-search-trigger\" onclick=\"openImageSearchOption(event);trackGA('BsUI','"+window.location.href+"','Clicked Image Search')\"><img src=\""+GLOBAL_CTX+'/resources/themes/bluestone/images/new/static/image-search-camera.png" class="icon" alt="IMAGE-SEARCH-ICON"  /> Search designs by images</div>',n+='<div id="searchbox_image_search" class="img-search-option hidden">',n+='<div class="file-upload">',n+='<input type="file" id="image_search_file" class="img-upload" name="file" value="Upload Image" style="">',n+='<span id="image-search-error" class="hidden"></span>',n+='<button type="button" onclick="handleImageSearch()">Search</button>',n+="</div>",n+="</div>",n+="</div>"):(n+='<div class="img-search">',n+="<div class=\"img-search-trigger\" onclick=\"openImageSearchOption(event);trackGA('BsUI','"+window.location.href+"','Clicked Image Search')\"><img src=\""+GLOBAL_CTX+'/resources/themes/bluestone/images/new/static/image-search-camera.png" class="icon" alt="IMAGE-SEARCH-ICON"  /> Search designs by images</div>',n+='<div id="searchbox_image_search" class="img-search-option hidden">',n+='<div class="file-upload">',n+='<input type="file" id="image_search_file" class="img-upload" name="file" value="Upload Image" style="">',n+='<span id="image-search-error" class="hidden"></span>',n+='<button type="button" onclick="handleImageSearch()" class="btn btn-flat">Search</button>',n+="</div>",n+="</div>",n+="</div>")),n}function openImageSearchOption(e){$(e.target).parents(".img-search").find(".img-search-trigger").addClass("hidden"),$(e.target).parents(".img-search").find(".img-search-option").addClass("active-img-wdg"),$(e.target).parents(".img-search").find(".img-search-option").removeClass("hidden")}function getStoreCount(){var e="";return $.ajax({type:"GET",url:GLOBAL_CTX+"/store/physical-stores-count",async:!1,cache:!1,dataType:"json",success:function(t){e=t.numberOfStores},error:function(e){}}),e}function handleGMSAutoPopulateCityAndStateByPincode(e){var t=getCityStateByPincode(e.target.value),a=JSON.parse(t.responseText);a.hasError?handleErrorForGMSAutoPopulatePincode():a.isPincodeValid?($("#postcode_delivery").parent().removeClass("error"),$("#postcode_delivery_error").remove(),$("#edit-city-wrapper #cityName").val(a.city),$("#edit-state-wrapper #state_gms").val(a.id_state),$("#state_gms").parent().removeClass("error"),$("#state_gms").parent().addClass("auto-filled"),$("#state_gms_error").remove(),$("#cityName").parent().removeClass("error"),$("#cityName").parent().addClass("auto-filled"),$("#cityName_error").remove()):handleErrorForGMSAutoPopulatePincode()}function handleErrorForGMSAutoPopulatePincode(){if($("#edit-city-wrapper #cityName").val(""),$("#edit-state-wrapper #state_gms").val(""),0===$("#postcode_delivery_error").length){var e=$
51("#postcode_delivery");e.parent().addClass("focused"),e.parent().addClass("error"),e.parent().append('<ul id="postcode_delivery_error" class="messages"><li>Enter Valid Pincode</li></ul>')}}function showMoreSlots(e){var t=document.querySelector("#book-appointment .date-time"),a=0;"more"==e?(a=t.scrollWidth-t.clientWidth,setTimeout(function(){$(".show-less-slots").removeClass("hidden")},200)):"less"==e&&$(".show-less-slots").addClass("hidden"),t.scroll({left:a,behavior:"smooth"})}function submitTAHForm(e){var t=$("#try_pin_pd").val();if(t&&getCityStateByPincode(t,"#tahCityAndState"),validateForm("address-form-tah")){var a=$("#try_mobile_pd").val().toLowerCase(),n=$("#cartId").val();$(".add-btn-loader").addClass("loading");var i=otpUtilNew.sendOTP(e,"tah",null,n,a,null);i.hasError?($("#generateOtpError #error-message").text(i.errorMsg||i.message),$("#generateOtpError").removeClass("hidden"),setTimeout(function(){$(".add-btn-loader").removeClass("loading")},2e4)):($("#generateOtpError").addClass("hidden"),$(".add-btn-loader").removeClass("loading"),$("#otp-id").val(i.otpId),document.getElementById("enterMobileText").innerHTML="Enter OTP sent to the mobile number: "+a,openOtpPopup())}}function verifyTahOTP(e){var t=$("#otp-code").val()||"";if(validateForm("tahOTPForm"))if(otpUtilNew.verifyOTP(t).hasError){$("#otp-code_error").remove(),$("#tahOTPForm .fl-wrap label").addClass("hidden");var a=$("#otp-code");a.parent().addClass("focused"),a.parent().addClass("error"),a.parent().append('<ul id="otp-code_error" class="messages"><li> OTP verification failed! </li></ul>')}else $("#tahOTPForm .fl-wrap label").removeClass("hidden"),$("#otp-code_error").remove(),$("#address-form-tah").submit()}function reSendTahOTP(e,t){var a=$("#try_mobile_pd").val().toLowerCase()||"",n=$("#cartId").val();otpId=$("#otp-id").val();var i=otpUtilNew.resendOTP(e,"tah",null,n,a,null,t,function(){var t=$(e.target).closest("#tah-resend-container");t.length&&"function"==typeof startOTPTimer&&startOTPTimer(t,30)});i.hasError&&($("#resend-error #error-message").text(i.errorMsg),$("#resend-error").removeClass("hidden"))}function validateFileForImageSearch(e){if(!e)return $("#image-search-error").removeClass("hidden"),$("#image-search-error").html("Please select a file"),!1;var t=e.name.toLowerCase().substring(e.name.lastIndexOf("."));return[".jpg",".jpeg",".png",".heic",".heif"].includes(t)?!(e.size>10485760)||($("#image-search-error").removeClass("hidden"),$("#image-search-error").html("File size exceeds the maximum limit (10MB). Please select a smaller file."),!1):($("#image-search-error").removeClass("hidden"),$("#image-search-error").html("Unsupported file extension. Please select a file with .jpg, .jpeg, .png, .heic or .heif extension."),!1)}function reloadTotalStoneCountAndWeight(){var e=$("td.totalnoofdiamonds"),t=0;if($.each(e,function(e,a){var n=$(a).html().split(" ")[0];t=Number(t)+Number(n)}),Number(t)>0){const e=document.querySelector(".detail-with-diamond .t-d-d.last");null!=e&&(e.innerHTML="Total No. Of Diamonds <span>"+t.toFixed(0)+"</span>")}var a=$("td:contains('carats')"),n=0;if($.each(a,function(e,t){var a=$(t).html().split(" ")[0];n=Number(n)+Number(a)}),Number(n)>0){var i=document.getElementById("pptotaldmdwt");null!=i&&(i.innerHTML=n.toFixed(3)+" Ct")}}function showManufacturedData(){$(".manufacturing-data.hidden").length>0?$(".manufacturing-data").removeClass("hidden"):$(".manufacturing-data").addClass("hidden")}function scProcessCityNameForURL(e){return e.trim().replaceAll(" ","-").toLowerCase()}function scProcessStoreNameForURL(e){return e.split(",")[0].trim().replaceAll(" ","-").toLowerCase()}function applyCouponFromList(e){$("#discountCode").val(e),$("#applyCartVoucher").trigger("click")}function showDiscountVoucherPopup(){if("MOBILE"!=deviceName){commonFancyBox({width:500,wrapCSS:"fancybox-style-4",href:"#voucherPopupCart",resetPopup:function(){$(".formError").css("display","none")},afterLoad:function(){$(".voucher-popup-container .fl-wrap").removeClass("auto-filled")}})}else $(".bs-popup-overlay").show(),$(".voucher-popup-container .fl-wrap").removeClass("auto-filled"),$("body").addClass("popup-active"),$(".voucher-popup-container").show()}function confirmGMSValidityExtension(){if("MOBILE"!=deviceName){commonFancyBox({width:400,wrapCSS:"gms-extension-fancybox-popup",href:"#gmsVoucherExtensionPopUp"})}else $(".bs-popup-overlay").show(),$("body").addClass("popup-active"),$("#gmsVoucherValidityPopup").show()}function handleViewTBVCouponsClick(e,t){$(".tbv-details-each .tbv-voucher-card-detail
51s").each(function(e){e===parseInt(t)?($(this).closest(".tbv-details-each").find(".tbv-card").toggleClass("hidden"),$(this).closest(".tbv-details-each").find(".tbv-voucher-card-details").toggleClass("hidden")):($(this).closest(".tbv-details-each").find(".tbv-card").removeClass("hidden"),$(this).closest(".tbv-details-each").find(".tbv-voucher-card-details").addClass("hidden"))});var a=e.target.closest(".tbv-details-each").querySelector(".tbv-voucher-milestone-achieved");a.style.width="0%",setTimeout(function(){var e=a.dataset.milestonepercentage;a.style.width=e+"%"},500)}function sanitizeInput(e,t){let a;if(e){try{switch(t){case"email":const t=/^[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9+\/_-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/;if(a=e.trim(),!t.test(a))throw new Error("Invalid email format");break;case"text":a=e.replace(/^[a-zA-Z\s]+$/g,"").trim();break;case"planid":a=e.replace(/^[a-zA-Z0-9-\s]+$/g,"").trim();break;case"number":if(a=e.replace(/[^0-9.]/g,"").trim(),isNaN(a)||""===a)throw new Error("Invalid number format");break;default:throw new Error("Unsupported input type")}}catch(e){}return a}}function getClosestParent(e,t){let a=e;for(;a.parentElement;)if(a=a.parentElement,a.matches(t))return a;return null}function parsePrice(e){if(!e)return"";const t=e.toString().replace(/Rs\s*\.?\s*/gi,"").match(/[\d.]+/g),a=t?t.join(""):"";return a?Number(a):""}function showContent(e,t,a,n,i="i-content"){let o,r,s="";const l=n.currentTarget.closest(`.${i}`);l.classList.contains("hidden")||(o=l.querySelectorAll(`.${e}`),r=l.querySelector(`#${a}`),s=l.querySelectorAll(`.${t}`));const d=n.currentTarget,c=n.currentTarget.querySelector(".icon"),u=d.classList.contains("active");o.forEach(e=>{e.classList.remove("active"),e.querySelector(".icon")&&e.querySelector(".icon").classList.replace("icon-minus","icon-plus")}),s.forEach(e=>{e.classList.remove("active"),e.style.maxHeight=null}),c&&c.classList.replace("icon-minus","icon-plus"),u||(d.classList.add("active"),r.classList.add("active"),c&&c.classList.replace("icon-plus","icon-minus"),r.style.maxHeight=r.scrollHeight+"px")}function showSection(e,t=!0){const a=document.querySelector(".menu-section"),n=document.querySelector(".breadcrumb-section");document.querySelectorAll(".c-menu-item").forEach(t=>{t.classList.contains("disabled")||(t.classList.remove("active"),t.getAttribute("data-section")===e&&t.classList.add("active"))}),document.querySelectorAll(".i-content").forEach(e=>{e.classList.add("hidden"),"MOBILE"===deviceName&&(n.classList.add("hidden"),a.classList.remove("hide"),a.style.maxHeight=a.scrollHeight+"px")});const i=document.getElementById(e);i&&(i.classList.remove("hidden"),"MOBILE"===deviceName&&(n.classList.remove("hidden"),a.classList.add("hide"),a.style.maxHeight=null),t&&history.pushState(null,"",`#${e}`))}function smoothIRScroll(){const e=window.location.hash.substring(1),t=$("#pageScrollTo");if(t.length&&e){const e=t.position().top;window.scroll({top:e-50,behavior:"smooth"})}}function acceptDisclaimer(e){const t=$(e.target),a=t.data("pdflink"),n=t.data("posterlink"),i=t.hasClass("video");closeDisclaimer(),sessionStorage.setItem("irdisclaimer","true"),openDataInNewTab({pdfLink:a,posterLink:n,isVidLink:i})}$(document).ready(function(){if("viewCart"===execution_step&&($("#applyCartVoucher").on("click",function(e){const t=$("#discountCode").val(),a=$("#cartIdValue").val();if(applyVoucherEvent("coupon",t),""!==t){const o=otpUtilNew.sendOTP(e,OTP_TYPE.VOUCHER,t,a);if(o.hasError)$("#voucher-message.send-otp-error .v-msg span").html(o.errorMsg),$("#voucher-message.send-otp-error").css("display","block");else if("MOBILE"!=deviceName?$.fancybox.close():closeWalletPopup(),o.isOtpSent)o.isDigiVoucher&&(isDigiVoucher=!0),utilityFuncForOTP.addMaskedNumber(o.customerPhone),utilityFuncForOTP.showOTPPopup();else if(o.isGiftCard){resetGiftCardPopup();var n=getProductIdsForGCApplication(),i=giftCardUtil.getGiftCardProperties(e,t,n);i.hasError?($("#voucher-message.send-otp-error .v-msg span").html(i.message),$("#voucher-message.send-otp-error").css("display","block")):i.isGiftCard&&openGiftCardPopup(i)}else $("#voucher").submit()}}),$("#verifyBsWalletOTP").on("submit",function(e){e.preventDefault();var t=$("#otp").val(),n=otpUtilNew.verifyOTP(t,a);n.isOtpVerified?isDigiVoucher?$("#verifyOTPOrPinForGC").submit():$("#voucher").submit():utilityFuncForOTP.showOtpErrorMessage("#bsWalletOTPPopup",
51n.errorMsg)}),$("#verifyOTPOrPinForGC").on("submit",function(e){if(e.preventDefault(),!validateForm("verifyOTPOrPinForGC"))return!1;var t=$("#pin").val(),a=$("#totalGCPayable").val().replace(/,/g,""),n=$("#discountCode").val(),i=$("#phoneNumber").val(),o="TRUE"===isCaptchaEnabled?mtcaptcha.getVerifiedToken():"",r=giftCardUtil.validateAndRedeemGC(o,a,n,t,i,"");r.hasError?isDigiVoucher?utilityFuncForOTP.showOtpErrorMessage("#bsWalletOTPPopup",r.message):utilityFuncForOTP.showOtpErrorMessage("#giftCardPopup",r.message):$("#voucher").submit()}),$("#resendOtp").on("click",function(e){var t=$("#discountCode").val();otpUtilNew.resendOTP(e,OTP_TYPE.VOUCHER,t,a)})),"checkoutPaymentDetails"===execution_step){var e=!1,t="",a=$("#cartId").val();$("#bscash, #bscredit").on("change",function(n){if("bscash"===n.target.id?t="bscash":"bscredit"===n.target.id&&(t="bscredit"),$(this).is(":checked")){var i="";"bscash"===n.target.id?(i=otpUtilNew.sendOTP(n,OTP_TYPE.BSCASH,"",a),otpSendEvent("bscash",!0)):"bscredit"===n.target.id&&(i=otpUtilNew.sendOTP(n,OTP_TYPE.BSCREDIT,"",a),otpSendEvent("bscredit",!0)),i.hasError?($("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+i.errorMsg+"</div><div>"),$("#popup-messages").show()):i.isOtpSent&&(utilityFuncForOTP.addMaskedNumber(i.customerPhone),utilityFuncForOTP.showOTPPopup(e,t))}else $("#isOtpVerifiedFlag").val(!1),"bscash"===n.target.id?$("#bsCashOTPVerified").submit():"bscredit"===n.target.id&&$("#bsCreditOTPVerified").submit()}),$("#verifyBsWalletOTP").on("submit",function(a){a.preventDefault();var n=$("#otp").val(),i=otpUtilNew.verifyOTP(n);(e=!!i.isOtpVerified)&&otpEnteredOnPayment(a),function handleCheckoutChanges(e,t){e.hasError?(utilityFuncForOTP.showOtpErrorMessage("#bsWalletOTPPopup",e.errorMsg),$("#confirmOrder").addClass("hidden"),$("#ewallet-btn").addClass("hidden"),$("#giftCardBsCasCreditOTP").removeClass("hidden")):e.isOtpVerified?(createCookie("continueWithBSWallet",!0),"MOBILE"===deviceName?window.history.back():$.fancybox.close(),$("#confirmOrder").removeClass("hidden"),$("#ewallet-btn").removeClass("hidden"),$("#giftCardBsCasCreditOTP").addClass("hidden"),$("#isOtpVerifiedFlag").val(!0),"bscash"===t?$("#bsCashOTPVerified").submit():"bscredit"===t&&$("#bsCreditOTPVerified").submit(),$(".invalid-otp-code").addClass("hidden")):(utilityFuncForOTP.showOtpErrorMessage("#bsWalletOTPPopup",e.errorMsg),$("#confirmOrder").addClass("hidden"),$("#ewallet-btn").addClass("hidden"),$("#giftCardBsCasCreditOTP").removeClass("hidden"))}(i,t)}),$("#resendOtp").on("click",function(e){"bscash"===t?otpUtilNew.resendOTP(e,OTP_TYPE.BSCASH,"",a):"bscredit"===t&&otpUtilNew.resendOTP(e,OTP_TYPE.BSCREDIT,"",a)})}if("franchise"!==PAGE_TYPE&&"try-at-home"!==PAGE_TYPE||setTimeout(function(){v2.Form.prototype.scrollToFirstWhenFail=!1},3e3),$("body").on("click",".tahPin-tooltip",function(e){$(".tahPin-tooltip").remove()}),"checkoutFlowAddressDetails"===execution_step){var n=$("#gstNo").val();n&&15===n.length&&($("#isSameAddress").trigger("click"),$("#isSameAddress").attr("disabled","disabled"),$("#billing-address-form").show(),$(".add-billing-address").addClass("disabled")),$("#postcode_delivery").val(""),$("#cityName_delivery").val(""),$("#stateId_delivery").val(""),$("#postcode_delivery").parent().removeClass("auto-filled"),$("#cityName_delivery").parent().removeClass("auto-filled"),$("#stateId_delivery").parent().removeClass("auto-filled")}$("#searchbox_elastic_search").on("submit",function(){var e=parseParams($("#searchbox_elastic_search").serialize());processServerEvent(e),sessionStorage.setItem("searchTriggered","true")}),$("#pincodeValidation").submit(function(e){e.preventDefault;var t=$(e.target).find("#userPincode").val(),a=$("#totalCartCount").val(),n=!validateForm("pincodeValidation");if(PincodeEnteredEvent(e,t,n),n)return!1;getEDDOnShipping(e,t,a),updateCityStateByPincode()}),$("#extendGmsValidity").on("click",function(e){e.preventDefault();var t=extendGMSVoucherValidity($("#gmsVoucherName").val()),a="";a="MOBILE"!=deviceName?"#gmsVoucherExtensionPopUp":"#gmsVoucherValidityPopup",t.hasError?utilityFuncForOTP.showOtpErrorMessage(
51a,t.message):(utilityFuncForOTP.showOtpSuccessMessage(a,t.message),setTimeout(function(){location.reload()},1e3))})}),$(document).ready(function(){if("home"==PAGE_TYPE){var e=document.getElementById("bs-slider"),t=document.getElementById("slides"),a=document.getElementById("bs-slider-prev"),n=document.getElementById("bs-slider-next");null!=e&&null!=t&&null!=a&&null!=n&&slide(e,t,a,n)}}),$(document).ready(function(){v2.Field.prototype.successClass="success",v2.Field.prototype.instant=!0,v2.Field.prototype.displayErrors=1,v2.Field.prototype.positionErrorsAbove=!1,v2.Fieldset.prototype.positionErrorsAbove=!1,v2.Form.prototype.scrollToFirstWhenFail=!0,v2.Object.extend(v2.Form.prototype,{scrollToFirstWhenFail:!0,onFailure:function(){if(this.scrollToFirstWhenFail){var e,t,a,n=this.__form;for(a=n.all||n.getElementsByTagName("*"),e=0;t=a[e];e++)if(v2.Element.visible(t)&&v2.Element.hasClassName(t,v2.ErrorReporting.failureClass))return void("MOBILE"==deviceName?window.scrollTo(0,t.offsetTop-60):window.scrollTo(0,t.offsetTop))}}})}),$(document).ready(function(){$(".numeric-check").on("keypress",function(e){return e.charCode>=48&&e.charCode<=57})}),$(document).ready(function(){"try-at-home"===PAGE_TYPE&&(getCookie("pincode")&&getLocalStorageWithExpiry("isPincodeUpdated")&&$("#pincode").val(getCookie("pincode")),$("#pincodeSubmit").click(function(e){if(e.preventDefault(),!validateForm("tahPagePincodeForm"))return!1;var t=$("#pincode");trackGA("BsUI",$("#pincode").val(),"TAH button clicked"),t.parent().removeClass("focused"),t.parent().removeClass("error"),$("#pincode_error").remove();var a=fetchStoreAndTahHub($("#pincode").val()),n=JSON.parse(a.responseText);return n&&"Invalid Pincode"===n.message?(t.parent().removeClass("success"),t.parent().addClass("focused"),t.parent().addClass("error"),void t.parent().append('<ul id="pincode_error" class="messages"><li>Enter Valid Pincode</li></ul>')):n&&n.hasTAH&&n.wid?void(window.location.href=GLOBAL_CTX+"/jewellery.html?wid="+encodeURIComponent(n.wid)):(t.parent().removeClass("success"),t.parent().addClass("focused"),t.parent().addClass("error"),void t.parent().append('<ul id="pincode_error" class="messages"><li>TAH Not Available</li></ul>'))}),tahCartCount&&tahCartCount>0?($("#tahCartMessage").html(tahCartCount+"/"+tahMaxDesigns+" design(s) in trial cart"),document.querySelector("#tahCartMessage")&&(document.querySelector("#tahCartMessage").dataset.tahcartcount=tahCartCount),$(".tah-sticky-wrapper").removeClass("hidden")):($("#tahCartMessage").html(""),document.querySelector("#tahCartMessage")&&(document.querySelector("#tahCartMessage").dataset.tahcartcount=0),$(".tah-sticky-wrapper").addClass("hidden")),$(".tah-sticky-wrapper .icon-close").on("click",function(){$(".tah-sticky-wrapper").addClass("hidden")}))}),$(document).ready(function(){"bookDateAndTimeSlot"==execution_step&&($("ul.hto-date-time .pick-time").click(function(){$(".try_date_pd").val($(this).parents(".pick-date-time").data("date")),$(".try_time_pd").val($(this).data("time")),$(".pick-date-time,.pick-time").removeClass("selected"),$(this).parents(".pick-date-time").addClass("selected"),$(this).addClass("selected"),$(".tah-images").addClass("hidden"),selectedDate=$(this).parents(".pick-date-time").data("date"),$("#available-product_"+selectedDate).removeClass("hidden");
51var e=$(this).parents(".pick-date-time").data("productcount"),t='<span id="availableProductCount">'+e+"</span> Available design(s) for the selected date";e<=0?($("#availableProductCount").html(""),$("#tahNextBtn").addClass("btn-disabled"),$("#tahNextBtn").css("pointer-events","none"),$(".tah-items .title").addClass("orange-color").html("No designs available for this slot.")):($("#availableProductCount").html(e),$("#tahNextBtn").removeClass("btn-disabled"),$("#tahNextBtn").css("pointer-events","auto"),$(".tah-items .title").removeClass("orange-color").html(t))}),v2.Form.prototype.scrollToFirstWhenFail=!1)}),$(document).ready(function(){$("div.blue-voucher-tab").on("click",function(){$(".blue-content").toggleClass("hidden")}),$("#block-true-blue .tbv-voucher-tnc").on("click",function(){window.location.href="/tnc.html"})}),pincodeUtil={validatePincode:function validatePincode(e){return/^([123456789]{1})([0-9]{5})$/.test(e)},updatePincode:function updatePincode(e,t){var a=null;return $.ajax({async:t,cache:!1,type:"POST",url:GLOBAL_CTX+"/address/pincode",data:e,dataType:"json",success:function(e){a=e},error:function(e){a=e}}),a},getNearestStoresForPincode:function getNearestStoresForPincode(e){return $.ajax({async:!1,cache:!1,type:"GET",url:GLOBAL_CTX+"/physical-store/nearest-stores",data:e,dataType:"json"})}},$(document).ready(function(){"investor-relations"===PAGE_TYPE&&(document.querySelectorAll(".c-menu-item").forEach(e=>{e.classList.contains("disabled")||e.addEventListener("click",t=>{t.preventDefault();showSection(e.getAttribute("data-section")),smoothIRScroll()})}),window.addEventListener("load",()=>{const e=window.location.hash.substring(1);e&&showSection(e,!1)}),window.addEventListener("hashchange",()=>{const e=window.location.hash.substring(1),t=document.querySelector(".menu-section"),a=document.querySelector(".breadcrumb-section");document.querySelector(".i-content");e?showSection(e,!1):"MOBILE"===deviceName&&(a.classList.add("hidden"),t.classList.remove("hide"),t.style.maxHeight=t.scrollHeight+"px",document.querySelectorAll(".i-content").forEach(e=>{e.classList.add("hidden")}))}),"MOBILE"===deviceName&&document.querySelector(".breadcrumb-section .home").addEventListener("click",()=>{window.location.hash.substring(1)&&history.back()}),smoothIRScroll(),$(".disclaimer-trigger").on("click",function(e){e.preventDefault(),e.stopPropagation();const t=$(e.currentTarget),a=t.data("pdflink"),n=t.data("posterlink"),i=t.data("itemname"),o=t.hasClass("video"),r=t.hasClass("no-disclaimer");if("true"==sessionStorage.getItem("irdisclaimer")||r)openDataInNewTab({pdfLink:a,posterLink:n,isVidLink:o,itemName:i});else if("MOBILE"===deviceName)openBsPopup("disclaimer-"+i);else{var s={width:750,wrapCSS:"fancybox-style-disclaimer",href:"#iDisclaimer"+i.toUpperCase()+"Popup",afterLoad:function(){$("body").addClass("popup-active")}};commonFancyBox(s)}}))});let newTab=null;function openDataInNewTab(e){if(e.isVidLink){const t=videoTabHtml({pdfLink:e.pdfLink,posterLink:e.posterLink});let a={_eventId:"video_disclaimer_confirmed"};a.disclaimer_name=e.itemName,processServerEvent(a),newTab&&!newTab.closed||(newTab=window.open()),newTab.document.open(),newTab.document.write(t),newTab.document.close()}else if(e.pdfLink){let t={_eventId:"pdf_disclaimer_confirmed"};t.disclaimer_name=e.itemName,processServerEvent(t),window.open(e.pdfLink,"_blank")}}function videoTabHtml(e){let t="";return t+="<!DOCTYPE html>",t+='<html lang="en">',t+="<head>",t+='<meta charset="UTF-8">',t+='<meta name="viewport" content="width=device-width, initial-scale=1.0">',t+="<title>Video</title>",t+="</head>",t+="<body>",t+='<video controls autoplay controlslist="nodownload" style="width:100%" poster="'+e.posterLink+'">',t+='<source src="'+e.pdfLink+'" type="video/mp4">',t+="Your browser does not support the video tag.",t+="</video>",t+="</body>",t+="</html>",t}function closeDisclaimer(){closePopup(),"MOBILE"===deviceName&&closeBsPopup()}function redirectToGoldMinePage(){$.ajax({type:"GET",url:GLOBAL_CTX+"/customer/gms/exists",dataType:"json",success:function(e){var t=!0===e.exists?GLOBAL_CTX+"/account/goldminehistory":GLOBAL_CTX+"/goldm
51ine.html";window.location.href=t},error:function(e){window.location.href=GLOBAL_CTX+"/goldmine.html"}})}function redirectToGoldReservePage(){window.location.href=GLOBAL_CTX+"/account/goldreservehistory"}var razorpay_key="",autoClickedRazorpay=!1,paymentTransactionInProgress=!1;function startPaymentVerificationPollingWhenReady(){if(window.paymentVerificationPollingStarted)return;const e=$("#paymentTxnId").val(),t=$("#flowExecUrl").val();if("paymentVerificationState"===execution_step&&e&&t)if("function"==typeof verifyPayment&&"function"==typeof startCountdown){window.paymentVerificationPollingStarted=!0;try{verifyPayment(!1),startCountdown()}catch(e){window.paymentVerificationPollingStarted=!1,setTimeout(startPaymentVerificationPollingWhenReady,1e3)}}else setTimeout(startPaymentVerificationPollingWhenReady,100)}window.startPaymentVerificationPollingWhenReady=startPaymentVerificationPollingWhenReady,window.paymentVerificationPollingRequested&&setTimeout(startPaymentVerificationPollingWhenReady,0),$(document).ready(function(){(resetPaymentLoadingState(),showPaymentCartRefreshMessage(),startPaymentVerificationPollingWhenReady(),"newPaymentDetails"==execution_step)&&(razorpay_key=$(".rzp_key").val(),new Razorpay({key:razorpay_key}).once("ready",function(e){var t=getBankNameHTML(e.methods.netbanking);$(".bank-list").html(t)}));"newPaymentSuccessState"==execution_step&&setTimeout(()=>{$("#order-summary-redirect-form").submit()},3e3);var e=document.getElementById.bind(document);if(e("card-addition-form")){const t=Razorpay?.setFormatter(e("card-addition-form"))||"",a=["visa","mastercard","maestro","rupay","jcb"],n=$(".card-number"),i=$(".card-type"),o=$(".card-error"),r=$(".card-title"),s=$(e("cvv-card"));let l="";const updateTypeUI=e=>{i.attr("class","card-type").text(""),e&&a.includes(e)?i.addClass(e).attr("data-cardtype",e):i.text(e||"")};t.add("card",e("card-number")).on("change",function(){const e=this.isValid(),t=this.el.value.replace(/\s+/g,"").length===this.maxLen;i.removeClass("hidden"),o.addClass("hidden"),n.removeClass("error valid"),r.removeClass("hidden"),t&&!e?(o.removeClass("hidden"),n.addClass("error"),n.removeClass("valid"),r.addClass("hidden"),updateTypeUI("")):e&&(n.addClass("valid"),updateTypeUI(l))}).on("network",function(){l=this.type,updateTypeUI(l);const e="amex"===l?4:3;s.attr({maxlength:e,pattern:`^[0-9]{${e}}$`})}),t.add("expiry",e("expiry-date")).on("change",function(){var e=this.isValid();7!==this.el.value.length||e?7===this.el.value.length&&e&&($(".date-error").addClass("hidden"),$(".date-title").removeClass("hidden"),$("#expiry-date").removeClass("invalid")):($(".date-error").removeClass("hidden"),$(".date-title").addClass("hidden"),$("#expiry-date").addClass("invalid"))})}$(".option").change(function(){const e=$(".option").length===$(".option:checked").length;"blueCash"===$(this).attr("id")?($(".page-loader").removeClass("hidden"),$("#bsCashSelected").submit()):"blueCredits"===$(this).attr("id")&&($(".page-loader").removeClass("hidden"),$("#bsCreditSelected").submit()),$("#selectAll").prop("checked",e)}),$(".bank-search").on("input",function(){let e=$(this).val().toLowerCase();$(".all-banks-section .bank").each(function(){let t=$(this).data("name").toLowerCase();$(this).toggle(t.includes(e))})}),$(".credits-info").click(function(){$(".info-text").toggleClass("show-info-popup")}),$("#selectAll").change(function(){const e=$(this).prop("checked");$(".option").prop("checked",e),$(".page-loader").removeClass("hidden"),$("#selectAllChecked").submit()}),$(".card-number, .exp-date, .card-cvv, .name-on-card, .card-name").on("input",function(){validateNewCardForm()}),$(".card-cvv").on("input",function(){this.value=this.value.replace(/\D/g,""),validateNewCardForm()}),$(".card-name, .name-on-card").on("input",function(){const e=this.value.replace(/[^A-Za-z ]+/g,"");$(this).val(e),validateNewCardForm()}),$(".vpa-input").on("input",function(e){e.stopPropagation();$(this).val().trim().length>0?($(".invalid-upi").addClass("hidden"),$(".upi-error-info").addClass("hidden"),$(".upi-verify").removeClass("hidden"),$(".upi-in
51put-box").removeClass("invalid"),$(".valid-upi").addClass("hidden"),$(".upi-verify").removeClass("hidden"),$(".footer-pay #payment-button").prop("disabled",!0),$("#vpa-verify-button").prop("disabled",!1),$("#payment-button").addClass("disabled"),$(".upi-consent").addClass("hidden")):$("#vpa-verify-button").prop("disabled",!0)}),$("#vpa-verify-button").click(function(e){e.stopPropagation();validateVPA($(".vpa-input").val()).then(e=>{e?($(".valid-upi").removeClass("hidden"),$(".upi-verify").addClass("hidden"),$(".upi-consent").removeClass("hidden"),$("#new-upi").find(".proceed-button").removeClass("hidden"),$(".payment-method-selected").val("new-upi"),$(".footer-pay #payment-button").prop("disabled",!1),$("#payment-button").removeClass("disabled"),"MOBILE"===deviceName&&startAutoPaySequence()):($(".invalid-upi").removeClass("hidden"),$(".upi-error-info").removeClass("hidden"),$(".upi-verify").addClass("hidden"),$(".upi-input-box").addClass("invalid"),$(".upi-consent").addClass("hidden"),$("#new-upi").find(".proceed-button").addClass("hidden"),"MOBILE"===deviceName&&stopAutoPaySequence()),triggerUPIVerifiedEvent(e)})}),$("#retry-payment-failure").click(function(){$(this).addClass("btn loading"),$(".retry-payment-event").submit()}),$(".verify-otp-button").click(function(){$(this).addClass("btn loading");var e="";$(".otp-inputs input").each(function(){e+=$(this).val().trim()}),$("#otpCode").val(e),$('form[name="login-otp-form"]').submit()}),$("#payment-button, #generate-btn").click(function(e){e.preventDefault(),"MOBILE"===deviceName&&stopAutoPaySequence(),paymentTransactionInProgress||$(this).hasClass("loading")||$(this).hasClass("retry-pay")||initiateTransactionWithAutopayChoice(e)}),$(".otp-inputs input").on("input",function(){this.value=this.value.replace(/\D/g,"");const e=$(".otp-inputs input"),t=e.index(this);$(this).val()&&t<e.length-1&&e.eq(t+1).focus();var a=!0;e.each(function(){if(""===$(this).val().trim())return a=!1,!1}),$(".verify-otp-button").prop("disabled",!a)}).on("keydown",function(e){const t=$(".otp-inputs input"),a=t.index(this);"Backspace"===e.key&&!$(this).val()&&a>0&&t.eq(a-1).focus()}),$(".login-popup, .open-otp-login").click(function(){$(".retry-info").removeClass("hidden"),$("#resend-button").addClass("hidden"),sendOTPForWallet()}),$(".close-otp-popup").click(function(){$(".otp-popup-overlay").removeClass("show-info-popup")}),$(".consent-box").click(function(e){e.stopPropagation()}),$("#cancel-payment").click(function(){$(".cancel-qr-section").removeClass("hidden"),triggerCancelClickedEvent()}),$(".cancel-intent-transaction").click(function(){$(this).addClass("loading loader-bg"),triggerCancelClickedEvent("Yes"),window.location.reload()}),$(".close-warning-popup").click(function(){$(".cancel-intent-transaction").removeClass("loader-bg loading"),$(".cancel-payment-section").removeClass("show-info-popup"),$(".cancel-qr-section").addClass("hidden"),triggerCancelClickedEvent("No")}),$(".razorpay-form").on("submit",function(e){e.preventDefault();const t=$(".payment-method-selected").val()||"",a=$(".order-total").val()||0,n=($("#saved-payments-section .method-selected").length,getPaymentMethodForEvents(t));sessionStorage.setItem("payMtd",n),sessionStorage.setItem("ordrAmt",a),triggerPaymentInitiatedEvent(!1),this.submit()})}),$(document).ready(function(){if($("#safeGoldWallet").length||$("#sgw-modal").length){var e="",t="undefined"!=typeof GLOBAL_CTX?GLOBAL_CTX:"";$("#safeGoldWallet").on("click",function(e){if(!$(this).prop("disabled")){if((parseFloat($(this).data("applied"))||0)>0)return $(".page-loader").removeClass("hidden"),void $("#removeGoldWalletPayment").submit();e.preventDefault(),openSgwPopup()}}),$("#safeGoldWallet-amount").on("click",function(e){$("#safeGoldWallet").prop("disabled")||$(this).hasClass("walletDisabled")||(e.preventDefault(),openSgwPopup())}),$("#sgw-close").on("click",function(){$("#sgw-modal").hide()}),$(".sgw-otp").on("input",function(){this.value=this.value.replace(/\D/g,"");const e=$(".sgw-otp"),t=e.index(this);$(this).val()&&t<e.length-1&&e.eq(t+1).focus()}).on("keydown",function(e){const t=$(".sgw-otp"),a=t.index(this);"Backspace"===e.key&&!$(this).val()&&a>0&&t.eq(a-1).focus()}),$("#sgw-amt").on("input",function(){this.value=this.value.replace(/\D/g,"")}),$("#sgw-send-btn").on("click",function(){var a=parseFloat($("#safeGoldWallet").data("applicable"))||0,n="undefined"!=typeof customerCode?customerCode:"",i=$("#sgw-amt").val(),o=parseFloat(i);return!i||isNaN(o)?showErr("Please enter a valid amount"):o<10?showErr("Minimum redemption value is Rs. 10"):o>a?showErr("Amount cannot exceed "+formatPrice(a)):($("#sgw-err").hide(),$("#sgw-send-btn").prop("disabled",!0),void $.ajax({type:"POST",url:t+"/gold-wallet/generate-otp",data:{w
51alletType:"safegold",customerCode:n,goldValue:o},dataType:"json",success:function(t){"string"==typeof t&&(t=JSON.parse(t)),t.hasError?showErr(t.errorMessage||"Failed to generate OTP"):(e=t.internalTxnId,$("#sgw-title").text("Verify OTP"),$("#sgw-step-amt").hide(),$("#sgw-step-otp").show())},error:function(e,t,a){showErr("Error generating OTP")},complete:function(){$("#sgw-send-btn").prop("disabled",!1)}}))}),$("#sgw-verify-btn").on("click",function(){var a="";if($(".sgw-otp").each(function(){a+=$(this).val()}),6!==a.length)return showErr("Invalid OTP");$("#sgw-err").hide(),$("#sgw-verify-btn").prop("disabled",!0),$.ajax({type:"POST",url:t+"/gold-wallet/verify-otp",data:{internalTxnId:e,otp:a},dataType:"json",success:function(t){"string"==typeof t&&(t=JSON.parse(t)),t.hasError||!t.isOtpVerified?(showErr(t.errorMessage||"Invalid OTP"),$("#sgw-verify-btn").prop("disabled",!1)):($("#sgwTxnId").val(e),$(".page-loader").removeClass("hidden"),$("#addGoldWalletPayment").submit())},error:function(e,t,a){showErr("Verification error"),$("#sgw-verify-btn").prop("disabled",!1)}})})}function showErr(e){$("#sgw-err").html(e).show()}function openSgwPopup(){e="",$("#sgw-amt, .sgw-otp").val(""),$("#sgw-err").hide(),$("#sgw-step-amt").show(),$("#sgw-step-otp").hide(),$("#sgw-title").text("Enter Amount to Use"),$("#sgw-modal").show(),$("#sgw-send-btn, #sgw-verify-btn").prop("disabled",!1)}});let countdownIntervalRp,autoPayTimerRp,autoPayIntervalRp,secondsRemainingRp=120,forceStopIntervalRp=!1;function startAutoPaySequence(){const e=$(".isAutoClickEnabled").val(),t=Number($(".autoClick_timer").val());if("MOBILE"!==deviceName)return;if("false"==e)return;if(!t||t<=0)return;const a=$("#payment-button"),n=$("#auto-pay-banner"),i=n.find(".timer-text"),o="qr"===$(".payment-method-selected").val()?"Generating QR in ":"Auto-proceeding in ";i.text(`${o}${t}s...`),n.css("display","flex");const r=a.find(".btn-progress-bar");r.removeClass("filling").css("width","0%"),r[0].offsetWidth,r.addClass("filling"),r.css("--duration",`${t}s`),clearInterval(autoPayIntervalRp),clearTimeout(autoPayTimerRp);let s=t;autoPayIntervalRp=setInterval(function(){s--,s>0&&i.text(o+s+"s...")},1e3),autoPayTimerRp=setTimeout(function(){triggerPaymentAction()},1e3*t)}function stopAutoPaySequence(){clearInterval(autoPayIntervalRp),clearTimeout(autoPayTimerRp),autoPayTimerRp=null,$("#payment-button .btn-progress-bar").removeClass("filling").css("width","0%"),$("#auto-pay-banner").hide()}function triggerPaymentAction(){stopAutoPaySequence(),autoClickedRazorpay=!0;var e=$("#payment-button");if(e&&e.length>0){var t=e[0],a=new Touch({identifier:Date.now(),target:t,clientX:0,clientY:0,force:1}),n=new TouchEvent("touchstart",{cancelable:!0,bubbles:!0,touches:[a],targetTouches:[a],changedTouches:[a]}),i=new TouchEvent("touchend",{cancelable:!0,bubbles:!0,touches:[],targetTouches:[],changedTouches:[a]}),o=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window,isTrusted:!0});t.dispatchEvent(n),t.dispatchEvent(i),t.dispatchEvent(o)}}function initiateTransactionWithAutopayChoice(e){var t=$(".payment-method-selected").val();if(!("V4"===$("#autopayUiVariant").val())||!isAutopayMethod(t))return $("#payment-button, #generate-btn").addClass("btn loading"),initiateTransaction(e),!0;var a="new-card"===t||"card"===t?"card":"upi";$("#autopayTogglePopup").data("payment-method",a);var n=document.querySelector("#autopayTogglePopup");return n&&n.setAttribute("data-initiate-transaction","true"),$("#autopayOverlayMask").show(),$("#autopayTogglePopup").show(),$("body").addClass("freeze-scroll"),!1}function initiateTransaction(e){if(!paymentTransactionInProgress){paymentTransactionInProgress=!0,clearPaymentInlineMessage(),syncPaymentRequestAmount(),setPaymentAttributes();var t=$('form[name="razorPay"]').serializeArray(),a=$(".payment-method-selected").val(),n=isAutopayMethod(a)&&"true"===$("#upiAutopayStatus").val();if(t.push({name:"isRecurring",value:String(n)}),n){var i="new-card"===a||"card"===a?"CARD":"UPI";t.push({name:"autopayMethod",value:i})}$.ajax({type:"POST",data:t,async:!0,url:$('form[name="razorPay"]').attr("action"),success:function(e){if(e?.requiresCartRefresh)reloadPaymentPageForUpdatedCart(e?.errorMsg,e?.remainingPayableForCart);else if(e?.hasError)handlePaymentRequestFailure(e?.errorMsg||"Unable to start payment. Please review the payment details and try again.");else{clearPaymentInlineMessage();var t=e.txnId,a=e.cartId,n=e.razorpayCustomerId;triggerPaymentInitiatedEvent(autoClickedRazorpay),t&&a?createPaymentRequestForRazorPay(t,a,n):handlePaymentRequestFailure("Unable to start payment because transaction details were not available. Please try again.")}},error:function(e){paymentTransactionInProgress=!1,resetPaymentLoadingState(),renderPaymentInlineMessage("Payment Update Failed","Unable to refresh the payment amount. Please try again.")}})}}function reloadPaymentPageForUpdatedCart(e,t){sessionStorage.setItem("paymentCartRefreshMessage",e||"Cart amount has changed. Please review the updated amount and try again."),null!=t&&""!==t&&sessionStorage.setItem("paymentCartRefreshAmount",t),paymentTransactionInProgress=!1,resetPaymentLoadingState(),$(".page-loader").removeClass("hidden"),window.location.replace(getPaymentRefreshUrl())}
51function getPaymentRefreshUrl(){var e=$('input[name="_flowExecutionId"]').first().val();if(!e)return window.location.href;var t="newPaymentDetails"===execution_step?"refreshPaymentDetails":"checkoutPaymentDetailsEvent";return window.location.pathname+"?execution="+encodeURIComponent(e)+"&_eventId="+t+"&_ts="+(new Date).getTime()}function showPaymentCartRefreshMessage(){var e=sessionStorage.getItem("paymentCartRefreshMessage");syncPaymentRequestAmount(sessionStorage.getItem("paymentCartRefreshAmount")),sessionStorage.removeItem("paymentCartRefreshAmount"),e&&(sessionStorage.removeItem("paymentCartRefreshMessage"),renderPaymentCartRefreshMessage(e))}function renderPaymentCartRefreshMessage(e){renderPaymentInlineMessage("Cart Amount Updated",e)}function renderPaymentInlineMessage(e,t){var a='<div id="payment-cart-refresh-block" class="payment-error-block payment-cart-refresh-block"><div class="payment-error-icon"><span class="info-icon icon-for-error">!</span></div><div class="error-type-label"><span class="payment-error-title">'+escapePaymentMessageHtml(e)+'</span><span class="payment-error-desc">'+escapePaymentMessageHtml(t)+"</span></div></div>";$("#payment-cart-refresh-block").remove();var n=$(".left-checkout-section .bsWallet, .checkout-new-page .bsWallet").first();if(n.length>0)n.before(a);else{var i=$(".left-checkout-section, .checkout-new-page").first();i.length>0?i.prepend(a):$("#snackbarwrapper").length>0&&$("#snackbarwrapper").html(toastUI(t))}}function clearPaymentInlineMessage(){$("#payment-cart-refresh-block").remove(),sessionStorage.removeItem("paymentCartRefreshMessage"),sessionStorage.removeItem("paymentCartRefreshAmount")}function escapePaymentMessageHtml(e){return $("<div>").text(e||"").html()}function resetPaymentLoadingState(){$(".page-loader").addClass("hidden"),$("#payment-button, #generate-btn, .proceed-to-pay, .cc-dc-pay-now").removeClass("loading loader-bg")}function syncPaymentRequestAmount(e){var t=normalizePaymentAmount(e)||getRenderedPaymentAmount();t&&$('input[name="requestAmount"]').val(t)}function getRenderedPaymentAmount(){var e=normalizePaymentAmount($(".order-total").first().val());return e||((e=normalizePaymentAmount($(".total-payable[data-ordertotal]").first().data("ordertotal")))||normalizePaymentAmount($(".address-content[data-ordertotal], .address-content-app[data-ordertotal]").first().data("ordertotal")))}function normalizePaymentAmount(e){return null==e||""===e?"":String(e).replace(/,/g,"").replace(/[^\d.]/g,"")}function validateVPA(e){return new Promise((t,a)=>{t(new Razorpay({key:razorpay_key}).verifyVpa(e).then(e=>200===e?.status_code&&1==e?.success||(200!==e?.status_code||0!=e?.success)&&void 0).catch(e=>{if(400===e?.status_code||200===e?.status_code&&0==e?.success)return!1}))})}function validateNewCardForm(){var e=""!=$(".name-on-card").val(),t=($(".card-number").val().replace(/\s+/g,""),$(".card-number").hasClass("val
51id")&&!$(".card-number").hasClass("error")),a=$(".exp-date").val(),n=!$(".exp-date").hasClass("invalid")&&7==a.length,i=$(".card-cvv").val(),o=parseInt($(".card-cvv").attr("maxlength"),10)||3,r=i.length==o,s=e&&t&&n&&r;s?($(".payment-method-selected").val("new-card"),$("#payment-button").removeClass("disabled"),$(".footer-pay #payment-button").prop("disabled",!s),setTimeout(function(){$(document.activeElement).blur()},0),"MOBILE"!==deviceName||autoPayTimerRp||startAutoPaySequence()):($(".card-button").prop("disabled",!s),$(".footer-pay #payment-button").prop("disabled",!s),$("#payment-button").addClass("disabled"),"MOBILE"===deviceName&&stopAutoPaySequence())}function getBankNameHTML(e){var t="",a=$(".popular-bank-list div[id]").map(function(){return this.id}).get();const n=Object.fromEntries(Object.entries(e).filter(([e])=>!a.includes(e)));return Object.entries(n).forEach(([e,a])=>{t+='<div id="'+e+'" class="bank" data-name="'+a+'">',t+=a+'<span class="bank-proceed"><i class="icon-angle-right"></i></span></div>'}),t}function verifyPayment(e){const t=$("#paymentTxnId").val(),a=$("#flowExecUrl").val(),n=!0===e||"true"===e;if(!t||!a)return void(n||forceStopIntervalRp||setTimeout(()=>{verifyPayment(!1)},3e3));const i=GLOBAL_CTX+"/verify-payment/"+encodeURIComponent(t)+"?forcedRedirect="+n+"&flowId="+encodeURIComponent(a);$.ajax({type:"GET",url:i,dataType:"json",async:!1,cache:!1,success:function(e){e?.url?(forceStopIntervalRp=!0,window.location.href=e.url):n?forceStopIntervalRp=!0:setTimeout(()=>{const e=secondsRemainingRp<=3;e&&(forceStopIntervalRp=!0),verifyPayment(e)},3e3)},error:function(e){n||forceStopIntervalRp?forceStopIntervalRp=!0:setTimeout(()=>{verifyPayment(!1)},3e3)}})}function startCountdown(){countdownIntervalRp=setInterval(()=>{forceStopIntervalRp?clearInterval(countdownIntervalRp):(secondsRemainingRp--,secondsRemainingRp<=0&&(clearInterval(countdownIntervalRp),verifyPayment(!0)))},1e3)}function sendOTPForWallet(){var e=EMAIL||"",t=CUSTOMER_PHONE||"";const a=$("#cartid").val();$.ajax({type:"POST",async:!1,url:GLOBAL_CTX+"/otp/send-otp",dataType:"json",data:"email="+e+"&customerphone="+t+"&otpType="+OTP_TYPE.LOGIN+"&cartId="+a,success:function(t){if(!t?.hasError){const a=maskNumber(t.customerPhone,2,6);$("#otpID").val(t?.otpId),$("#custPhone").val(t?.customerPhone),$("#phoneNumber").text(a),$("#otp-email").text(e),$(".otp-popup-overlay").addClass("show-info-popup"),otpTimer()}},error:function(e){}})}let otpIntervalId=null;function otpTimer(){let e=29;$("#otp-countdown").text("00:30"),null!==otpIntervalId&&(clearInterval(otpIntervalId),otpIntervalId=null),otpIntervalId=setInterval(()=>{let t=String(Math.floor(e/60)).padStart(2,"0"),a=String(e%60).padStart(2,"0");$("#otp-countdown").text(`${t}:${a}`),e<=0?(clearInterval(otpIntervalId),otpIntervalId=null,$(".retry-info").addClass("hidden"),$("#resend-button").removeClass("hidden")):e--},1e3)}function showCancelButton(){isAutopayMethod($(".payment-method-selected").val())&&"true"===$("#upiAutopayStatus").val()?$(".autopay-loading-info").removeClass("hidden"):$(".autopay-loading-info").addClass("hidden"),$(".checkout-new-page").addClass("hidden"),$(".new-payment-checkout-section").addClass("hidden"),$(".custom-intent-loader").removeClass("hidden"),$(".page-loader").addClass("hidden"),setTimeout(()=>{$(".footer-pay").removeClass("hidden")},1e4)}function createPaymentRequestForRazorPay(e,t,a){var n=GLOBAL_CTX+"/paymentrequest/"+e+"/"+t,i="";$.ajax({type:"GET",url:n,dataType:"json",async:!1,cache:!1,success:function(e){if(e?.hasError)return void handlePaymentRequestFailure(e?.data||"Unable to create payment request. Please try again.");var t;try{t=JSON.parse(e?.data)}catch(e){return void handlePaymentRequestFailure("Invalid payment request response. Please try again.")}if(!t?.templateVariables?.amount||!t?.templateVariables?.razorpayOrderId||!t?.templateVariables?.callbackURL)return void handlePaymentRequestFailure("Payment request details are incomplete. Please try again.");const n=$(".payment-method-selected").val();showCancelButton();var o={amount:t?.templateVariables?.amount,order_id:t?.templateVariables?.razorpayOrderId,customer_id:a,email:t?.templateVariables?.customerEmail,contact:t?.templateVariables?.customerPhone,currency:t?.templateVariables?.currency,callback_url:t?.templateVariables?.callbackURL};if(isAutopayMethod(n)&&"true"===$("#upiAutopayStatus").val()&&(o.recurring="1"),"new-card"===n)o.method="card",o["card[name]"]=$(".name-on-card").val(),o["card[number]"]=$(".card-number").val().replace(/\s/g,""),o["card[cvv]"]=$(".card-cvv").val(),o["card[expiry_month]"]=$(".exp-date").val().split("/")[0].replace(/\s+/g,""),o["card[expiry_year]"]=$(".exp-date").val().split("/")[1].replace(/\s+/g,""),$(".card-consent-box").is(":checked")&&(o.save=1);else if("new-upi"===n){var r={vpa:$(".vpa-input").val(),flow:"collect"};$(".consent-box").is(":checked")&&(o.save=1),o.method="upi",o.upi=r}else if("upi"===n){r={vpa:$(".saved-method:checked").closest(".payment-row").find(".bank-name").text().trim(),flow:"collect"};o.method="upi",o.upi=r}else if("card"===n){const e=$(".saved-method:checked").attr("id"),t=$(".cvv-input").val();o.method="card",o.token=e,o["card[cvv]"]=t}else if("qr"===n){r={qr:!0,timeout:10};o.method="upi",o.upi=r}else if("net-bank"===n){var s=$(".payment-method-selected").attr("id");o.bank=s,o.method="netbanking"}else"wallet"===n&&(i=$(".payment-method-selected").attr("id"),o.method="upi");if(""!==i){var l=new Razorpay({key:razorpay_key,redirect:!0,webview_intent:!0});try{paymentTransactionInProgress=!1,l.createPayment(o,{app:`${i}`})}catch(e){handlePaymentRequestFailure("Unable to open payment gateway. Please try again.")}document.addEventListener("visibilitychange",handleVisibilityChange)}else{l=new Razorpay({key:razorpay_key,redirect:!0});try{paymentTransactionInProgress=!1,l.createPayment(o)}catch(e){handlePaymentRequestFailure("Unable to open payment gateway. Please try again.")}}},error:function(e){handlePaymentRequestFailure("Unable to create payment request. Please try again.")}})}function handlePaymentRequestFailure(e){paymentTransactionInProgress=!1,resetPaymentLoadingState(),renderPaymentInlineMessage("Payment Request Failed",e)}function openWebViewLink(e,t,a){if(a.preventDefault(),isAppWebView){var n=e;t&&e.includes(".html")&&(n=e.replace(".html","-app.html")),isIOS?setDataForIOS(n):AndroidBridge.setData(n)}else window.location.href=e}function cancelGRP(e){var t=$(e.target).data("plancode");$.ajax({type:"POST",url:GLOBAL_CTX+"/account/goldreserve/cancel",dataType:"json",data:"code="+t,async:!1,cache:!1,success:function(e){"MOBILE"===deviceName?closeGIPPopup():$.fancybox.close(),$("#snackbarwrapper").html(toastUI(e.message)),setTimeout(function(){location.reload()},2e3)},error:function(e){}})}function openGIPCancelPopup(e,t){var a=$(e).data("plancode");"MOBILE"===deviceName?($(t+", .gip-popup-overlay").removeClass("hidden").show(),$("body").addClass("freeze-scroll"),$(t).before('<div class="gip-popup-overlay overlay"></div>'),$(".confirm-grp-cancel").attr("data-plancode",a)):commonFancyBox({width:400,wrapCSS:"fancybox-style-4",href:t,resetPopup:function(){},afterLoad:function(){$("body").addClass("popup-active"),$(".confirm-grp-cancel").attr("data-plancode",a)}})}function openAutoPayCancelPopup(e){var t=$(e).data("source-type"),a=$(e).data("plan-ref"),n="#confirmAutoPayCancelPopup";if($(n).find(".confirm-autopay-cancel").attr("data-source-type",t).attr("data-plan-ref",a).prop("disabled",!1),"MOBILE"===deviceName)return $(".auto
51pay-cancel-overlay").remove(),$(n).before('<div class="autopay-cancel-overlay overlay"></div>'),$(n+", .autopay-cancel-overlay").removeClass("hidden").show(),void $("body").addClass("freeze-scroll");commonFancyBox({width:350,wrapCSS:"fancybox-style-4 autopay-cancel-fancybox",href:n,afterLoad:function(){$("body").addClass("popup-active")}})}function closeAutoPayCancelPopup(){if("MOBILE"===deviceName)return $("#confirmAutoPayCancelPopup").addClass("hidden").hide(),$(".autopay-cancel-overlay").remove(),void $("body").removeClass("freeze-scroll");$.fancybox&&$.fancybox.close&&$.fancybox.close()}function confirmAutoPayCancellation(e){e.preventDefault();var t=$(e.currentTarget),a=t.attr("data-source-type"),n=t.attr("data-plan-ref");"GMS_PLAN"!==a&&"GRP_PLAN"!==a||!n?$("#snackbarwrapper").html(toastUI("Unable to cancel AutoPay. Please try again.")):(t.prop("disabled",!0).addClass("disabled"),$.ajax({type:"POST",url:GLOBAL_CTX+"/api/account/autopay/mandate/revoke",contentType:"application/json",dataType:"json",data:JSON.stringify({sourceType:a,sourcePlanRef:n}),cache:!1,success:function(e){closeAutoPayCancelPopup(),$("#snackbarwrapper").html(toastUI(e.message||"AutoPay cancellation requested.")),setTimeout(function(){location.reload()},1500)},error:function(e){var a=e.responseJSON||{};if(401!==e.status){if(409===e.status)return closeAutoPayCancelPopup(),$("#snackbarwrapper").html(toastUI(a.message||"AutoPay status has changed. Refreshing the plan.")),void setTimeout(function(){location.reload()},1500);if(404===e.status)return $("#snackbarwrapper").html(toastUI("AutoPay plan not found.")),void t.prop("disabled",!1).removeClass("disabled");e.status,$("#snackbarwrapper").html(toastUI(a.message||"Unable to cancel AutoPay. Please try again.")),t.prop("disabled",!1).removeClass("disabled")}else window.location.href=GLOBAL_CTX+"/showLoginPage"}}))}function triggerKwikPassAutofill(e){e&&e.preventDefault(),window.__KP_LOGIN_SDK_INSTANCE__&&"function"==typeof window.__KP_LOGIN_SDK_INSTANCE__.kwikForm&&window.__KP_LOGIN_SDK_INSTANCE__.kwikForm()}function _gkFillField(e,t){var a=t||"",n=$(e);n.is(":disabled")||(n.val(a),n.trigger("change").trigger("input").trigger("focusout"),""!==a.trim()?n.closest(".fl-wrap").addClass("auto-filled"):n.closest(".fl-wrap").removeClass("auto-filled"))}function _gkApplyAddress(e){e&&(_gkFillField("#address",e.address1),_gkFillField("#street",e.address2),_gkFillField("#locality",e.city),_gkFillField("#postcode_delivery",e.pincode),$("#postcode_delivery").trigger("change"))}function _gkRunGuestAutomation(e){var t=e.email,a=e.phone,n=e.address;if(t&&_gkFillField("#email",t),a&&_gkFillField("#contactNumber",a),"MOBILE"!==deviceName){var i=$(".proceed-to-addr");i.is(":visible")?setTimeout(function(){i.click(),setTimeout(function(){var e=$
51("#homeDelivery");e.is(":checked")||e.prop("checked",!0).trigger("change").trigger("click"),setTimeout(function(){_gkApplyAddress(n)},200)},300)},100):_gkApplyAddress(n)}else setTimeout(function(){var e=$("#homeDelivery");e.is(":checked")||e.prop("checked",!0).trigger("change").trigger("click"),setTimeout(function(){_gkApplyAddress(n)},300)},300)}function initGokwikIntegration(){window.addEventListener("message",function(e){if("kf:submitted"===e?.data?.type&&("https://sandbox.pdp.gokwik.co"===e.origin||"https://pdp.gokwik.co"===e.origin)){goKwikAddressFilledEvent();var t=e.data?.data;if(!t)return;var a={address:t.address,phone:t.phone,email:t.address&&t.address.email?t.address.email:t.email};a.address&&sessionStorage.setItem("gk_autofill_data",JSON.stringify(a)),isLoggedIn?_gkApplyAddress(a.address):_gkRunGuestAutomation(a)}});var e=sessionStorage.getItem("gk_autofill_data");if(e){var t=JSON.parse(e);isLoggedIn?_gkApplyAddress(t.address):_gkRunGuestAutomation(t)}$('input[name="deliveryType"]').on("change click",toggleAutofill),toggleAutofill()}function toggleAutofill(){var e=$("#autofill-container-delivery");$("#pickupAtStore").is(":checked")?e.addClass("hidden-smooth"):e.removeClass("hidden-smooth")}function triggerNameVerification(){if("true"===$("#isNameVerificationRequired").val()){var e="",t=$("#fullname");t.length&&(e=t.val()||""),$("#validate-name-input").val(e),$("#validate-name-popup-wrapper").show(),$("#validate-name-input").on("input",function(){$("#validate-name-error-msg").hide().text("")}),$("#validate-name-confirm-btn").on("click",function(){var t=$.trim($("#validate-name-input").val());t=t.replace(/’/g,"'");var a=$("#validate-name-error-msg");if(a.hide().text(""),t.length<3)a.text("Name must be at least 3 characters long.").show();else{if(/^[A-Za-z\s'-]+$/.test(t)){var n=t!==e,i=$(this);i.prop("disabled",!0),$.ajax({url:"api/checkout/address/update-customer-name",type:"POST",data:{isNameUpdateRequired:n,updatedName:t},dataType:"json",success:function(e){e&&e.hasError?(a.text(e.message||"An error occurred. Please try again.").show(),i.prop("disabled",!1).text("Confirm")):window.location.reload()},error:function(){a.text("Failed to connect to the server. Please try again.").show(),i.prop("disabled",!1).text("Confirm")}})}else a.text("Only alphabets, spaces, apostrophes, and hyphens are accepted.").show()}})}}function updateSolitaireAckColors(){$(".solitaire-cancel-ack-checkbox").each(function(){var e=$
51(this).closest(".solitaire-ack-container");$(this).is(":checked")?(e.addClass("active"),e.removeClass("error-highlight")):e.removeClass("active")})}function validateSolitaireTerms(){var e=$(".solitaire-cancel-ack-checkbox:not(:checked)");if(0===e.length)return!0;$("#snackbarwrapper").html(toastUI("Please accept solitaire terms and conditions to proceed.")),setTimeout(function(){$("#snackbar").removeClass("show")},2e3);var t=e.first().closest(".solitaire-ack-container"),a=e.first().closest(".product-details"),n=e.first().closest(".product-details-bottom"),i=(a.length>0?a:n.length>0?n:t).offset().top-150;return"undefined"!=typeof deviceName&&"MOBILE"==deviceName?smoothScrollElement(window,i,200):$("html, body").animate({scrollTop:i},500),t.addClass("error-highlight"),setTimeout(function(){t.removeClass("error-highlight")},2e3),!1}function multipleAccountsFilterToggleDropdown(e){e.stopPropagation();var t=document.getElementById("multipleAccountsFilterDropdown");t.style.display="block"===t.style.display?"none":"block"}function submitMultipleAccountsFilter(e){var t=document.getElementById("multipleAccountsFilterHiddenEmailInput"),a=document.getElementById("multipleAccountsFilterHiddenForm");t.value=e,a.submit()}function verifyCustomerEmailAndPhone(e){var t="undefined"!=typeof deviceName&&"MOBILE"===deviceName,a=$("#email").val(),n=$("#contactNumber").val(),showError=function(a){t?$(".multi-account-error").html(panVerification.getPANNotificationHtml(a)).show():$(".multi-account-error").html('<div class="error-container"><div class="error-container-inner">'+a+"</div></div>").show(),e.stopImmediatePropagation(),e.preventDefault(),t?window.scrollTo({top:0,behavior:"smooth"}):$("html, body").animate({scrollTop:0},300)};$.ajax({type:"POST",url:GLOBAL_CTX+"/customer/check-email-and-phone",async:!1,dataType:"json",data:"phoneNumber="+encodeURIComponent(n)+"&email="+encodeURIComponent(a),success:function(e){e.hasError?showError(e.errorMessage):$(".multi-account-error").empty().hide()},error:function(){showError("Something went wrong verifying your details. Please try again.")}})}function sendGiftCardOTP(e){const t=document.querySelector("#login-phone").value||"",a=document.querySelector("#otpId").value||"",n=document.querySelector("#cartId").value||"";if("NORMAL"==deviceName||"TABLET"==deviceName){if($("#user-login").validationEngine("validateField","#login-phone"))return}else if(!validateField($("#user-login #login-phone")))return;response=a?otpUtilNew.sendOTP(e,"phoneverification",null,n,t,null):otpUtilNew.resendOTP(e,"phoneverification",null,n,t,null),response.hasError?handleGiftCardOtpResponse("#giftcard-error",response.errorMsg,7e3):(handleGiftCardOtpResponse("#giftcard-success",a?"OTP resent successfully!":"OTP sent successfully!",5e3),document.querySelector("#otpId").value=response.otpId,document.querySelector("#send-otp-btn").value="RESEND OTP")}function handleGiftCardOtpResponse(e,t,a){document.querySelector(e).innerHTML=t,document.querySelector(e).classList.remove("hidden"),setTimeout(function(){document.querySelector(e).innerHTML="",document.querySelector(e).classList.add("hidden")},a)}function deferAddressRedirect(){const e=document.querySelector(".defer-notice-add-btn");if(!e||!e.href)return;const t=setTimeout(()=>{window.location.href=e.href},1e4);e.addEventListener("click",()=>{clearTimeout(t)})}function handleMaxProductsInCart(e,t,a){if(t<a)return!0;e&&e.preventDefault();var n="wishlist"===PAGE_TYPE,i="undefined"!=typeof deviceName&&"MOBILE"===deviceName,o=Boolean(getCookie("bsApp")),r=($(".wishlist-button").length>0?$(".wishlist-button").first():$("a.wishlist").first()).hasClass("wishlist-added"),s=n?"Please remove item from your cart to continue.":"Please remove item or add additional items to your wishlist.",l=n||r?"":'<button id="product-notification-wishlist-btn" style="background:#013562;color:#fff;border:none;margin-right:15px;padding:7px 10px;border-radius:3px;cursor:pointer;">Add to wishlist</button>';return bsNotificationUtil.show({width:i||o?"84%":"450px",duration:1e5,backgroundColor:"#F4FAFF",left:i||o?"50%":"auto",right:i||o?"auto":"20px",bottom:i||o?"99px":"100px",transform:i||o?"translateX(-50%)":"none",html:'<div style="padding:10px;"><div style="font-size:18px;font-weight:600;color:#000;margin-bottom:8px;">Your cart is full ('+t+' items)</div><div style="font-size:14px;color:#636161;margin-bottom:20px;">'+s+"</div><div>"+l+'<a href="/order" style="color:#000;padding:7px 0;background:none;">View Cart</a></div></div>'}),!1}function shareVoucher(e,t){const a=e.currentTarget;navigator.share?navigator.share({text:t}).catch(()=>{}):navigator.clipboard.writeText(t).then(()=>{a.innerText="Copied!",setTimeout(()=>a.innerText="Share Voucher",2e3)}
51).catch(()=>{})}async function addSoftLoginContext(e,t){return $.ajax({url:"/user-context/add-sl",method:"GET",data:{type:e,t:t},xhrFields:{withCredentials:!0}}).then(function(e){if(e.id){let t={};t.userCode=e.id,fireLoginEvents(t,!1),softLoginEvent(e.type)}return setTimeout(()=>{location.reload()},200),!0},function(e){return!1})}function isAutopayMethod(e){return"qr"===e||"wallet"===e||"new-card"===e||"card"===e}function updateCardPaymentButtonLabel(){var e=$(".payment-method-selected").val(),t="new-card"===e||"card"===e||$(".card-form-expand").hasClass("open"),a="true"===$("#upiAutopayStatus").val();$(".payment-button-label").text(t&&a?"Proceed with AutoPay":"Proceed")}function getProductCardHTML(e){const t=e.mediaItems?.imageItems?.[0]?.urls?.[414]||e.imageUrl;return`\n    <div class="pos-cart-card">\n      <div class="pos-cart-card__image-wrapper">\n        ${getPOSCartWishListHTML(e)}\n        <a\n          href="${e.productPageUrl}"\n          ${"NORMAL"===deviceName||"TABLET"===deviceName?'target="_blank"':""}\n          onclick="handlePOSCartViewDetailsWEEvent(this);"\n          style="outline:none;"\n        >\n          <img\n            class="pos-cart-card__image"\n            src="${t}"\n            alt="${e.designName}"\n          />\n        </a>\n      </div>\n      <div class="pos-cart-card__content">\n        <div class="pos-cart-card__title">\n          ${e.designName}\n        </div>\n        <div style="display: flex; justify-content: start; align-items: center; gap: 4px;">\n          <div class="pos-cart-card__price">\n            ${e.discountedPrice?e.discountedPrice:e.price}\n          </div>\n          ${e.price!==e.discountedPrice?`<div class="pos-cart-card__strike-price" style="text-decoration: line-through; font-size: 12px;">\n            ${e.price}\n          </div>`:""}\n        </div>\n        <div class="pos-cart-card__offer">${e.discountName||""}</div>\n        <button\n          id="posCartProductCardButton"\n          class="pos-cart-card__button"\n          data-sku="${e.skuCode}"\n          data-productid="${e.designId}"\n          data-price="${e.price}"\n          data-discountedprice="${e.discountedPrice}"\n          data-designname="${e.designName}"\n          data-sourcetype="${e.sourceType}"\n          onclick="handlePOSCartViewDetailsWEEvent(this);\n            ${"NORMAL"===deviceName||"TABLET"===deviceName?`window.open('${e.productPageUrl}', '_blank')`:`window.location.href='${e.productPageUrl}'`}"\n        >\n          View Details\n        </button>\n      </div>\n    </div>\n  `}function scrollPOSCart(e){document.getElementById("pos-cart-items-container").scrollLeft+="right"===e?240:-240}function updatePOSCartScrollBtn(){var e=document.getElementById("pos-cart-items-container"),t=document.getElementById("pos-cart-scroll-left"),a=document.getElementById("pos-cart-scroll-right");if(e&&t&&a){var n=e.scrollLeft<=0,i=e.scrollLeft+e.clientWidth>=e.scrollWidth-1;n?t.classList.add("hidden"):t.classList.remove("hidden"),i?a.classList.add("hidden"):a.classList.remove("hidden")}}function getPageVariantFromCookie(e){if("undefined"==typeof document||!document.cookie||0===document.cookie.trim().length)return"NONE";const t=document.cookie.split(";");let a=-1,n="";for(let i=0;i<t.length;i++){const o=t[i].trim();if(o.startsWith(e)){const t=o.indexOf("=");if(-1!==t){const i=o.substring(0,t).trim(),r=o.substring(t+1).trim(),s=parseInt(i.substring(e.length),10);!isNaN(s)&&s>a&&(a=s,n=r.toUpperCase())}}}return-1===a?"NONE":n}$(document).ready(function(){"checkoutFlowAddressDetails"==execution_step&&(initGokwikIntegration(),triggerNameVerification())}),function(){var e="undefined"!=typeof deviceName&&"MOBILE"===deviceName;e&&($.fn.slideDown=function(){return this.show()},$.fn.slideUp=function(){return this.hide()},$.fn.fadeIn=function(){return this.show()},$.fn.fadeOut=function(){return this.hide()});var t={allAccounts:null,primaryEmail:null,verifiedData:{},otpContext:{mode:"REASSIGN",email:null,phoneNumber:null,otpId:null,$rowContainer:null}};function checkSaveButtonState(){var e=$("#mergeSecondaryList .merge-accordion-row").length,a=0;$("#mergeSecondaryList .merge-accordion-row").each(function(){var e=$
51(this),n=e.find(".acc-email").text(),i=e.find("input[type=radio]:checked").val();if("merge"===i||"discard"===i)a++;else if("reassign"===i){var o=e.find(".phone-input-container input").val(),r=t.verifiedData[n];r&&r.phone===o&&a++}}),e>0&&e===a?$("#btnSaveUpdate").prop("disabled",!1):$("#btnSaveUpdate").prop("disabled",!0)}function openAmOtpDialog(e,a,n,i,o){t.otpContext={mode:e,email:a,phoneNumber:n,otpId:i,$rowContainer:o},$("#am-otp-target-number-display").text("+91 "+n),$("#am-otp-input-main").val("").focus(),$("#am-otp-error-feedback").text(""),$("#am-btn-submit-otp").text("Submit").prop("disabled",!1),"SELF"===e?($(".am-otp-close-icon").hide(),$(".am-otp-heading").text("Verify your number"),$(".am-otp-heading").html("Verify your number "+n),$("#am-btn-logout-otp").show()):($(".am-otp-close-icon").show(),$(".am-otp-heading").html('Verify number <span id="am-otp-target-number-display">+91 '+n+"</span>"),$("#am-btn-logout-otp").hide()),$("#am-otp-verification-overlay").css("display","flex").hide().fadeIn(200)}function closeAmOtpDialog(){$("#am-otp-verification-overlay").fadeOut(200),t.otpContext={}}function buildStatItem(e,t){return'<div class="stat-item"><span class="stat-val">'+t+'</span><span class="stat-label">'+e+"</span></div>"}$(document).ready(function(){var a=$("#mergeAccountDialog"),n=$("#am-otp-verification-overlay"),i=$("#am-confirm-overlay"),o=$("#isPrimaryAccountSet").val(),r=$("#isAccountMergingEnabled").val(),s=$("#hasPhoneNumber").val(),l="undefined"!=typeof execution_step&&""!==$.trim(execution_step);r&&"true"===String(r).trim()&&!l&&s&&"true"===String(s).trim()&&o&&"false"===String(o).trim()&&($("#mergeAccountDialog").css("display","flex"),$("body").css("overflow","hidden"),function fetchMergeData(){$.ajax({type:"GET",url:GLOBAL_CTX+"/account-merging/get-customers-data",async:!0,cache:!1,dataType:"json",data:"ajax=true",success:function(e){if(e&&!e.hasError){t.allAccounts=e.customerAccountsData;var a=e.customerPhone||"";a&&$("#mergeCustomerPhone").text(" "+a),$("#mergeAccountList").html(function buildStep1Html(e){var t="",a=["#7239E5","#438AE7","#E66C2F"],n=0;for(var i in e)if(e.hasOwnProperty(i)){var o=e[i],r=a[n++%a.length],s=i.charAt(0).toUpperCase();o.lastUsedDate;t+='<label class="merge-row'+""+'">',t+='<input type="radio" name="primaryAccount" value="'+i+'" '+""+">",t+='<div class="row-top">',t+='<div class="user-details">',t+='<div class="avatar" style="background-color:'+r+'">'+s+"</div>",t+='<div class="text-group">',t+='<p class="email">'+i+"</p>",t+="</div>",t+="</div>",t+='<div class="custom-radio"></div>',t+="</div>",t+='<div class="row-divider"></div>',t+='<div class="merge-stats">',t+=buildStatItem("Orders",o.orderCount||0),t+=buildStatItem("Blue Cash",formatPrice(o.blueCash||0)),t+=buildStatItem("Blue Credits",formatPrice(o.blueCredit||0)),t+=buildStatItem("Active Gold Mine Plans",o.activeGMSPlans||0),t+=buildStatItem("Active Gold Reserve Plans",o.activeGRPPlans||0),t+=buildStatItem("Vouchers",o.voucherCount||0),t+="</div>",t+="</label>"}return t}(t.allAccounts)),$("#btnContinueToStep2").prop("disabled",!0);var n=$("#isPhoneNumberVerified").val();n&&"false"===String(n).trim()&&a&&($("#am-pre-verify-target-number").text(a),$("#btnSendPreVerifyOtp").data("phone",a),$("#am-pre-verify-overlay").css("display","flex").hide().fadeIn(200))}},error:function(e){}})}());var d=$("#am-pre-verify-overlay");
51d.on("click","#btnSendPreVerifyOtp",function(){var e=$(this).data("phone"),t=$(this),a=$("#am-pre-verify-error");t.text("Sending...").prop("disabled",!0),a.hide().text(""),$.ajax({type:"POST",url:GLOBAL_CTX+"/account-merging/generate-otp-for-contact-verification",data:{contactDetail:e,isVerificationBeforeMerging:!0},dataType:"json",success:function(t){t&&!t.hasError&&t.otpId?(d.fadeOut(200),openAmOtpDialog("SELF",null,e,t.otpId,null)):a.text(t.message||"Failed to send OTP.").show()},error:function(){a.text("Network error. Please try again.").show()},complete:function(){t.text("Send OTP").prop("disabled",!1)}})}),a.on("click",".merge-row",function(){$(".merge-row").removeClass("selected"),$(this).addClass("selected"),$(this).find("input[type=radio]").prop("checked",!0),$("#btnContinueToStep2").prop("disabled",!1)}),a.on("click","#btnContinueToStep2",function(){var a=$('input[name="primaryAccount"]:checked').val();a&&(t.primaryEmail=a,function renderStep2(){var a="",n=t.primaryEmail,i=t.allAccounts,o=["#7239E5","#438AE7","#E66C2F"],r=0,s=$("#mergeCustomerPhone").text().trim();for(var l in $("#manageHeaderSubtext").html("Choose how would you like to handle other accounts associated with the phone number <strong>"+s+"</strong>"),i)if(i.hasOwnProperty(l)&&l!==n){var d=i[l],c="act_"+l.replace(/[^a-zA-Z0-9]/g,"_");a+='<div class="merge-accordion-row">',a+='<div class="accordion-header">',a+='<div class="user-details">',a+='<div class="avatar" style="background-color:'+o[r++%o.length]+'">'+l.charAt(0).toUpperCase()+"</div>",a+='<div class="text-group">',a+='<span class="acc-email">'+l+"</span>",a+="</div>",a+="</div>",a+='<span class="status-chip"></span>',a+=e?'<span class="acc-arrow"><span class="arrow icon-up-arrow"></span></span>':'<span class="acc-arrow"><span class="icon-ion-chevron-up"></span></span>',a+="</div>",a+='<div class="accordion-body">',a+='<label class="merge-option">',a+='<input type="radio" name="'+c+'" value="merge">',a+="<div>Merge into primary account<small>Orders, Blue Cash, Blue Credits and other benefits will move to your primary account</small></div>",a+="</label>",!0===d.isAllowedToDiscard&&(a+='<label class="merge-option">',a+='<input type="radio" name="'+c+'" value="discard">',a+="<div>Remove from this phone number<small>You will not be able to access this account once it is removed</small></div>",a+="</label>"),a+='<label class="merge-option">',a+='<input type="radio" name="'+c+'" value="reassign">',a+="<div>Assign to a new number</div>",a+="</label>",a+='<div class="phone-input-container" style="display:none;" data-email="'+l+'">',a+='<div class="input-wrapper">',a+='<span class="country-prefix">+91</span>',a+='<input type="text" placeholder="Enter a new number" maxlength="10">',e||(a+='<span class="verify-msg" style="display:none;"></span>'),a+="</div>",a+='<button class="btn-verify">Verify</button>',e&&(a+='<span class="verify-msg"></span>'),a+="</div>",a+="</div>",a+="</div>"}$("#mergeSecondaryList").html(a),checkSaveButtonState()}(),$("#mergeStep1").hide(),$("#mergeStep2").show())}),a.on("click","#btnBackToStep1",function(){$("#mergeStep2").hide(),$("#mergeStep1").show()}
51),a.on("click",".accordion-header",function(){var e=$(this).closest(".merge-accordion-row");$(".merge-accordion-row").not(e).removeClass("open"),e.toggleClass("open")}),a.on("change",".merge-option input[type=radio]",function(){var e=$(this).closest(".merge-accordion-row"),a=e.find(".acc-email").text(),n=$(this).val(),i=e.find(".status-chip"),o=e.find(".phone-input-container"),r=o.find("input"),s=o.find(".verify-msg"),l=o.find(".btn-verify");r.val(""),s.hide().text(""),t.verifiedData[a]=null,l.prop("disabled",!1).text("Verify"),i.removeClass("chip-reassign chip-merge chip-discard").hide(),"merge"===n?(i.text("Merge").addClass("chip-merge").show(),o.slideUp(200)):"discard"===n?(i.text("Discard").addClass("chip-discard").show(),o.slideUp(200)):"reassign"===n&&o.slideDown(200),checkSaveButtonState()}),a.on("input",".phone-input-container input",function(){var e=$(this).closest(".merge-accordion-row"),a=e.find(".acc-email").text(),n=e.find(".verify-msg"),i=e.find(".status-chip"),o=e.find(".btn-verify");n.hide(),i.hide(),o.prop("disabled",!1).text("Verify"),t.verifiedData[a]=null,checkSaveButtonState()}),a.on("click",".btn-verify",function(t){t.preventDefault();var a=$(this).closest(".phone-input-container"),n=a.data("email"),i=a.find('input[type="text"]').val();(function validatePhoneLocal(e,t){e=$.trim(e);var a=t.find(".verify-msg"),n=/^[6-9]\d{9}$/;if(!e||!n.test(e))return a.show().text("Invalid number").css("color","#d32f2f"),!1;return a.hide(),!0})(i,a)&&function triggerGenerateOtpForReassign(t,a,n){var i=n.find(".btn-verify"),o=n.find(".verify-msg");i.prop("disabled",!0),e||i.text("Sending...");o.hide().text(""),$.ajax({type:"POST",url:GLOBAL_CTX+"/account-merging/generate-otp-for-contact-verification",data:{contactDetail:a,isVerificationBeforeMerging:!1},dataType:"json",success:function(e){if(e&&!e.hasError&&e.otpId)openAmOtpDialog("REASSIGN",t,a,e.otpId,n),i.prop("disabled",!1).text("Verify");else{var r=e.message||"Failed to send OTP";o.text(r).show().css("color","#d32f2f"),i.prop("disabled",!1).text("Verify")}},error:function(){o.text("Network error").show().css("color","#d32f2f"),i.prop("disabled",!1).text("Verify")}})}(n,i,a)}),n.on("click","#am-btn-submit-otp",function(){!function handleAmOtpSubmit(a){var n=t.otpContext,i=$("#am-btn-submit-otp"),o=$("#am-otp-error-feedback");if(!a||a.length<4)return void o.text("Please enter a valid OTP").css("color","#d32f2f");i.text("Verifying...").prop("disabled",!0),o.text(""),$.ajax({type:"POST",url:GLOBAL_CTX+"/account-merging/verify-contact-detail",data:{contactDetail:n.phoneNumber,otpId:n.otpId,otpString:a,isVerificationBeforeMerging:"SELF"===n.mode},dataType:"json",success:function(a){a&&!a.hasError?function applyVerificationSuccess(){var a=t.otpContext;if("SELF"===a.mode)return $("#isPhoneNumberVerified").val("true"),void closeAmOtpDialog();if("REASSIGN"===a.mode&&a.email){t.verifiedData[a.email]={phone:a.phoneNumber,otpId:a.otpId};var n=a.$rowContainer,i=n.closest(".merge-accordion-row"),o='<span class="icon-ion-ios-checkmark"></span>'+(e?" Verified":"");n.find(".verify-msg").show().html(o).css("color","#59AC59"),i.find(".status-chip").text("Re-assign").addClass("chip-reassign").show(),n.find(".btn-verify").prop("disabled",!0).text("Verified"),closeAmOtpDialog(),checkSaveButtonState()}}():(o.text(a.message||"Incorrect OTP. Please try again.").css("color","#d32f2f"),i.text("Submit").prop("disabled",!1))},error:function(){o.text("Verification failed due to network error.").css("color","#d32f2f"),i.text("Submit").prop("disabled",!1)}})}($("#am-otp-input-main").val())}),n.on("click",".am-otp-close-icon",function(){"SELF"!==t.otpContext.mode&&closeAmOtpDialog()}),n.on("click","#am-link-resend-otp",function(e){e.preventDefault(),function handleResendOtp(){var e=t.otpContext;if(!e.phoneNumber||!e.otpId)return;$("#am-link-resend-otp").text("Sending...").css("pointer-events","none"),$.ajax({type:"POST",url:GLOBAL_CTX+"/account-merging/resend-otp",data:{contactDetail:e.phoneNumber,otpId:e.otpId,isVerificationBeforeMerging:"SELF"===e.mode},dataType:"json",success:function(e){e&&!e.hasError?$("#am-otp-error-feedback").text("OTP resent successfully").css("color","green"):$("#am-otp-error-feedback").text(e.message||"Resend failed").css("color","#d32f2f")},error:function(){$("#am-otp-error-feedback").text("Network error").css("color","#d32f2f")},complete:function(){$("#am-link-resend-otp").text("Resend OTP").css("pointer-events","auto")}})}()}),a.on("click","#btnSaveUpdate",function(){$("#am-confirm-primary-email").text(t.primaryEmail),$("#am-confirm-overlay").css("display","flex").hide().fadeIn(200)}),i.on("click","#btnConfirmBack",function(){i.fadeOut(200)}),i.on("click","#btnConfirmSubmit",function(){i.hide(),function handleSubmit(){var e={primaryAccountEmail:t.primaryEmail,accountsToBeDiscarded:[],accountsToBeMerged:[],accountsToBeTransferred:[]},a=!1;if($("#mergeSecondaryList .merge-accordion-row").each(function(){var n=$(this),i=n.find(".acc-email").text(),o=n.find("input[type=radio]:checked").val();if(o)if("merge"===o)e.accountsToBeMerged.push(i);else if("discard"===o)e.accountsToBeDiscarded.push(i);else if("reassign"===o){var r=n.find(".phone-input-container input").val(),s=t.verifiedData[i];if(!s||s.phone!==r)return n.find(".phone-input-container input").focus(),a=!0,!1;e.accountsToBeTransferred.push({email:i,newPhoneNumber:s.phone,otpId:s.otpId})}}),a)return;$.ajax({type:"POST",url:GLOBAL_CTX+"/account-merging/process-accounts",contentType:"application/json",dataType:"json",data:JSON.stringify(e),success:function(e){e&&!e.hasError&&(!0!==e.isLogoutRequired?window.location.reload(!0):openWebViewLink(GLOBAL_CTX+"/signout",!1,{preventDefault:function(){}}))},error:function(e){}})}()})})}(),function(){var e=null,t=null;function sendOtp(){var a=$.trim($("#pc-phone").val());/^[6-9]\d{9}$/.test(a)?(e=a,function clearPhoneMsg(){$("#pc-phone-msg").hide().text("").removeClass("pc-success")}(),$("#pc-send-otp").prop("disabled",!0).text("Sending..."),$.ajax({type:"POST",url:GLOBAL_CTX+"/account-merging/generate-otp-for-contact-verification",data:{contactDetail:e,isVerificationBeforeMerging:!0},dataType:"json",success:function(a){a&&!a.hasError&&a.otpId?(t=a.otpId,$("#pc-verify-heading").html("Verify your number "+e),$("#pc-screen-1").hide(),$("#pc-screen-2").fadeIn(150)):showPhoneMsg(a.message||"Failed to send OTP",!1)},error:function(){showPhoneMsg("Network error. Please try again.",!1)},complete:function(){$("#pc-send-otp").prop("disabled",!1).text("Send OTP")}})):showPhoneMsg("Invalid mobile number",!1)}function submitOtp(){var a=$.trim($("#pc-otp").val());!a||a.length<4?showOtpMsg("Please enter valid OTP",!1):($("#pc-submit").prop("disabled",!0).text("Verifying..."),$.ajax({type:"POST",url:GLOBAL_CTX+"/account-merging/verify-contact-detail",data:{contactDetail:e,otpId:t,otpString:a,isVerificationBeforeMerging:!0},dataType:"json",success:function(e){e&&!e.hasError?window.location.reload(!0):showOtpMsg(e.message||"Incorrect OTP",!1)},error:function(){showOtpMsg("Network error. Please try again.",!1)},complete:function(){$("#pc-submit").prop("disabled",!1).text("Submit")}}))}function resendOtp(a){a.preventDefault(),e&&t&&($("#pc-resend").text("Sending..."),$.ajax({type:"POST",url:GLOBAL_CTX+"/account-merging/resend-otp",data:{contactDetail:e,otpId:t,isVerificationBeforeMerging:!0},dataType:"json",success:function(e){e&&!e.hasError?showOtpMsg("OTP resent successfully",!0):showOtpMsg(e.message||"Resend failed",!1)},error:function(){showOtpMsg("Network error. Please try again.",!1)},complete:function(){$("#pc-resend").text("Resend OTP")}}))}function goBack(){$("#pc-screen-2").hide(),$("#pc-screen-1").fadeIn(150),$("#pc-otp").val(""),function clearOtpMsg(){$("#pc-otp-msg").hide().text("").removeClass("pc-success")}()}function showPhoneMsg(e,t){var a=$("#pc-phone-msg");a.removeClass("pc-success"),t&&a.addClass("pc-success"),a.text(e).show()}function showOtpMsg(e,t){var a=$("#pc-otp-msg");a.removeClass("pc-success"),t&&a.addClass("pc-success"),a.text(e).show()}$(document).ready(function(){var e="undefined"!=typeof execution_step&&""!==$.trim(execution_step);"false"!==$("#hasPhoneNumber").val()||e||function openOverlay(){$("#phoneCaptureOverlay").css("display","flex").hide().fadeIn(200),$("body").css("overflow","hidden")}
51(),$("#pc-send-otp").on("click",sendOtp),$("#pc-submit").on("click",submitOtp),$("#pc-back").on("click",goBack),$("#pc-resend").on("click",resendOtp)})}(),$(document).ready(function(){window.addEventListener("click",function(e){var t=document.getElementById("multipleAccountsFilterDropdown");t&&(t.style.display="none")})}),$(document).ready(function(){"undefined"!=typeof PAGE_TYPE&&"Payment_Success"===PAGE_TYPE&&deferAddressRedirect()}),$(document).ready(function(){window.bsNotificationUtil={show:function(e){e=e||{};var t=$('<div class="bs-notification"><span class="bs-notification-close" style="position:absolute;top:10px;right:12px;cursor:pointer;font-size:18px;">&times;</span>'+(e.html||"")+"</div>"),a=!!e.container;t.css({width:void 0!==e.width?e.width:"450px",background:void 0!==e.backgroundColor?e.backgroundColor:"#fff",zIndex:void 0!==e.zIndex?e.zIndex:99999,padding:void 0!==e.padding?e.padding:"15px",border:void 0!==e.border?e.border:"1px solid #d9e2ec",borderRadius:void 0!==e.borderRadius?e.borderRadius:"8px",boxShadow:void 0!==e.boxShadow?e.boxShadow:"0 4px 12px rgba(0,0,0,0.15)",position:void 0!==e.isInlineNotification?"relative":"fixed"}),a?$(e.container).append(t):(t.css({left:void 0!==e.left?e.left:"auto",right:null!=e.right?e.right:"auto",top:null!=e.top?e.top:"auto",bottom:null!=e.bottom?e.bottom:"auto",transform:null!=e.transform?e.transform:"none"}),$("body").append(t)),t.find(".bs-notification-close").click(function(){t.remove()}),e.duration&&setTimeout(function(){t.fadeOut(300,function(){t.remove()})},e.duration)},hide:function(){$(".bs-notification").remove()}}}),$(document).ready(function(){"product"===PAGE_TYPE&&$(document).on("click","#product-notification-wishlist-btn",function(){var e="undefined"!=typeof deviceName&&"MOBILE"===deviceName,t=Boolean(getCookie("bsApp")),a="undefined"!=typeof productCategory&&"Gold Coins"==productCategory;(e||t)&&a?$(".wishlist-button").first().trigger("click"):$("a.wishlist").first().trigger("click");var n=$(this);"Add to wishlist"===$.trim(n.text())?(n.hide(),bsNotificationUtil.hide()):n.text("Add to wishlist")}),""===PAGE_TYPE&&"undefined"!=typeof cartType&&"jewellery"===cartType&&"undefined"!=typeof execution_step&&"viewCart"===execution_step&&function checkCartSizeLimit(){var e=parseInt($("#maxCartSize").val(),10)||0,t=parseInt($("#totalCartSize").val(),10)||0;if(!(t<e)){var a="undefined"!=typeof deviceName&&"MOBILE"===deviceName,n=Boolean(getCookie("bsApp"));window.bsNotificationUtil&&"function"==typeof window.bsNotificationUtil.show?window.bsNotificationUtil.show({container:"#cart-notification-container",isInlineNotification:!0,width:a||n?"":"100%",backgroundColor:"#EEF4FA",border:"2px solid #021B55",html:'<div><div style="font-size:18px; font-weight:700; color:#636161; margin-bottom:8px;">Your cart is full! ('+t+' items)</div><div style="font-size:16px;color:#636161;">Please remove items or move them to the wishlist to add more items.</div></div>'}):setTimeout(function(){checkCartSizeLimit()},100)}}()}),$(document).ready(function(){if("viewCart"===execution_step){const e=$(".true-blue-values"),t=$(".true-blue-saving-tip"),a=$(".saving-amount"),n=$(".true-blue-cart-add-button");$.ajax({type:"GET",url:GLOBAL_CTX+"/pos/true-blue/denomination",dataType:"json",success:function(i){if(i&&i.payload&&i.payload.trueBlueDenomination){const o=i.payload.trueBlueDenomination;!function renderDenominationButtons(i,o){if(0===e.length)return;e.empty(),i.forEach(i=>{const r=formatPrice(i),s=$("<button>",{class:"true-blue-amount-btn",html:r,"data-amount":i});s.on("click",function(){$(".true-blue-amount-btn").removeClass("selected"),$(this).addClass("selected");const e=formatPrice(i*o);a.html(e),t.show(),n.show()}),e.append(s)})}(o.denominations,o.couponCount||4)}},error:function(e,t,a){}}),n.on("click",function(e){e.preventDefault();const t=$(".true-blue-amount-btn.selected");if(0===t.length)return;const a=t.attr("data-amount"),n=$("#ajax_loader");n.length>0&&n.show(),$.ajax({type:"POST",url:GLOBAL_CTX+"/order",data:"subscriptionAmount="+a,dataType:"text",success:function(e,t,a){n.length>0&&n.hide(),window.location.href=GLOBAL_CTX+"/order"},error:function(e,t,a){n.length>0&&n.hide()}})})}}),$(document).ready(function(){function closeAutopayPopup(){$("#autopayTogglePopup").hide();var e=document.querySelector("#autopayTogglePopup");e&&e.setAttribute("data-initiate-transaction","false"),$("#autopayOverlayMask").hide(),$("body").removeClass("freeze-scroll")}function updateAutopayState(e){var t=$("#upiAutopayStatus"),a=$(".autopay-state-chip"),n=$(".autopay-action-trigger"),i=$(".autopay-state-description"),o=$(".add-new-upi-section, .card-form-expand"),r=$("#autopayUiVariant").val()||"V1",s="V1"===r?"Set-up Autopay":"Enable Autopay";e?(t.val("true"),o.toggleClass("autopay-ribbon-enabled","V4"!==r),a.text(s).toggleClass("hidden","V4"===r).addClass("ap-enabled"),n.text("Make a one-time payment →").removeClass("ap-off-btn"),i.text("We'll automatically process your monthly payment on the due date.").toggleClass("hidden","V4"===r),"function"==typeof stopAutoPaySequence&&stopAutoPaySequence()):(t.val("false"),o.removeClass("autopay-ribbon-enabled"),a.addClass("hidden").removeClass("ap-enabled"),n.text("Enable Autopay").addClass("ap-off-btn"),i.text("Autopay disabled. You'll have to make payments manually every month.")),updateCardPaymentButtonLabel()}$(document).on("click",".new-section-for-card, .payment-row",function(){setTimeout(updateCardPaymentButtonLabel,0)}),$(document).on("click",".autopay-action-trigger",function(e){e.preventDefault();var t=$("#upiAutopayStatus").val(),a=$(this).data("payment-method")||"upi";if("true"===t){$("#autopayTogglePopup").data("payment-method",a);var n=document.querySelector("#autopayTogglePopup");n&&n.setAttribute("data-initiate-transaction","false"),$("#autopayOverlayMask").show(),$("#autopayTogglePopup").show(),$("body").addClass("freeze-scroll"),manualPaymentSelected("disable",a)}else updateAutopayState(!0),manualPaymentSelected("enable")}),$(document).on("click","#btnCloseAutopayPopup, #autopayOverlayMask",function(e){e.preventDefault(),closeAutopayPopup()}),$(document).on("click","#btnKeepAutopay",function(e){e.preventDefault();var t=document.querySelector("#autopayTogglePopup"),a=null!==t&&"true"===t.getAttribute("data-initiate-transaction");a&&updateAutopayState(!0),closeAutopayPopup(),a&&($("#payment-button, #generate-btn").addClass("btn loading"),initiateTransaction(e))}),$(document).on("click","#btnConfirmManualPayment",function(e){e.preventDefault();var t=$("#autopayTogglePopup").data("payment-method")||"upi",a=document.querySelector("#autopayTogglePopup"),n=null!==a&&"true"===a.getAttribute("data-initiate-transaction");closeAutopayPopup(),updateAutopayState(!1),manualPaymentSelected("confirm",t),n&&($("#payment-button, #generate-btn").addClass("btn loading"),initiateTransaction(e))}),updateAutopayState("true"===$("#upiAutopayStatus").val())}),$(document).ready(function(){"undefined"!=typeof customerCode&&customerCode&&"undefined"!=typeof cartType&&"jewellery"===cartType&&"undefined"!=typeof execution_step&&"viewCart"===execution_step&&$.ajax({type:"GET",url:PAGE_BASE_URL+"/pos-cart/items?customerCode="+customerCode+"&cartItemsOnly=true",cache:!1,async:!0,data:"fetchFilterData=true",success:function(e){if(!e.hasError){if(0===e.length)return;const n=e.filter(e=>"POS_CART"===e.sourceType).length,i=getPageVariantFromCookie("EX_HOME_");if("V4"!=i&&"V5"!=i)return;if(n<1)return;var t=document.querySelector("#pos-cart-items-container");let o="";e.forEach(function(e){o+=getProductCardHTML(e)}),t.innerHTML=o;var a=document.querySelector("#pos-cart-container");a&&a.classList.remove("hidden"),t.addEventListener("scroll",updatePOSCartScrollBtn),updatePOSCartScrollBtn();const r=document.getElementById("posCartFloatingBtnContainer");r&&(r.classList.remove("hidden"),setTimeout(()=>{r.classList.add("hidden")},5e3))}},error:function(){}})}),function(){var e="",t="",a=!1;function getCookieValue(e){if("function"==typeof getCookie)return getCookie(e)}function isApp(){return void 0!==isAppWebView&&isAppWebView||Boolean(getCookieValue("bsApp")&&"false"!==getCookieValue("bsApp"))}function proceedOriginalSubmit(e,t){t&&checkValidAccountDetailsForGMS(null,t)}function showGuestPopupError(e){e?($("#guest-otp-error").text(e),$("#guest-popup-messages").show()):($("#guest-popup-messages").hide(),$("#guest-otp-error").text(""))}function sendGuestOtp(e,a,n){a&&a.addClass("loading").prop("disabled",!0),showGuestPopupError(""),$.ajax({type:"POST",url:GLOBAL_CTX+"/generate-and-send-otp",dataType:"json",data:{contactNumberOrEmail:e,isSignUp:"false"},success:function(e){if(a&&a.removeClass("loading").prop("disabled",!1),"string"==typeof e)try{e=JSON.parse(e)}catch(e){}e&&e.hasError?showGuestPopupError(e.message||"Error generating OTP"):(e&&e.otpId&&(t=e.otpId,$("#guest-otp-id").val(e.otpId)),$("#guest-login-modal .otp-countdown-msg").addClass("hidden"),$("#guest-login-modal .otp-options").removeClass("hidden"),n&&n(e))},error:function(){a&&a.removeClass("loading").prop("disabled",!1),showGuestPopupError("Error sending OTP. Please try again.")}})}function resetGuestLoginModal(){$("#guest-otp-phone").val(e),$("#guest-otp-code").val(""),$("#guest-email-input").val(""),$("#guest-otp-submit").removeClass("loading").prop("disabled",!1),$("#guest-email-submit").removeClass("loading").prop("disabled",!1),$("#guest-multiple-email-submit").removeClass("loading").prop("disabled",!1),showGuestPopupError(""),$("#guest-login-desc").text("We have sent an OTP on your mobile number. Please enter the OTP below.").show(),$("#guest-email-row").hide(),$("#guest-multiple-email-section").hide(),$("#guestMultipleEmailList").empty(),$("#guest-otp-verification-form").show(),$("#guest-login-email-opt").show(),$(".resend-otp-wrap").show()}function openGuestLoginModal(a,n,i){e=a,t="",resetGuestLoginModal(),$("#guest-otp-id").val(""),$("#guest-login-modal").addClass("show"),sendGuestOtp(a)}function closeGuestLoginModal(){$("#guest-login-modal").removeClass("show"),resetGuestLoginModal(),n="",$(".guest-checkout-phone").val("").trigger("change")}function verifyGuestOtp(){var a=$.trim($("#guest-otp-code").val());if(!a||a.length<4)showGuestPopupError("Please enter a valid 4-digit OTP");else{var n=$("#guest-otp-phone").val()||e,i=$("#guest-otp-id").val()||t,o=$("#guest-otp-submit");o.addClass("loading").prop("disabled",!0),showGuestPopupError(""),$.ajax({type:"POST",url:GLOBAL_CTX+"/verify-otp",dataType:"json",data:{otp:a,contactNumberOrEmail:n,otpId:i,isSignUp:"false"},success:function(e){if(o.removeClass("loading").prop("disabled",!1),"string"==typeof e)try{e=JSON.parse(e)}catch(e){}e&&e.hasError?showGuestPopupError(e.message||"Invalid OTP. Please try again."):e&&!0===e.isMultipleAccounts&&e.customerEmailList&&e.customerEmailList.length>0?(e.otpId&&(t=e.otpId,$("#guest-otp-id").val(e.otpId)),function showGuestMultipleEmailSection(e){$("#guest-otp-verification-form").hide(),$("#guest-email-row").hide(),$("#guest-login-email-opt").hide(),$("#guest-login-modal .resend-otp-wrap").hide(),$("#guest-login-modal .otp-countdown-msg").addClass("hidden"),$("#guest-login-modal .otp-options").addClass("hidden"),showGuestPopupError(""),$("#guest-login-desc").text("Please select your email ID.").show();var t=function getGuestEmailListHTML(e){for(var t="<ul>",a=0;a<e.length;a++){var n=e[a],i="guestCustomerEmail-"+a;t+='<li><input type="radio" name="guestCustomerEmail" value="'+n+'" id="'+i+'" /><label for="'+i+'">'+("function"==typeof maskEmail?maskEmail(n):n)+"</label></li>"}return t+="</ul>"}(e||[]);$("#guestMultipleEmailList").html(t),$("#guest-multiple-email-section").show()}(e.customerEmailList)):$("#refresh-guest-form").length>0?$("#refresh-guest-form").submit():window.location.reload()},error:function(){o.removeClass("loading").prop("disabled",!1),showGuestPopupError("Error verifying OTP. Please try again.")}})}}
51function submitGuestMultipleAccountLogin(){var e=$('#guest-login-modal input[name="guestCustomerEmail"]:checked').val();if(e){var a=$("#guest-otp-id").val()||t||"",n=$("#guest-multiple-email-submit");n.addClass("loading").prop("disabled",!0),showGuestPopupError(""),$.ajax({type:"POST",url:GLOBAL_CTX+"/signin",dataType:"json",data:{email:e,otpId:a,SubmitLogin:"1"},success:function(e){if(n.removeClass("loading").prop("disabled",!1),"string"==typeof e)try{e=JSON.parse(e)}catch(e){}e&&e.hasError?showGuestPopupError(e.errors&&e.errors.join("<br />")||e.message||"Error signing in. Please try again."):$("#refresh-guest-form").length>0?$("#refresh-guest-form").submit():window.location.reload()},error:function(){n.removeClass("loading").prop("disabled",!1),showGuestPopupError("Error signing in. Please try again.")}})}else showGuestPopupError("Please select an email ID.")}window.handleGuestLoginCheck=function(e,t){e&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation());var n=$(t).closest("form")[0];if(!n)return!1;if(window.isLoggedIn)return proceedOriginalSubmit(0,t),!1;if("function"==typeof validateForm&&!validateForm(n.id))return!1;if(isApp())return proceedOriginalSubmit(0,t),!1;var i=n.elements.phone||$(n).find('input[name="phone"]')[0],o=i?$.trim(i.value).replace(/\D/g,""):"";return 10!==o.length?(proceedOriginalSubmit(0,t),!1):(a||(a=!0,$.ajax({type:"GET",url:GLOBAL_CTX+"/check-phone",data:{phone:o},cache:!1,success:function(e){if(a=!1,"string"==typeof e)try{e=JSON.parse(e)}catch(e){}var i=e&&e.payload||{},r="undefined"!=typeof PAGE_TYPE&&PAGE_TYPE?PAGE_TYPE:"undefined"!=typeof page_type&&page_type?page_type:"goldmine";if("function"==typeof trackPhoneNumberEntered&&trackPhoneNumberEntered(i.isBsAct,i.isNewCustomer,r),"v1"!==(getCookieValue("EX_GC_1")||"").toLowerCase()){var s=!1;e&&e.payload&&!0===e.payload.isLoginRequired&&(s=!0),s?openGuestLoginModal(o,n,t):proceedOriginalSubmit(0,t)}else proceedOriginalSubmit(0,t)},error:function(){a=!1,proceedOriginalSubmit(0,t)}})),!1)};var n="";window.checkPhoneCheckout=function(e){if(!isApp()){var t=((e?$(e).val():$("#contactNumber").val())||"").replace(/\D/g,"");t.length<10?n="":10===t.length&&t!==n&&(a||(a=!0,n=t,$.ajax({type:"GET",url:GLOBAL_CTX+"/check-phone",data:{phone:t},cache:!1,success:function(e){if(a=!1,"string"==typeof e)try{e=JSON.parse(e)}catch(e){}var n=e&&e.payload||{};("function"==typeof trackPhoneNumberEntered&&trackPhoneNumberEntered(n.isBsAct,n.isNewCustomer,"checkout"),"v1"!==(getCookieValue("EX_GC_1")||"").toLowerCase())&&(e&&e.payload&&!0===e.payload.isLoginRequired&&openGuestLoginModal(t))},error:function(){a=!1}})))}},$(document).ready(function(){$(document).on("change blur",".guest-checkout-phone",function(){window.checkPhoneCheckout(this)}),$("#guest-login-modal").on("click","#guestLoginClose",function(e){e.preventDefault(),closeGuestLoginModal()}),$("#guest-login-modal").on("click",function(e){e.target===this&&closeGuestLoginModal()}),$("#guest-login-modal").on("click","#guest-otp-submit",function(e){e.preventDefault(),verifyGuestOtp()}),$("#guest-login-modal").on("click","#guestLoginWithEmail",function(e){e.preventDefault(),function switchToGuestEmailView(){showGuestPopupError(""),$("#guest-login-desc").text("Please enter your email address below. We will send you the OTP."),$("#guest-otp-verification-form").hide(),$("#guest-login-email-opt").hide(),$(".resend-otp-wrap").hide(),$("#guest-email-row").show();var e=$("#email").val()||"";e&&!$("#guest-email-input").val()&&$("#guest-email-input").val(e),$("#guest-email-input").focus()}()}),$("#guest-login-modal").on("click","#guest-email-submit",function(e){e.preventDefault(),function sendGuestEmailOtp(){var e=$.trim($("#guest-email-input").val());e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?sendGuestOtp(e,$("#guest-email-submit"),function(){$("#guest-otp-phone").val(e),$("#guest-email-row").hide(),$("#guest-login-desc").text("We have sent an OTP on your email address. Please enter the OTP below."),$("#guest-otp-code").val(""),$("#guest-otp-verification-form").show(),$("#guest-login-email-opt").hide(),$(".resend-otp-wrap").show(),$("#guest-otp-code").focus()}):showGuestPopupError("Please enter a valid email address")}()}),$("#guest-login-modal").on("click",".resend-otp-btn",function(a){a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation();var n=$(this).data("mode")||"text",i=$("#guest-otp-phone").val()||e,o=$("#guest-otp-id").val(),r=$(this).closest(".resend-otp-wrap");showGuestPopupError(""),$.ajax({type:"POST",url:GLOBAL_CTX+"/resend-otp",dataType:"json",data:{contactNumberOrEmail:i,otpId:o,isSignUp:"false",otpDeliveryMode:n},success:function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}e&&e.hasError?showGuestPopupError(e.message||"Error resending OTP"):(e&&e.otpId&&(t=e.otpId,$("#guest-otp-id").val(e.otpId)),"function"==typeof startOTPTimer&&r.length&&startOTPTimer(r,30))},error:function(){showGuestPopupError("Error resending OTP. Please try again.")}})}),$("#guest-login-modal").on("click","#guest-multiple-email-submit",function(e){e.preventDefault(),submitGuestMultipleAccountLogin()}),$("#guest-login-modal").on("submit","#guest-email-verification-form",function(e){e.preventDefault(),submitGuestMultipleAccountLogin()}),$("#guest-login-modal").on("change",'input[name="guestCustomerEmail"]',function(){showGuestPopupError("")})})}();
52let webengageObserver,webengageObserverHome,webengageObserverBrowse;function loadTestimonialProductImages(e){$(window).scrollTop()>100&&e.each(function(e,t){var a=t.getAttribute("data-src");t.setAttribute("src",a)})}function loadInstagramWidget(){$(window).scrollTop()>100&&$("#lightWidget").replaceWith('<script src="//lightwidget.com/widgets/lightwidget.js"><\/script><iframe src="//lightwidget.com/widgets/2d3204bf89c15980af344dafe7b88a3c.html" id="lightwidget_2d3204bf89" name="lightwidget_2d3204bf89"  scrolling="no" allowtransparency="true" class="lightwidget-widget" style="width: 100%; border: 0; overflow: hidden;"></iframe>')}function loadFacebookPageWidget(){$(window).scrollTop()>100&&$("#facebookWidget").replaceWith('<div class="fb-page" data-href="https://www.facebook.com/bluestonejewels" data-width="515" data-hide-cover="false" data-show-facepile="true" data-tabs="false"></div><div id="fb-root"></div><script>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) return;js = d.createElement(s); js.id = id;js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.7";fjs.parentNode.insertBefore(js, fjs);}(document, "script", "facebook-jssdk"));<\/script>')}function showVoucherAddPopUp(){"true"==$("#showFreeGiftRemovalPopupDiv").html()&&$(".fg-popup-wrapper #addVoucherPopup").fancybox({autoScale:!1,wrapCSS:"fancybox-style2"}).trigger("click")}function removeProductPopup(e,t){$("#removeProductPopup_"+e).fancybox().trigger("click")}function jewelleryExchangeRegister(){var e={je_name:$("#jewellery-exchange-form #name").val(),je_email:$("#jewellery-exchange-form #email").val(),je_phone:$("#jewellery-exchange-form #phone").val(),je_city:$("#jewellery-exchange-form .je-city input[type=radio]:checked").val(),je_pincode:$("#jewellery-exchange-form #pincode").val(),je_address:$("#jewellery-exchange-form #address").val(),je_tnc:$("#jewellery-exchange-form #tnc").val()},t=JSON.stringify(e);$.ajax({type:"POST",url:GLOBAL_CTX+"/exchange_jewellery/store_exchange_leads",dataType:"json",data:{data:t},success:function(e){e.hasError?($("#popup-messages").html('<div class="error-container text-center"><div class="error-container-inner">There was some error while submitting the form.</div><div>'),$("#popup-messages").fadeIn(),$("#jewellery-exchange-form").show()):($("#popup-messages").html('<div class="success-container text-center"><div class="success-container-inner"><i class="icon-ion-ios-checkmark-outline"></i><br>Thank you!<br> We will get back to you soon.</div><div>'),$("#popup-messages").fadeIn(),$("#jewellery-exchange-form").hide())}})}function shopInShopRegister(){if(0==$("#shop-in-shop-form").validationEngine("validate"))return!1;$("#popup-messages").html('<div class="success-container text-center"><div class="success-container-inner"><i class="icon-ion-ios-checkmark-outline"></i><br>Thank you!<br> We will get back to you soon.</div><div>'),$("#popup-messages").fadeIn(),$("#shop-in-shop-form").hide()}function filtersBrowsePage(){$(".sidebar-left input").click(function(){var e="";"undefined"!=typeof search_query&&(e=e+"search_query="+search_query+"&"),window.location=$(this).attr("link")}
52),$(window).load(function(){$("#top-filter-hover .content").mCustomScrollbar()})}function noZero(e,t,a,i){t[a+1];if(0==e.val().charAt(0))return"First letter cannot be 0."}function formatIndianNumber(e,t,a,i){var o=(e=Number(e).toFixed(t))+"",r=o.split("."),s=2==r.length?r[0]:o,n=("0."+(2==r.length?r[1]:0)).substr(2),l=s.length,d="";if(l>3)for(d=a+s.substring(l-3),s=s.substring(0,l-3),l-=3;l>2;)d=a+s.substring(l-2)+d,s=s.substring(0,l-2),l-=2;return s+=d,0==parseInt(t)?s:s+i+(n>0?n:"00")}$(document).ready(function(){Array.prototype.forEach||(Array.prototype.forEach=function(e,t){for(var a=0,i=this.length;a<i;++a)e.call(t,this[a],a,this)}),Array.prototype.every||(Array.prototype.every=function(e){var t=this.length;if("function"!=typeof e)throw new TypeError;for(var a=arguments[1],i=0;i<t;i++)if(i in this&&!e.call(a,this[i],i,this))return!1;return!0}),$("#address-password-form").validationEngine(),$("#gold-mine-form").validationEngine(),$("#voucher").validationEngine(),$("#newOffer-form").validationEngine(),$("#giveaway-form").validationEngine(),$("#sol-nlp .sol-acc h4").click(function(){$("#sol-nlp .sol-acc h4").parent(".acc-content").removeClass("active"),$(this).parent(".acc-content").addClass("active")}),$(".popup-footer").click(function(){$("#fancybox-wrap").animate({scrollTop:0},800)}
52),$("#blueFewClub3Claim ul li").click(function(){var e=$(this);e.parent("ul").find("li").removeClass("active"),e.addClass("active"),e.find("input").prop("checked","checked")}),$("#bluefew-benefits ul li a").hover(function(){var e=$(this);e.parents("ul").find("li a").removeClass("bluefew-active"),e.parents("ul").find("div").removeClass("active-content"),e.addClass("bluefew-active"),e.parents("li").find("div").addClass("active-content")}),$.fn.jtooltip=function(){var e,t,a,i;$(window).width();$(this).mouseover(function(){e=$(this).offset(),t=$(this).attr("class"),a=$(this).data("pos"),i=$("#"+t),"rt"==a?(i.css({left:e.left-i.width()+30,top:e.top+40}).fadeIn("slow"),i.addClass("rt")):i.css({left:e.left-$("#"+t).width()/2,top:e.top+40}).fadeIn("slow")}).mouseout(function(){$("#"+t).fadeOut("slow")})},$(".cyan,.azure,.turquoise,.sapphire,.bclub").jtooltip(),$("#ewallet-btn, #giftcard-btn, .payment-web-flow #rewardpoints-content #continuePayment").click(function(){enableFirstPaymentOption()}),$("#egift-card-content #cpButton").click(function(){$("#payment-details>div").hide().animate({top:0,opacity:0},500,"easeInOutCubic").dequeue(),$(".payment_tab").removeClass("selected"),$("#payment-details .payment_detail:first").show().animate({top:-5,opacity:1},500,"easeInOutCubic").dequeue(),$("#payment-tabs .payment_tab:first").addClass("selected"),$("#creditcard-content").addClass("paymentSelectedTab").siblings().removeClass("paymentSelectedTab")}),$(".pay-payu").click(function(){$(this).parents("form").attr("name","Wallet")}),$(".spc-content #rewardpoints-content #continuePayment").click(function(){$(".formError").remove(),$(".payment-option-form>div").removeClass("selected"),$("#creditcard-content").addClass("selected"),$(".payment-option-title li").removeClass("selected"),$(".payment-option-title li:first-child").addClass("selected")}),$(".ehelp").mouseover(function(){$(this).parent("div").find(".jtooltip").addClass("active")}).mouseout(function(){$(this).parent("div").find(".jtooltip").removeClass("active")}),$(".hp-tp-widgets ul li").mouseenter(function(){$(this).find(".tooltip").addClass("active"),$(this).siblings().find(".tooltip").removeClass("active")});var e=$(".blue-few #lptbl tbody tr"),t=e.filter(".active-p").show();e.not(t).hide(),$(".blue-few #active").click(function(){$(".b-tabs").removeClass("active"),$(this).addClass("active");var t=e.filter(".active-p").show().focus();e.not(t).hide()}),$(".blue-few #pending").click(function(){$(".b-tabs").removeClass("active"),$(this).addClass("active");var t=e.filter(".pending-p").show().focus();e.not(t).hide()}
52),$("#addDetails").click(function(){var e=$(this);$("#extraDetails").slideDown(400),e.slideUp(400)}),$(".closeme").click(function(){$("#extraDetails").slideUp(400),$("#addDetails").slideDown(400)}),$(".je_tc_link").click(function(){$(".query-link").removeClass("active"),$(".tnc-link").addClass("active"),$(".query").hide(),$(".tnc").show();var e=$("#je-t-c").offset().top;$("html,body").animate({scrollTop:e-100},1e3)}),$(".page-jewellery-exchange .faq .query-link").click(function(){$(this).addClass("active"),$(this).next().removeClass("active"),$(this).parent(".lft").next().find(".query").show(),$(this).parent(".lft").next().find(".tnc").hide()}),$(".page-jewellery-exchange .faq .tnc-link").click(function(){$(this).addClass("active"),$(this).prev().removeClass("active"),$(this).parent(".lft").next().find(".query").hide(),$(this).parent(".lft").next().find(".tnc").show()}),$("#new-user-login").validationEngine(),$("#rewardpoints-1").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return getBalance()}}),$("#rewardpoints-2").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return getOTP()}}),$("#rewardpoints-3").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return redeemPoints()}}),$("#jewellery-exchange-form").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return jewelleryExchangeRegister()}}),$("#rewardpoints-31").validationEngine(),$("#user-login").validationEngine(),$("#reserve-price-form").validationEngine(),$(".zoom-disabled").click(function(e){$(this).parents("#details-top-left").addClass("no-zoom")}),$(".zoom-enabled").click(function(e){$(this).parents("#details-top-left").removeClass("no-zoom")}),$("#subscriber-form").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return submitSubscriber()}}),$("#daily-fortune-subscriber-form").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return submitDailyFortuneSubscriber()}}),$("#wedding-preference-form").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return submitWeddingPreference()}}),$("#rakhicontest-form").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return validateAndSubmitRakhiContest()}}),$("#express-interest").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return validateAndSubmitDirectSeller()}}),$("#careerForm").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return careerForm()}}),$("#address-form").validationEngine();var a=$("#details-wrapper").parent(".block-style3").height()-4;function getNotificationErrorHtml(e){return'<div class="error-container"> <span class="icon"></span><span>'+e+"</span></div>"}$("#shdw-style2 #details-wrapper").after("<style type='text/css'>#cloud-zoom-big {height:"+a+"px !important}</style>"),$("#search-criteria p").click(function(){$(this).fadeOut("slow"),window.location=$(this).attr("link")}),$(".payment_detail").css({opacity:0}),$(".payment_tab:first").addClass("selected"),$(".payment_detail:first").show().animate({top:-5,opacity:1},500,"easeInOutCubic").addClass("paymentSelectedTab"),$(".payment_tab").click(function(){deleteCookie("continueWithBSWallet"),$(".formError").remove(),$("#payment-options input:radio").removeAttr("checked"),$("#EmiOption-content").find("input:radio").removeAttr("checked"),$("#payment-details>div").hide().animate({top:0,opacity:0},500,"easeInOutCubic").dequeue(),$(".payment_tab").removeClass("selected"),$(this).addClass("selected");var e=$(this).attr("id");"cashondelivery"==e||"cardOnDelivery"==e?getEDDForCOD():getEDDForPrepaid();var t="block"==$("#cashondelivery-content #availability").css("display"),a="";isSolitaire||t||("cashondelivery"==e&&$("#cashondelivery-content .otp-verification").length>0&&(a=$('#cashondelivery-content .otp-verification input[type="tel"]').val().split(" - ")[1],trackGA("BsUI","CheckoutFlow","CashOnDelivery Selected "+a)),"cardOnDelivery"==e&&$("#cardOnDelivery-content .otp-verification").length>0&&(a=$('#cardOnDelivery-content .otp-verification input[type="tel"]').val().split(" - ")[1],trackGA("BsUI","CheckoutFlow","CardOnDelivery Selected "+a))),"cardOnDelivery"!=e&&(clearInterval(timerID),$("#cardOnDelivery-content .paymentSelectedTabTwo").hide(),$("#cardOnDelivery-content .paymentSelectedTabTwo #otp-count-down").each(function(){$(this).text(60)}),$("#cardOnDelivery-content .paymentSelectedTabOne").show(),$("#cardOnDelivery-content .paymentSelectedTabOne .sendOTP").removeClass("hidden"),$("#cardOnDelivery-content .paymentSelectedTabOne .payment-loader").addClass("hidden"),$("#cardOnDelivery-content .otp-timer-block").removeClass("disable"),$("#cardOnDelivery-content .otp-not-recv-msg").slideUp()),"cashondelivery"!=e&&(clearInterval(timerID),$("#cashondelivery-content .paymentSelectedTabTwo").hide(),$("#cashondelivery-content .paymentSelectedTabTwo #otp-count-down").each(function(){$(this).text(60)}),$("#cashondelivery-content .paymentSelectedTabOne").show(),$("#cashondelivery-content .paymentSelectedTabOne .sendOTP").removeClass("hidden"),$("#cashondelivery-content .paymentSelectedTabOne .payment-loader").addClass("hidden"),$("#cashondelivery-content .otp-timer-block").removeClass("disable"),$("#cashondelivery-content .otp-not-recv-msg").slideUp()),$(".EnterVerificationCode #otp-code").val(""),$("#"+e+"-content").addClass("paymentSelectedTab").siblings().removeClass("paymentSelectedTab"),$("#"+e+"-content").show().animate({top:-5,opacity:1},500,"easeInOutCubic").dequeue();$(this).text();$("#creditcardSeamless-content").hasClass("paymentSelectedTab")&&creditCardNameAttrUpdate(),$("#debit
52cardSeamless-content").hasClass("paymentSelectedTab")&&debitCardNameAttrUpdate(),$("#jusPay").hasClass("selected")&&$("#jusPay-content").hasClass("paymentSelectedTab")&&$("#jusPay-content .service_provider_radio").prop("checked","checked")}),$("#creditcardSeamless-content").hasClass("paymentSelectedTab")&&creditCardNameAttrUpdate(),$("#debitcardSeamless-content").hasClass("paymentSelectedTab")&&debitCardNameAttrUpdate(),$(".slide-thumbs ul li:last").addClass("last"),$(".slide-thumbs ul li:first").addClass("active"),$(".slide-thumbs ul li a").click(function(){$(".slide-thumbs ul li").removeClass("active"),$(this).parent().addClass("active")}),$("#forget-password-link a").click(function(e){e.preventDefault(),$("#user-signup").slideToggle(500),$("#forget-password-form").slideToggle(500)}),$("#forget-password-link a").on("click",function(){$("#forget-password-form").show(),$("#popup-messages .success-container").remove(),$("#popup-messages .error-container").remove(),$(".formError").remove()}),$(document).delegate("#forget-pwd a","click",function(e){$("#loginbox #user-login").slideUp(),$("#loginbox #forget-password-form").slideDown(),$("#popup-messages").hide(),$("#popup-messages .success-container").remove(),$("#popup-messages .error-container").remove(),$(".formError").remove()}),$(document).delegate("#cancel-forget-pwd a","click",function(e){$("#loginbox #user-login").slideDown(),$("#loginbox #forget-password-form").slideUp(),$("#popup-messages .success-container").remove(),$("#popup-messages .error-container").remove(),$(".formError").remove()}),$(document).delegate("#login-otp a","click",function(e){$("#loginbox #user-login").slideUp(),$("#loginbox #login-otp-form").removeClass("hidden"),$("#otp-verification").addClass("hidden"),$("#otp-generation").removeClass("hidden"),$("#otp_login").val(""),$("#otp-code").val(""),$(this).parents("#loginbox").find("#login-otp-form").slideDown(),$("#popup-messages .success-container").remove(),$("#popup-messages .error-container").remove(),$(".formError").remove()}),$(document).delegate("#cancel-login-otp a","click",function(e){$(this).parents("#loginbox").find("#user-login").slideDown(),$(this).parents("#loginbox").find("#login-otp-form").slideUp(),$("#popup-messages .success-container").remove(),$("#popup-messages .error-container").remove(),$(".formError").remove()}),$(document).delegate(".checkout #cancel-forget-pwd a","click",function(e){$(this).parents("#loginbox").find("#user-login").slideDown(),$(this).parents("#loginbox").find("#forget-password-form").slideUp(),$("#forget-password-form").slideToggle(500),$("#user-signup").slideToggle(500),$("#popup-messages .success-container").remove(),$("#popup-messages .error-container").remove(),$(".formError").remove()}),$(document).delegate(".checkout #cancel-login-otp a","click",function(e){$(this).parents("#loginbox").find("#user-login").slideDown(),$(this).parents("#loginbox").find("#login-otp-form").slideUp(),$("#login-otp-form").slideToggle(500),$("#user-signup").slideToggle(500),$("#popup-messages .success-container").remove(),$("#popup-messages .error-container").remove(),$(".formError").remove()}),$(document).delegate("#logInWithEmail","click",function(e){$(this).addClass("hidden"),$(this).parents("#loginbox").find("#otp-generation").slideUp(),$(this).parents("#loginbox").find("#otp-verification").slideUp(),$(this).parents("#loginbox").find("#login-with-email").slideDown(),$("#popup-messages .success-container").remove(),$("#popup-messages .error-container").remove(),$(".formError").remove()}),$(document).delegate("#cancel-loginWithEmail a","click",function(e){$(this).parents("#loginbox").find("#otp-generation").slideDown(),$(this).parents("#loginbox").find("#otp-verification").slideDown(),$(this).parents("#loginbox").find("#login-with-email").slideUp(),$("#logInWithEmail").removeClass("hidden"),$("#popup-messages .success-container").remove(),$("#popup-messages .error-container").remove(),$(".formError").remove()}),$(document).ready(function(){$("#address-form").on("keypress",function(e){13!=e.which&&36!=e.which||(e.preventDefault(),$(".proceed-to-addr").trigger("click"))}),$("#cr_form").submit(function(e){e.preventDefault();var t=function getUrlParam(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(window.location.href);return null==t?"":t[1]}("referralCode");if($("#cr_email").validationEngine(),$("#cr_email").validationEngine("validate")){var a=$("#cr_email").val().trim();if(""==a)return;$.ajax({type:"POST",url:GLOBAL_CTX+"/newreferraluser/add/referral/",async:!1,cache:!1,dataType:"json",data:"referredEmails="+a+"&referralCode="+t,success:function(e){if(e.hasError)$(".cr #popup-message .success-container").hide(),$(".cr #popup-message .error-container #error-container-message").text(e.message),$(".cr #popup-message .error-container").show();else{$(".cr #popup-message .error-container").hide(),$(".cr #popup-message .success-container").show();var t=$(".social");t&&t.offset()&&$("html, body").stop().animate({scrollTop:t.offset().top-49}
52,850,"easeInOutExpo"),$(this).validationEngine("hideAll"),""!=e.message&&($(".notifications").show(),$(".notifications").html(getNotificationErrorHtml(e.message)))}}})}})}),$("#shopping-bag li input:checkbox").each(function(){$(this).is(":checked")?$(this).parents("#shopping-bag li").children(".product-image, .product-details").fadeTo("medium",1).removeClass("disabled"):$(this).parents("#shopping-bag li").children(".product-image, .product-details").fadeTo("medium",.5).addClass("disabled")}),$("#shopping-bag li .form-checkbox").change(function(){$(this).is(":checked")?$(this).parents("#shopping-bag li").children(".product-image, .product-details").fadeTo("medium",1).removeClass("disabled"):$(this).parents("#shopping-bag li").children(".product-image, .product-details").fadeTo("medium",.5).addClass("disabled")}),$(".has-address .content, .my-account .user-address").hide(),$(".has-address .user-address").show(),$(".my-account-page #update-address-form").hide(),$(".my-account-page #edit-submit-shipping-address, .my-account-page #edit-submit-billing-address, .my-account-page #edit-cancel-shipping-address").click(function(){$(this).parents("#shipping-address").children(".display-address").slideToggle("medium"),$(this).parents("#shipping-address").children("#update-address-form").slideToggle("medium");var e=$(".my-account-page #shipping-address").offset().top;return $("html,body").animate({scrollTop:e-150},1e3),$(this).parents("body").children(".formError").remove(),!1}),$(".has-address #edit-cancel-shipping-address, .has-address #edit-cancel-billing-address").click(function(){return $(this).parents(".my-account").children(".content").slideUp("medium"),$(this).parents(".my-account").children(".user-address").slideToggle("medium"),$(this).parents("body").children(".formError").remove(),!1}),$(".faq-toggle ul li .title").click(function(){$(this).parent("li").children(".content").slideToggle("medium, easeInOutCirc"),$(this).parent("li").toggleClass("open")}),$("a[href*=#all-details]").click(function(){if(location.pathname.replace(/^\//,") == this.pathname.replace(/^//,")&&location.hostname==this.hostname){var e=$(this.hash);if((e=e.length&&e||$("[name="+this.hash.slice(1)+"]")).length){var t=e.offset().top;return $("html,body").animate({scrollTop:t},1e3),!1}}}),$("#email-registration-form-wrapper input.form-checkbox").removeAttr("checked"),$("#email-registration-form-wrapper input.form-checkbox").click(function(){$("#email-registration-form-wrapper input.form-checkbox").is(":not(:checked)")?($("#returning-user").hide(),$("#new-user").show(),$(".formError").remove()):($("#returning-user").show(),$("#new-user").hide(),$(".formError").remove())}),$("#details-middle-left h2.title, .goldmine-page h1.title-8").each(function(e){$(this).parent("section").children(".title").addClass("expanded"),$(this).click(function(){return $(this).parent("section").children(".content").slideToggle("medium"),$(this).parent("section").children(".title").toggleClass("expanded"),!1}),$(this).click(function(){return $(this).parent(".goldmine-page section").siblings().removeClass("expanded"),$(this).parent(".goldmine-page section").addClass("expanded"),$(this).parent(".goldmine-page section").children(".content").slideDown("medium"),$(this).parent(".goldmine-page section").siblings().children(".content").slideUp(),!1})}),$(".testi-pager span").each(function(e){$(this).addClass("item"+(e+1))}),$("#personal-information .edit-button").click(function(){$("#personal-information").find(".form-group .row.input").is(":visible")&&($("#personal-information").find(".form-group .row.input").slideUp(),$("#personal-information").find(".form-group .row.output").slideDown());var e=$(this).closest(".form-group");e.find(".row").slideToggle(),$("#change-password").slideUp(),$(".success-container").hide();var t=e.find(".row.output .info:first"),a=t.find(".hidden").length?t.find(".hidden").text().trim():t.text().trim();e.find(".row.input input").val(a)}),$("#personal-information .save-button").click(function(){if("bst-email-save"!=$(this).attr("id")){if($(this).parents("body").children(".formError:visible").length)return $("#change-password").slide
52Up("fast"),!1;$(this).parents(".form-group").find(".row.input").slideUp(),$(this).parents(".form-group").find(".row.output").slideDown(),$("#change-password").slideUp("fast"),$(".success-container:visible").length&&($(this).parents(".form-group").find(".row.input").slideUp(),$(this).parents(".form-group").find(".row.output").slideDown(),$("#change-password").slideUp("fast"))}}),$("#personal-information .cancel-button").click(function(){var e=$(this).closest(".form-group");e.find(".row.input").hide(),e.find(".row.output").show(),$(this).parents("body").children(".formError").remove(),$("#change-password").slideUp()}),$("#resend-email-otp").click(function resendEmailOtp(e){var t=$("#emailEditInput").val(),a=$("#emailOtpId").val();$.ajax({url:GLOBAL_CTX+"/otp/validate-and-send-otp?email="+encodeURIComponent(t)+"&otpType=updateemail&otpId="+a,type:"POST",dataType:"json",success:function(e){if(e&&!e.hasError)$("#emailOtpId").val(e.otpId),$("#popup-otp-message").html("OTP resent successfully!").css("color","green").show(),setTimeout(function(){$("#popup-otp-message").hide()},5e3);else{var t=e&&e.errors&&e.errors.length?e.errors.join("<br/>"):"Failed to resend OTP";$("#popup-otp-message").html(t).css("color","red").show(),setTimeout(function(){$("#popup-otp-message").hide()},5e3)}},error:function(){$("#popup-otp-message").html(response.errors).css("color","red").show(),setTimeout(function(){$("#popup-otp-message").hide()},5e3)}})}),$("#bst-email-save").click(function(){!function sendEmailOtp(e,t,a){$.ajax({url:GLOBAL_CTX+"/otp/validate-and-send-otp?email="+encodeURIComponent(e)+"&otpType=updateemail",type:"POST",dataType:"json",success:function(e){t(e)},error:function(e){a()}})}($(this).closest(".form-group").find("#emailEditInput").val(),function(e){if(e.hasError)$("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.errors.join("<br />")+"</div><div>").show(),setTimeout(function(){$("#popup-messages").hide()},5e3);else{$("#emailOtpId").val(e.otpId);var t={width:1e3,href:"#emailUpdateOtpPopup",afterClose:function(){var e=$
52("#emailEditInput").closest(".form-group");e.find(".row.input").hide(),e.find(".row.output").show(),$("#emailOtp").val("")}};commonFancyBox(t)}},function(){$("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+data.errors.join("<br />")+"</div><div>").show(),setTimeout(function(){$("#popup-messages").hide()},5e3)})}),$("#verify-email-otp").click(function(){$("#emailEditInput").val();var e=$("#emailOtp").val(),t=$("#emailOtpId").val();return!e||e.length<4?($("#popup-otp-message").html("Please enter a valid 4-digit OTP.").css("color","red").show(),void setTimeout(function(){$("#popup-otp-message").hide()},5e3)):t?void $.ajax({url:GLOBAL_CTX+"/otp/verify-otp?otpId="+t+"&otpString="+encodeURIComponent(e),type:"POST",dataType:"json",success:function(e){if(!e||!e.isOtpVerified&&e.hasError){var a=e&&e.errorMsg?e.errorMsg:"Invalid OTP";$("#popup-otp-message").html(a).css("color","red").show(),setTimeout(function(){$("#popup-otp-message").hide()},5e3)}else{$.fancybox.close(),updateCustomerAttribute("email","emailEditInput","email-display",t);var i=$("#emailEditInput").closest(".form-group");i.find(".row.input").hide(),i.find(".row.output").show()}},error:function(){$("#popup-otp-message").html("Error verifying OTP").css("color","red").show(),setTimeout(function(){$("#popup-otp-message").hide()},5e3)}}):($("#popup-otp-message").html("No active OTP session. Please close and try again.").css("color","red").show(),void setTimeout(function(){$("#popup-otp-message").hide()},5e3))}),$("#changePasswd").click(function(){$(this).hide(),$("#personal-information").find(".form-group .row.input").is(":visible")&&($("#personal-information").find(".form-group .row.input").slideUp(),$("#personal-information").find(".form-group .row.output").slideDown()),$(".success-container").hide(),$(".error-container").hide(),$("#change-password").slideToggle(),$("#old_passwd").val(""),$("#passwd").val(""),$("#confirmation").val("");var e=$(".my-account-page #change-password").offset().top;$("html,body").animate({scrollTop:e-40},1e3)}),$(".cancel-change-pwd").click(function(){$("#change-password").slideToggle(),$("#changePasswd").show(),$(this).parents("body").children(".formError").remove();var e=$(".my-account-page #personal-information").offset().top;$("html,body").animate({scrollTop:e-80},1e3)});var i=$("#returning-user #login-email"),o=$("#new-user #email"),r=$("#forget-password-form #recover_email"),s=$("#forget-password #recover_email");$("#returning-user #login-email, #new-user #email, #user-login1 #email-id").blur(function(){i.val(this.value),o.val(this.value),s.val(this.value),r.val(this.value)}),$("#fancybox-close").click(function(){$(this).parents("body").children(".formError").each(function(e){$(this).remove()})}),$("ul.product-list li").on("mouseenter",function(){$(".content",this).stop().animate({bottom:"0"},{queue:!1,duration:250})}).on("mouseleave",function(){$(".content",this).stop().animate({bottom:"-100px"},{queue:!1,duration:250})}),$("#carrier_availability_form").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return checkCarrierAvailability($("#carrier_postcode").val(),$("#cartTotal").val())}}),$("#cod_availability_form").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return checkCodAvailability($("#cod_postcode").val(),$("#cartTotal").val())}}),$("#carrier_availability_form_faq").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return checkCarrierAvailabilityFaq($("#carrier_postcode").val())}}),$("#cod_availability_form_faq").validationEngine("attach",{onValidationComplete:function(e,t){if(t)return checkCodAvailabilityFaq($("#cod_postcode").val())}}),$("#scrollTop").hide(),$(function(){$(window).scroll(function(){$(this).scrollTop()>850?$("#scrollTop").fadeIn():$("#scrollTop").fadeOut()}),$("ul.product-list ").hide().fadeIn(700),$("#scrollTop a").click(function(){return"browse"!=PAGE_TYPE&&"store-catalog"!=PAGE_TYPE||trackGA("BsUI","DesktopBrPg","ClickedTop"),$("body,html").animate({scrollTop:0},800),!1}),$(".sol-bnr a").click(function(){return $("body,html").animate({scrollTop:430},650,"easeInOutQuad"),!1}),$(".nhome a.hbanner").click(function(){return $("body,html").animate({scrollTop:320},650,"easeInOutQuad"),!1}),videoPlayOnScroll(),$(window).scroll(function(){videoPlayOnScroll()}),$(".bnr420 a").click(function(){return $("body,html").animate({scrollTop:505},650,"easeInOutQuad"),!1}),$("#egc #etabs .next-tab#btn2").click(function(e){$("#egc #etabs input:radio").each(function(){$("#eGiftCard1").validationEngine("attach",{scroll:!1}),$("#eGiftCard1").validationEngine("validate")&&$("#egc #etabs .next-tab#btn2").xTabs()})}),$("#egc #etabs .next-tab#btn3").click(function(e){$("#eGiftCard2").validationEngine("attach",{scroll:!1}),$("#eGiftCard2").validationEngine("validate")&&($("#egc-amnt").text($(".amt-block #amount").val()),$(this).xTabs())}),$("#egc #etabs .next-tab#btn4").click(function(e){if($("#eGiftCard3").validationEngine("attach",{scroll:!1}),$("#eGiftCard3").validationEngine("validate")){$("#egc-recp-email").text($("#remail").val()),$("#egc-recp-name").text($("#rfname").val());var t=$("#msg").val();t.length>0&&" "!=t.charAt(0)?($(".msg").removeClass("hidden"),$("#egc-msg").text($("#msg").val())):$(".msg").addClass("hidden"),$(this).xTabs()}}),$("#egc #etabs .prev-tab").click(function(){$(this).parent(".btm-nav").hide(),$(this).parents(".tabs").prev().siblings().removeClass("active"),$(this).parents(".tabs").prev().addClass("active").removeClass("prev-head").find(".btm-nav").show(),$(this).parents(".tabs").find(".tabs-inner").slideUp(),$(this).parents(".tabs").prev().find(".tabs-inner").slideDown(),$(".formError").remove()}),$.fn.xTabs=function(){$(this).parent().hide(),$(this).parents(".tabs").next().siblings().removeClass("active"),$(this).parents(".tabs").addClass("prev-head"),$(this).parents(".tabs").next().addClass("active").find(".btm-nav").show(),$(this).parents(".tabs").find(".tabs-inner").slideUp(),$(this).parents(".tabs").next().find(".tabs-inner").slideDown()},$("#egc #etabs .amt li").click(function(){var e=parseInt($(this).data("amt")),t=parseInt($("#t2").find("#amount").val());isNaN(t)||(e+=t),$(this).parents("div").find(".txtamt").val(e)}),$("#egc #etabs .occasion li").click(function(){$(this).parents(".occasion").find("li").removeClass("selected"),$(this).addClass("selected"),$(".formError").remove(),$(this).find("input[type=radio]").prop("checked","checked"),$(this).find("input[type=radio]").attr("checked","checked");
52var e=$(this).data("path");$("#t4").find("#prw").attr("src",e)}),$("#egc #etabs .tp-nav li a").click(function(){});$(".tp-nav").height();$("#order-list .color-myaccount").on("click",function(){$("#order-list tr.item").removeClass("open"),$(this).parents("tr.item").addClass("open"),$("body,html").animate({scrollTop:$(this).offset().top-70},650,"easeInOutQuad")}),$("#egc #msg").on("keypress",function(e){var t=String.fromCharCode(e.which);return!(8!=e.keyCode&&37!=e.keyCode&&39!=e.keyCode&&13!=e.keyCode&&!/[A-Za-z .!@#$%^&*()_+<>?:";''{}~`]/g.test(t))}),$("#egc #msg").on("paste",function(e){e.preventDefault()}),$.fn.scrollBottom=function(){return $(document).height()-this.scrollTop()-this.height()},$(".gold-investment #details-top .form-submit").click(function(){return $("#have-question-landing #username").focus().css("background-color","#FFFF99"),$("html, body").animate({scrollTop:490},"slow"),!1}),$(".direct-seller #featured-img .static-img").click(function(){return $(".btn-hover",this).addTemporaryClass("btn-hover-selected",2e3),$("html, body").animate({scrollTop:2100},"slow","easeInOutQuint"),$(".direct-seller-form #customername").focus().css("background-color","#FFFF99"),!1}),$("#have-question-landing #username, .direct-seller-form #customername").keyup(function(){$(this).css("background-color","#ffffff")}),$("#subscribe-newsletter .btn-subscribe").click(function(){var e=$
52("#newsletter-form").offset().top;return $("html, body").animate({scrollTop:e},1200,"swing"),$("#newsletter-form #newsletter_subscriber").focus().css("background-color","#FFFF99"),!1}),$("#newsletter-form #newsletter_subscriber").keyup(function(){$(this).css("background-color","#ffffff")})}),$("#customizationSupportedText").click(function(e){e.preventDefault(),$(this).fadeOut(),$("#customizationSupportedTextClose").delay(400).fadeIn("medium"),$("#longDescriptionInRightPane").slideUp("medium"),$("#selectMetalAndDiamondQuality").slideDown()}),$("#customizationSupportedTextClose").click(function(e){e.preventDefault(),$(this).fadeOut(),$("#customizationSupportedText").delay(400).fadeIn("medium"),$("#longDescriptionInRightPane").slideDown(),$("#selectMetalAndDiamondQuality").slideUp("medium")});var n;$("#invest-amount .input-price").val();$(".down").click(function(){$(".input-price").val(parseInt($(".input-price").val())-500),parseInt($(".input-price").val())<500&&$(".input-price").val("500"),$("#have-question-landing").find(".gold-mine-example").fadeIn(),updatePrice($(".input-price").val())}),$(".up").click(function(){$(".input-price").val(parseInt($(".input-price").val())+500),parseInt($(".input-price").val())>5e4&&$(".input-price").val("50000"),$("#have-question-landing").find(".gold-mine-example").fadeIn(),updatePrice($(".input-price").val())}),updatePrice($(".input-price").val()),$("#vertical-tabs div.tabbed-content").hide(),$("#vertical-tabs div.tabbed-content:first").show(),$("#vertical-tabs ul.tab li:first").addClass("active"),$("#vertical-tabs ul.tab li a").click(function(){$("#vertical-tabs ul.tab li").removeClass("active"),$(this).parent().addClass("active");var e=$(this).attr("href");return $("#vertical-tabs div.tabbed-content").hide(),$(e).show(),!1}),$("#horizontal-tabs div.tabbed-content").hide(),$("#horizontal-tabs div.tabbed-content:first").show(),$("#horizontal-tabs ul.tab li:last").addClass("active"),$(".product-tabs #horizontal-tabs ul.tab li:last").removeClass("active"),$("#horizontal-tabs ul.tab li a").click(function(){$("#horizontal-tabs ul.tab li").removeClass("active"),$(this).parent().addClass("active");var e=$(this).attr("href");return $("#horizontal-tabs div.tabbed-content").hide(),$(e).show(),!1}),$(".horizontal-tabs").each(function(){$(this).find("div.tabbed-content").hide()}),$(".horizontal-tabs").each(function(){$(this).find("div.tabbed-content:first").show()}),$(".horizontal-tabs").each(function(){$(this).find("ul.tab li:first").addClass("active")}),$(".horizontal-tabs ul.tab li a").click(function(){$(this).parents(".horizontal-tabs").find("ul.tab li").removeClass("active"),$(this).parent().addClass("active");var e=$(this).attr("href");return $(this).parents(".horizontal-tabs").find("div.tabbed-content").hide(),$(e).show(),!1}),$("#select-gold").click(function(){$(this).find("ul").fadeToggle("fast")}
52),$(".select-gold .title ul li").click(function(){var e=$(this).attr("class");(t=$(this)).closest(".select-gold .title").find("div.selected").html(t.html()).removeClass("yellow-gold white-gold rose-gold brown-gold").addClass(e);var t=$(this);$("#details-top-sub-sub-inner").removeClass("no-image-available-white-gold no-image-available-yellow-gold no-image-available-rose-gold no-image-available-brown-gold");var a="";$(this).hasClass("no-image-available-yellow")&&$("#details-top-sub-sub-inner").addClass("no-image-available-yellow-gold"),$(this).hasClass("no-image-available-rose")&&$("#details-top-sub-sub-inner").addClass("no-image-available-rose-gold"),$(this).hasClass("no-image-available-white")&&$("#details-top-sub-sub-inner").addClass("no-image-available-white-gold"),$(this).hasClass("no-image-available-brown")&&$("#details-top-sub-sub-inner").addClass("no-image-available-brown-gold"),$(this).hasClass("white-gold")&&(a="White"),$(this).hasClass("rose-gold")&&(a="Rose"),$(this).hasClass("yellow-gold")&&(a="Yellow"),$(this).hasClass("brown-gold")&&(a="Brown"),$(".metal-purities").hide(),$("."+a+"-purities").show(),getCustomizationOnDiamondQuality()}),$(".select-gold .title").click(function(e){e.stopPropagation()}),$(document).click(function(){$(".select-gold .title ul").hide()}),$(".slide-message").hide(),$("a.readmore").click(function(e){event.preventDefault(),$(".slide-message").slideDown("medium"),$(this).hide()}),$("a.readless").click(function(e){event.preventDefault(),$(".slide-message").slideUp("medium"),$("a.readmore").fadeIn("slow")}
52),$(".change-cc").hover(function(){var e=$(this).data("timer");e&&clearTimeout(e),$(this).addClass("change-cc-hover")},function(){var e=$(this);e.data("timer",setTimeout(function(){e.removeClass("change-cc-hover")},500))}),$(".welcome-message").hover(function(){var e=$(this).data("timer");e&&clearTimeout(e),$(this).addClass("welcome-message-hover")},function(){var e=$(this);e.data("timer",setTimeout(function(){e.removeClass("welcome-message-hover")},500))}),(n=$("#g-f-him, .romance101 #landing-blocks"))&&n.offset()&&$("html, body").stop().animate({scrollTop:n.offset().top-49},850,"easeInOutExpo"),(n=$("#get-lucky"))&&n.offset()&&$("html, body").stop().animate({scrollTop:n.offset().top-49},850,"easeInOutExpo"),$("#marriedYes input").is(":checked")&&$(".ifmarried").slideDown("medium","swing"),$("#marriedNo input").is(":checked")&&$(".ifmarried").slideUp("medium","swing"),$("#marriedYes").click(function(e){$("#marriedYes input").is(":checked")&&$(".ifmarried").slideDown("medium","swing"),$("#marriedNo input").is(":checked")&&$(".ifmarried").slideUp("medium","swing")}),$("#marriedNo").click(function(e){$("#marriedNo input").is(":checked")&&$(".ifmarried").slideUp("medium","swing"),$("#marriedYes input").is(":checked")&&$(".ifmarried").slideDown("medium","swing")});var l;function limiting(e,t){var a=$("#char-counter > span"),i=$(e).val(),o=i.length;o>t?($(e).val(i.substr(0,t)),$(a).html(0)):$(a).html(140-o)}$("#edit-gift-message-wrapper textarea").keyup(function(){limiting($(this),140)}),$(".rakhi-contest-form textarea").keyup(function(){limiting($(this),200)}),$("#edit-gift-wrapper label input").is(":checked")&&$("#gift-msg-form").slideDown("medium","swing"),$("#edit-gift-wrapper label input").is(":not(:checked)")&&($("#gift-msg-form").slideUp("medium","swing"),$(".formError").remove()),$("#edit-gift-wrapper label").click(function(){$("input",this).is(":not(:checked)")?($("#gift-msg-form").slideUp("slow"),$(".formError").remove(),$(this).removeClass("open")):($("#gift-msg-form").slideDown("slow"),$(this).addClass("open"))}),$(".addBillingAddress").is(":checked")&&($("#billing-address-form").slideUp("medium","swing"),$(".billing-address-wrap").removeClass("open")),$(".addBillingAddress").is(":not(:checked)")&&($("#billing-address-form").slideDown("medium","swing"),$(".billing-address-wrap").addClass("open"),$(".formError").remove()),$("#edit-billingAddress-wrapper .add-billing-address").on("click",function(){$(".addBillingAddress").is(":not(:checked)")?($("#billing-address-form").slideDown("slow"),$(".billing-address-wrap").addClass("open"),$(".formError").remove(),$(this).removeClass("open")):($("#billing-address-form").slideUp("slow"),$(".billing-address-wrap").removeClass("open"),$(this).addClass("open"))}),$(".offers-badge").click(function(){$(".offers-carousel-wrapper").show(),$(this).animate({top:-107},700,"easeOutQuint"),$(".offers-overlay").fadeIn(500,"easeOutCubic",function(){$(".offers-carousel").animate({top:0},700,"easeOutQuint"),$.dequeue(this)}),$.dequeue(this)}),$(".offers-overlay, .offers-carousel .btn-close").click(function(){$(".offers-carousel").animate({top:-260},500,"easeOutCubic",function(){$(".offers-overlay").fadeOut(700,"easeOutCubic"),$(".offers-badge").animate({top:0},700,"easeOutCubic"),$(".offers-carousel-wrapper").hide(),$.dequeue(this)}),$.dequeue(this)}),$(".fancy-youtube").click(function(){return $.fancybox({padding:0,fitToView:!1,autoSize:!1,title:this.title,width:680,height:495,href:this.href.replace(new RegExp("watch\\?v=","i"),"embed/"),type:"iframe"}),!1}),"TABLET"==deviceName&&$(".submenu-left span.s-l-inner").click(function(e){e.preventDefault()}),$("#blueBond .story").change(function(){"1"==this.value?($("#blueBond #storyRel #relation").attr("disabled","disabled"),$("#blueBond #storyRel #relation").val("")):"0"==this.value&&$("#blueBond #storyRel #relation").removeAttr("disabled")}),$(".career-form-wrapper .career-exp").on("change",function(){var e=$
52(this).find(".car-year").val(),t=$(this).find(".car-month").val();carExp=e,t&&e?carExp+="."+t:t&&!e&&(carExp+="0."+t),$("#experience").val(carExp)});var d,c,u,p,m,h=$(".lb-landing #lb-tooltip");function hide(){l=setTimeout(function(){h.removeClass("lb-active"),$(".lb-landing #lbt-self").removeClass("lb-active")},400)}$(".lbt-btn").click(function(e){pDesignId=$(this).find("a").data("designid"),function getCustomization(e,t){$.ajax({type:"GET",url:GLOBAL_CTX+"/lookbook/"+t,async:!1,cache:!1,success:function(e){$(".replaceResult").html(e),$(".jcarousel-active-thumbs ul").owlCarousel({items:5,lazyLoad:!1,loop:!1,dots:!1,slideBy:1,nav:!0,pagination:!1,navigation:!0,navigationText:["<i class='icon-ion-arrow-left-b'></i>","<i class='icon-ion-arrow-right-b'></i>"]}),$(".slide-thumbs ul li:last").addClass("last"),$(".slide-thumbs ul li:first").addClass("active"),$(".slide-thumbs ul li a").click(function(){$(".slide-thumbs ul li").removeClass("active"),$(this).parent().addClass("active")}),$(".cloud-zoom, .cloud-zoom-gallery").CloudZoom(),$(".zoom-disabled").click(function(e){$(this).parents("#details-top-left").addClass("no-zoom")}),$(".zoom-enabled").click(function(e){$(this).parents("#details-top-left").removeClass("no-zoom")}),$("#cust-details #etd a.btn").click(function(e){udpateDeliveryDate(e,$(this))}),$(".bs-accordion h4").click(function(){$(this).parent(".bs-accordion").toggleClass("active");var e=$(this).parent(".bs-accordion");e.removeClass("ovisible"),e.hasClass("active")&&setTimeout(function(){e.addClass("ovisible")},500),$(".formError").remove()}),$(".bs-accordion.bsa1 h4").click(function(){$(this).parent(".bs-accordion").hasClass("active")?($(this).find("span").text("Hide price breakup"),$(this).find("i").removeClass("icon-ion-android-arrow-dropdown").addClass("icon-ion-android-arrow-dropup")):($(this).find("span").text("View price breakup"),$(this).find("i").removeClass("icon-ion-android-arrow-dropup").addClass("icon-ion-android-arrow-dropdown"))}),$(".bs-accordion.bsa2 h4").click(function(){$(this).parent(".bs-accordion").hasClass("active")?($(this).find("span").text("Hide Customization"),$(this).find("i").removeClass("icon-ion-ios-plus-empty").addClass("icon-ion-ios-minus-empty")):($(this).find("span").text("Customize this product"),$(this).find("i").removeClass("icon-ion-ios-minus-empty").addClass("icon-ion-ios-plus-empty"))}),$(".bs-accordion.bsa3 h4").click(function(){$(this).parent(".bs-accordion").hasClass("active")||($(this).parent(".bs-accordion").find(".pe-input").removeClass("active").hide(),$(this).parent(".bs-accordion").find(".pe-checkbox").removeClass("checked"))}),$("#select-gold").click(function(){$(this).find("ul").fadeToggle("fast")}
52),$(".select-gold .title ul li").click(function(){var e=$(this).attr("class");(t=$(this)).closest(".select-gold .title").find("div.selected").html(t.html()).removeClass("yellow-gold white-gold").addClass(e);var t=$(this);$("#details-top-sub-sub-inner").removeClass("no-image-available-white-gold no-image-available-yellow-gold no-image-available-rose-gold no-image-available-brown-gold");var a="";$(this).hasClass("no-image-available-yellow")&&$("#details-top-sub-sub-inner").addClass("no-image-available-yellow-gold"),$(this).hasClass("no-image-available-white")&&$("#details-top-sub-sub-inner").addClass("no-image-available-white-gold"),$(this).hasClass("no-image-available-rose")&&$("#details-top-sub-sub-inner").addClass("no-image-available-rose-gold"),$(this).hasClass("no-image-available-brown")&&$("#details-top-sub-sub-inner").addClass("no-image-available-brown-gold"),$(this).hasClass("white-gold")&&(a="White"),$(this).hasClass("yellow-gold")&&(a="Yellow"),$(this).hasClass("rose-gold")&&(a="Rose"),$(this).hasClass("brown-gold")&&(a="Brown"),$(".metal-purities").hide(),$("."+a+"-purities").show(),getCustomizationOnDiamondQuality()}),$(".select-gold .title").click(function(e){e.stopPropagation()}),$(document).click(function(){$(".select-gold .title ul").hide()}),$("#add_to_cart .addToCart").prop("disabled",!1),$("#etd .date").click(function(e){e.stopPropagation(),$(".pin-code-error").hide(),$(this).parent("#etd").find(".form-text").val(""),$(this).parent("#etd").find(".etd-popup").slideDown("fast")})}})}($(this),pDesignId)}),$(".lb-landing span.marker").mouseover(function(e){d=$(this).data("name"),c=$(this).data("image"),u=$(this).data("sdsc"),p=$(this).data("price"),m=$(this).data("cf"),pDesignId=$(this).data("design_id");var t=u.split("In"),a=t[0]+" In",i=t[1];h.find("h3 a").text(d),h.find("a").attr("title",d),h.find(".lbt-img a img").attr("src",c),h.find("#adsc").text(a),h.find("#sdsc").text(i),h.find(".lbt-price #price").text(p),h.find(".lbt-price #simbol").html(m),h.find(".lbt-btn a").data("designid",pDesignId);var o=$(window).width()-e.clientX,r=$(window).height()-e.clientY,s=h.width()+100,n=h.height();h.stop().addClass("lb-active");var v=$(this).offset();h.css("top",v.top-50),o<=s&&r>n&&(h.find(".arrow").removeAttr("id"),h.find(".arrow").attr("id","lb-rarrow"),h.css("left",v.left-h.width()-30)),r<=n&&(h.find(".arrow").removeAttr("id"),h.find(".arrow").attr("id","lb-barrow"),h.css({left:v.left-h.width()/2,top:v.top-h.height()-50})),o>=s&&r>n&&(h.find(".arrow").removeAttr("id"),h.find(".arrow").attr("id","lb-larrow"),h.css("left",v.left+35)),clearTimeout(l)}).mouseout(hide),$(".lb-landing .lb-tooltip").mouseover(function(){clearTimeout(l)}).mouseout(hide),$(".lb-landing span.marker-self").mouseover(function(e){$(".lb-landing #lbt-self").stop().addClass("lb-active");var t=(u=$(this).data("sdsc")).split("In"),a=t[0]+" In",i=t[1];$(".lb-landing #lbt-self").find("#adsc").text(a),$(".lb-landing #lbt-self").find("#sdsc").text(i),clearTimeout(l)}).mouseout(hide),$(".fbsharelink, .twsharelink").click(function(e){return e.preventDefault(),window.open($(this).attr("href"),"fbShareWindow","height=450, width=550, top="+($(window).height()/2-275)+", left="+($(window).width()/2-225)+", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0"),!1}),$(".top-ticker .t-offer, #press-room .clickable").click(function(){window.location=$("a",this).attr("href")});for(var v=new Date($("#date_today").val()),f=1;f<=7;f++){var g=document.createElement("option");v.setDate(v.getDate()+1);var y=v.getDate();y<10&&(y="0"+y);var b="en-us",C=v.toLocaleString(b,{month:"short"}),w=v.toLocaleString(b,{weekday:"long"}),k=v.getMonth()+1;k<10&&(k="0"+k),g.value=v.getFullYear()+"-"+k+"-"+y,g.innerHTML=1!=f?y+" "+C+"  - "+w+"&nbsp;&nbsp;&nbsp;":y+" "+C+"  - Tomorrow&nbsp;&nbsp;&nbsp;",$("#try_date_pd").append(g)}
52$(".read-more").click(function(){var e=$(this).parents(".tc").find(".tc-content");e.toggleClass("show"),e.hasClass("show")?$(this).text("Hide"):$(this).text("Read More")}),$(".clns-banner a.link-a").click(function(){return $("body,html").animate({scrollTop:560},650,"easeInOutQuad"),!1}),$(".clns-banner a.link-b").click(function(){return $("body,html").animate({scrollTop:450},650,"easeInOutQuad"),!1}),$(".clns-banner a.link-c").click(function(){return $("body,html").animate({scrollTop:1e3},650,"easeInOutQuad"),!1}),window.location.search.indexOf("target=gc")>-1&&$("body,html").animate({scrollTop:1e3},650,"easeInOutQuad"),window.location.search.indexOf("target=ej")>-1&&$("body,html").animate({scrollTop:560},650,"easeInOutQuad"),$(".bs-accordion h4").click(function(){$(this).parent(".bs-accordion").toggleClass("active")}),$(".bs-accordion.bsa1 h4").click(function(){$(this).parent(".bs-accordion").hasClass("active")?($(this).find("span").text("Hide price breakup"),$(this).find("i").removeClass("icon-ion-android-arrow-dropdown").addClass("icon-ion-android-arrow-dropup")):($(this).find("span").text("View price breakup"),$(this).find("i").removeClass("icon-ion-android-arrow-dropup").addClass("icon-ion-android-arrow-dropdown"))}),$(".bs-accordion.bsa2 h4").click(function(){$(this).parent(".bs-accordion").hasClass("active")?($(this).find("span").text("Hide Customization"),$(this).find("i").removeClass("icon-ion-ios-plus-empty").addClass("icon-ion-ios-minus-empty")):($(this).find("span").text("Customize this product"),$(this).find("i").removeClass("icon-ion-ios-minus-empty").addClass("icon-ion-ios-plus-empty"))}),$(".bs-accordion.bsa3 h4").click(function(){$(this).parent(".bs-accordion").hasClass("active")||($(this).parent(".bs-accordion").find(".pe-input").removeClass("active").hide(),$(this).parent(".bs-accordion").find(".pe-checkbox").removeClass("checked"))});var P=$("#details-top-right .pe-input .form-text");$(".p-engraving .pe-form .pe-label label").click(function(e){e.stopPropagation(),$(this).find("input[type=checkbox]").is(":checked")?($(".p-engraving .pe-input").slideDown().addClass("active"),$(this).find(".pe-checkbox").addClass("checked")):($(".p-engraving .pe-input").slideUp().removeClass("active"),$(this).find(".pe-checkbox").removeClass("checked"),P.attr("value",""))}),P.change(function(){P.val().length>0?P.removeClass("invalid"):P.addClass("invalid")}),$("body").on("click",".wishlist, .no-wishlist",function(){browseWishlist($(this))}),$("body").on("click",".wishlist-bp-tooltip .close",function(){$(this).closest(".pr-i, .pr-d-inner").find(".wishlist-bp-tooltip").remove(),trackGA("browse page share popup","later clicked")}
52),$(".wishlist-shared-id").on("click",function(){var e=$(this).data("auth"),t=$(this).data("id");return 1==e?(sharedlistRedirect(t),!1):(action="sharedlistRedirect",void(actionParams=t))});var S=$(".country-switcher").find(".top-level-dd ").find(".top-level-dd-inner").find("span").html();$(".country-switcher").find(".orange-color").html();$("#ringselect"),S&&S.match(/inr/i),$("#buy_block").validationEngine({showOneMessage:!0,scroll:!1});var T,D=$("#ringselect").val();$("#selectedSize").val(D),""==D&&$("#selectedSize").val("select size"),jQuery.extend(jQuery.fancybox.defaults,{autoCenter:!1,fixed:!1}),$(".signInToKnowBestPrice").on("click",function(){action="signInToKnowBestPriceFunction";var e=$("#discountedPriceSpan").text(),t=$("#our_price_display").text().replace(/,/g,"");null!=e&&(t=e.replace(/,/g,"")),actionParams="showingPrice="+t}),$(".emi-help").click(function(){emiDetails()}),$(".product-sets-wrapper ul li").mouseover(function(e){$(this).addClass("active").siblings().removeClass("active"),clearTimeout(T)}).mouseout(function get_hide(){T=setTimeout(function(){$(".product-sets-wrapper ul li").removeClass("active")},1e3)}),$(".list-job-wrapper .list-item h3").click(function(){$(this).parent().find(".content").toggleClass("active"),$(this).find("i").toggleClass("hideit")}),$(".shipping-steps .completed > .icon-bullet, .shipping-steps .active > .icon-bullet").mouseover(function(){$(this).parents(".shipping-steps").find(".tooltip").hide(),$(this).siblings(".tooltip").show()}),$(".click-build-preset-solitaire").click(function(e){e.preventDefault();var t=$("#ringselect").val(),a=$("#category").val();logInitiatedSolitaireCustomizationEvent(),null!=a&&""!=a&&("Ring"!=a||null!=t&&""!=t?($("#preset-ringselect").replaceWith('<input type="hidden" id="preset-ringselect" name="chainselect" value="'+t+'" />'),$("#product-page-design-form").submit()):$(".addToCart").submit())}),$("#blue-wallet label").click(function(e){e.stopPropagation(),e.preventDefault();$("#voucher-code input[type=checkbox]").is(":checked");var t=!1,a=($(this).find("input[type=checkbox]").val(),$("#updateUserData .form-group:first-child #login-email").val(),"0");$(this).find("input[type=checkbox]").is(":checked")?(t=!1,$(this).parents("#blue-wallet").removeClass("show-content"),$(this).parents("#blue-wallet").find("input[type=checkbox]").prop("checked",!1),$("#blue-wallet label i").switchClass("icon-ion-ios-checkmark","icon-ion-ios-circle-outline"),$(".your-order .cart-footer .blue-wallet-applied").addClass("hide")):(t=!0,$(this).parents("#blue-wallet").addClass("show-content"),$(this).parents("#blue-wallet").find("input[type=checkbox]").prop("checked",!0),$("#blue-wallet label i").switchClass("icon-ion-ios-circle-outline","icon-ion-ios-checkmark"),$(".your-order .cart-footer .blue-wallet-applied").removeClass("hide"));var i=$(".your-order .cart-footer .you-pay #getDiscountedPrice").html(),o=$(".your-order .cart-footer .you-pay #getActualPrice").html(),r=$(".your-order .cart-footer .blue-wallet-applied .blue-wallet").html(),s=(a=$(".your-order .cart-body .offer-container #actual-blue-wallet").val(),0);t?(s=parseFloat(i.replace(/,/g,""))-parseFloat(a.replace(/,/g,"")))<=0?(s=0,r=parseFloat(i.replace(/,/g,""))):r=a:(s=parseFloat(i.replace(/,/g,""))+parseFloat(r.replace(/,/g,"")),r=0),$(".your-order .heading .right .you-pay").html(s.toLocaleString()),$(".your-order .cart-footer .you-pay #getDiscountedPrice").html(s.toLocaleString()),$(".your-order .cart-footer .blue-wallet-applied .blue-wallet").html(r.toLocaleString()),"0"==s?($
52(".cart-footer .confirm-btn-wrapper").removeClass("hide"),$(".cart-footer #cart-continue-to-pay").addClass("hide"),$("section.payment-options").addClass("hide")):($(".cart-footer .confirm-btn-wrapper").addClass("hide"),$(".cart-footer #cart-continue-to-pay").removeClass("hide"),$("section.payment-options").removeClass("hide")),s<parseFloat(o.replace(/,/g,""))?$(".your-order .cart-footer .you-pay .price-without-discount").removeClass("hide"):$(".your-order .cart-footer .you-pay .price-without-discount").addClass("hide")}),filtersBrowsePage(),$("#shop-in-shop-form").validationEngine(),$(".pla-buynow").click(function(e){$("#buy_block").submit()}),showVoucherAddPopUp();var I=$(".size-helper").data("type");if($("#map-canvas").click(function(){return!1}),$(".size-helper .locate-me").click(function(e){e.preventDefault(),e.stopPropagation();var t=$(this);t.find("span").addClass("hidden"),t.find("img").removeClass("hidden"),setTimeout(function(){locateMe(),t.find("span").removeClass("hidden"),t.find("img").addClass("hidden")},500)}),$(".size-helper .map-search-input-wrapper .icon-close").click(function(){$("#map-search-input").val(" ").focus();var e=$("#map-location").val();trackGA(I+"-Size-Help","Initiated-Location-Change",e)}),$(".size-helper .confirm-fht label").click(function(){$(this).find("#fht").is(":checked")?($(".size-helper .time-date-block").removeClass("in-active"),$(".size-helper").removeClass("wo-hto")):($(".size-helper .time-date-block").addClass("in-active"),$(".size-helper").addClass("wo-hto"))}),$("#sizeHelperS1").validationEngine(),$("#sizeHelperS1 .btn").click(function(){if(0==$("#sizeHelperS1").validationEngine("validate"))return!1;$(this).parents(".single-page").removeClass("active");var e=$("#map-location").val();trackGA(I+"-Size-Help","Provided-Mobilenumber-Location",e),geocode("desktop")}),$(".size-helper #size-helper-s2 .btn").click(function(e){var t=$("#map-search-input").val();trackGA(I+"-Size-Help","Confirmed_Location",t),sizeHelperProceed()}),$("#sizeHelperS2").validationEngine(),$("#sizeHelperS2 .btn").click(function(e){if("false"!=$("#pincode-valid").val()){if(0==$("#sizeHelperS2").validationEngine("validate"))return!1;var t=$("#size-helper-s3 #fht").is(":checked");if($(".size-helper").hasClass("wo-hto")&&$(".size-helper").removeClass("wo-hto"),$(".is-hto-available").is(":visible"))$(this).parents(".single-page").removeClass("active"),t&&!$("#is-hto-available-check").is(":hidden")?($("#size-helper-s4").addClass("active"),$(".size-helper").removeClass("stp3").addClass("stp4"),trackGA(I+"-Size-Help","Request-Completed-With-HTO")):($("#size-helper-s5").addClass("active"),$(".size-helper").removeClass("stp3").addClass("stp5"),trackGA(I+"-Size-Help","Request-Completed-Without-HTO"));else{bookRingSizerAndHto(t,e=>{if(!e)return $("#otp-message").removeClass("hidden"),$("#otp-message").text("Please enter valid email and mobile number to send OTP"),$("#otp-message").css("color","red"),void setTimeout(function(){$("#otp-message").text(""),$("#otp-message").addClass("hidden"),$("#otp-message").css("color","")},5e3);$(this).parents(".single-page").removeClass("active"),$("#size-helper-s5").addClass("active"),$(".size-helper").removeClass("stp3").addClass("stp5"),trackGA(I+"-Size-Help","Request-Completed")},"desktop")}}else showSizerPincodeError()}
52),$("#sizeHelperS2 #pincode").on("blur",function(){var e=$(this).val();getCityStateByPincode(e,"#sizeHelperS2","sizer")}),$("#ringSizerForm").validationEngine(),$("#ringSizerForm .btn").click(function(){if(0==$("#ringSizerForm").validationEngine("validate"))return!1;bookRingSizer()}),$(".size-helper .address-block textarea").on("focus",function(){$(this).parent().find(".edit-label").hide()}),$(".size-helper .edit-label").on("click",function(){$(this).parent().find("textarea").focus()}),$(document).on("click",".bvideo-icon",function(e){e.preventDefault();var t=$(this).parents("li").data("pid").toString(),a=$(this).data("video-url"),i="";i+='<div class="bvideo-wrap">',i+='<video class="bvideo" width="100%" height="100%" poster="'+$(this).data("poster-url")+'" loop controls>',i+='<source src="'+a+'" type="video/mp4">',i+="</video>",i+='<span class="close-bvideo icon-ion-android-close"></span>',i+="</div>",$(this).parents("li").find(".inner .p-image").append(i),$(this).parents("li").find(".bvideo").get(0).play(),$(this).parents("li").find(".bvideo-icon").hide();var o=$(this).parents("li").find("video");bStartTime=Date.now();var r=0,s=0;o.get(0).addEventListener("timeupdate",function(){0==r&&(r=1,s=1);var e=o.get(0).duration;if(0==o.get(0).currentTime/e*100&&1==s){s=0;var a=Date.now();trackGA("Video","ClickedPlay-ProductHover",t,a-bStartTime,!1)}}),trackGA("Video","ClickedPlay-ProductHover",t,0,!1)}
52),$("body").on("click",".close-bvideo",function(){var e=$(this).parents("li").data("pid").toString();$(this).parents(".bvideo-wrap").remove(),$(".bvideo-icon").show(),trackGA("Video","StoppedVideo-ProductHover",e)}),$("body").on("mouseleave","li.three-column-browse .inner",function(){$(this).find(".bvideo-wrap").remove(),$(this).find(".bvideo-icon").show()}),$(document).on("click",".bvideo-icon2",function(e){e.preventDefault(),jQuery.extend(jQuery.fancybox.defaults,{autoCenter:!0,fixed:!0});var t=$(this).data("video-url"),a=$(this).data("poster-url"),i=$(this).data("viewurl"),o=$(this).parents("li").data("pid"),r="";r+='<div class="bvideo-wrap">',r+='<video class="bvideo" width="100%" height="100%" poster="'+a+'" loop controls>',r+='<source src="'+t+'" type="video/mp4">',r+="</video>",r+='<div class="view-details"><a target="_blank" href="'+i+'" data-url="'+i+'" data-pos="'+o+'"  id="pd-page-url" class="btn btn-block style2">View Details >></a></div>',r+="</div>",$("#bvideo-fancybox").html(""),$("#bvideo-fancybox").html(r),trackGA("Video","ClickedPlay-ProductHover",""+o),setTimeout(function(){$("#bvideo-fancybox video").get(0).play(),videoTimeUpdate($(".bvideo").get(0),Date.now(),!1)},1e3)}),$("body").on("click","#bvideo-fancybox .btn",function(){trackGA("Video","ClickedViewDetails-VideoHover")}),("browse"==PAGE_TYPE||"store-catalog"==PAGE_TYPE)&&$("body").hasClass("animated-ui-cue")){if(null==$.cookie("floatingElement")){$(".floating-element").show(),$.cookie("floatingElement",1,{expires:1});var A=$(".floating-element").data("count");trackGA("BsUI","ScrollDownAnimationShown",""+A)}var x=$(window);x.scrollTop();x.scroll(function(){x.scrollTop()>0&&$(".floating-element").fadeOut(),x.scrollTop()});var O=$(window).height();$(".floating-element").click(function(){$("html, body").animate({scrollTop:O})})}function addToQuotationSuccess(e,t,a){var i=$("#sis-quotation-shortlist");0===i.find(".cart-count").length&&i.append("<span class='cart-count'></span>"),i.find("span.cart-count").text(a.quotationItemsCount),a.quotationId&&i.prop("href",GLOBAL_CTX+"/account/quotation/"+a.quotationId+"/edit"),e.outerHTML="<span class='btn btn-block sis-shortlisted'>Added to Quotation</span>"}if($("body").on("click","button.update-design-quotation",function(){var e=this,t=$(this),a=t.data("sku-code"),i={},o=[],r={},s=t.data("quotation-item-id");null!=s&&""!=s&&(r.quotationItemId=s),null!=a&&""!=a&&(r.skuCode=a,r.quantity=1,o.push(r)),i.quotationItemUpdateRequests=o,$.ajax({type:"POST",url:GLOBAL_CTX+"/account/quotation/update-latest-active-quotation",async:!0,cache:!1,contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(a){a.hasError?alert(a.error):addToQuotationSuccess(e,t,a)},error:function(e){alert("something went wrong")}})}),$("body").on("click","button.add-design-quotation",function(){var e=this,t=$(this),a=t.data("design-code");$.ajax({type:"POST",url:GLOBAL_CTX+"/account/quotation/add-design-to-active-quotation",async:!0,cache:!1,contentType:"application/json",dataType:"json",data:a,success:function(a){a.hasError?alert(a.error):addToQuotationSuccess(e,t,a)},error:function(e){alert("something went wrong")}})}),$("body").on("click","button.add-all-items-to-quotation",function(){$.ajax({type:"POST",url:GLOBAL_CTX+"/account/quotation/add-all-items-to-quotation",async:!0,cache:!1,contentType:"application/json",dataType:"json",success:function(e){e.hasError?$(".notifications").html(getNotificationErrorHtml(e.errorMessage)):location.reload()},error:function(e){$(".notifications").html(getNotificationErrorHtml("Something Went Wrong!!"))}})}),$("#refinesSearch").html($("#filterRefinesSearch").html()),showHideFilter(),$(".sidebar-left input").click(function(){var e="";"undefined"!=typeof search_query&&(e=e+"search_query="+search_query+"&"),window.location=$(this).attr("link")}),$(window).load(function(){$("#top-filter-hover .content").mCustomScrollbar()}
52),$(".new-filters .ndd").mouseover(function(){var e=$(this),t=e.offset(),a=$(".nf-ndd-info"),i=t.left-a.width()+3;if($(window).scrollTop()>150){var o=t.top+e.height()+15;a.removeClass("bs-tt-br").addClass("bs-tt-tr")}else{o=t.top-a.height()-(e.height()+20);a.removeClass("bs-tt-tr").addClass("bs-tt-br")}a.addClass("active"),a.css({left:i,top:o})}).mouseout(function(){$(".nf-ndd-info").removeClass("active").removeAttr("style")}),$(".new-filters .content .form-item.disabled").on("mouseover",function(){var e=$(this).offset(),t=$(".disabled-filter-tt"),a=$(this).width()+e.left-5,i=e.top-t.height()+$(this).height()/2+7;t.addClass("active"),t.css({left:a,top:i})}).mouseout(function(){$(".disabled-filter-tt").removeClass("active").removeAttr("style")}),$(".pd-collections-info .pd-collections-info-title a").mouseover(function(e){e.stopPropagation(),$(".pd-collections-info .bs-tt").addClass("active"),clearTimeout(timer)}).mouseout(function(){timer=setTimeout(function(){$(".pd-collections-info .bs-tt").removeClass("active")},400)}),$(".pd-collections-info .bs-tt").mouseover(function(){clearTimeout(timer)}).mouseout(function(){timer=setTimeout(function(){$(".pd-collections-info .bs-tt").removeClass("active")},400)}),$(window).load(function(){$("#top-filter-hover .content").mCustomScrollbar()}),$("#breadcrumb ul li:last-child a").on("click",function(e){e.preventDefault()}),"product"==PAGE_TYPE){var E;$("#slider-main #wrap").hover(function(){if(!E){var e=$("#customizationId").val();E=window.setTimeout(function(){E=null;var t=new Object;t._eventId="zoomed_over_product",t.pageType=PAGE_TYPE,t.id=e},500)}},function(){E?(window.clearTimeout(E),E=null):$("#SeeAllEvents").slideUp("slow")});var _=parseInt($(".final-pd-price").text().replace(/,/g,""));if(getGoldMineDetail(_),"Solitaire Pendant Mount"!==productCategory&&"Solitaire Ring Mount"!==productCategory&&"Solitaire Earring Mount"!==productCategory){var L=parseInt(document.getElementById("designId").value);getSimilarDesigns(L),getMatchingSetData(L)}}$(".explore-rings .btn").click(function(){return $.fancybox.close(),!1}),$(".appointment.updated a.edit-appointment").click(function(){$(".appointment.updated").addClass("hidden"),$(".appointment.edit").removeClass("hidden")}),loadInstagramWidget(),$(window).scroll(function(){loadInstagramWidget()}),loadFacebookPageWidget(),$(window).scroll(function(){loadFacebookPageWidget()}),$(".store-feature .inner").hover(function(){$(this).find(".hover-content").addClass("active")},function(){$(".hover-content").removeClass("active")});var N=$(".customer-review .product-image img");loadTestimonialProductImages(N),$(window).scroll(function(){loadTestimonialProductImages(N)}),$(".coin-filter .filter span").on("click",function(e){var t=$(this).parent().data("weight");$(this).parent().addClass("active"),$(this).parent().siblings().removeClass("active"),$("#mainContent .ajax-loading").removeClass("hidden"),0==t?$("#grid-view-result .three-column-browse").removeClass("hidden"):$("#grid-view-result .three-column-browse").addClass("hidden"),setTimeout(function(){$("#mainContent .ajax-loading").addClass("hidden")},300),$("#grid-view-result .weight-"+t).removeClass("hidden")}),$("body").on("submit","#email-verification-form",function(e){return e.preventDefault(),$(this).validationEngine(),$("#email-verification-form").validationEngine("validate")&&sign_in(),!1}),$(".live-chat").click(function(){window.fcWidget.open(),window.fcWidget.show()}),"browse"==PAGE_TYPE&&productTagsForExperiment()}),$(document).ready(function(){$(".order-details-block .orderItem-cancel").fancybox({height:500,width:400,scrolling:"no"}),$(".order-details-block .orderItem-return").fancybox({height:500,width:400,scrolling:"no"}),$(".order-details-block .orderItem-repair").fancybox({height:500,width:400,scrolling:"no"}),$(".order-details-block .orderItem-getPoints").fancybox({height:500,width:400,scrolling:"no"}),$(".order-details-block .orderItem-getPrice").fancybox({height:250,width:200,scrolling:"no"})}),$(".order-details-block #orderItem-cancel-no").click(function(){return $.fancybox.close(),!1}),$(".order-details-block .orderItem-cancel-ok").click(function(){return $.fancybox.close(),!1}),$(".order-details-block .orderItem-return-error-ok").click(function(){return $.fancybox.close(),!1}),$(".order-details-block .orderItem-repair-error-ok").click(function(){return $.fancybox.close(),!1}),$(document).ready(function(){$(".solitaire-landing .has-carousel .product-grid").owlCarousel({items:4,lazyLoad:!0,slideSpeed:1200,paginationSpeed:1200,loop:!1,scrollPerPage:!0,rewindNav:!1,responsiveBaseWidth:".row",pagination:!1,navigation:!0,navigationText:["<i class='icon-ion-chevron-left'></i>","<i class='icon-ion-chevron-right'></i>"]})}
52),$(document).on("click",".solitaire-landing .signature .product-grid a",function(e){e.preventDefault()}),$(document).on("click",".solitaire-landing .signature .Pendant a",function(){window.location=$(".solitaire-landing a.sol-pendant").attr("href")}),$(document).on("click",".solitaire-landing .signature .Earring a",function(){window.location=$(".solitaire-landing a.sol-earring").attr("href")}),$(document).on("click",".solitaire-landing .signature .Ring a",function(){window.location=$(".solitaire-landing a.sol-ring").attr("href")}),$("#custDetailsForRingSizerForm").submit(function(e){return e.preventDefault(),!1}),$(document).keyup(function(e){27==e.keyCode&&$(".offers-carousel").animate({top:-260},500,"easeOutCubic",function(){$(".offers-overlay").fadeOut(700,"easeOutCubic"),$(".offers-badge").animate({top:0},700,"easeOutCubic")})});var customerPayment=11,bluestonePayment=1;function setNumberOfPayment(e,t){customerPayment=e,bluestonePayment=t,$("#userPayments").html(customerPayment),$("#totalPayments").html(e),updatePrice($(".input-price").val())}function updatePrice(e){$("#have-question-landing").find(".customer-invested").html(formatIndianNumber(e*customerPayment,0,",",".")+"/-"),$("#have-question-landing").find(".bs-invested").html(formatIndianNumber(e*bluestonePayment,0,",",".")+"/-"),$("#have-question-landing").find(".total-invested").html(formatIndianNumber(e*(customerPayment+bluestonePayment),0,",",".")+"/-")}function switch_tabs(e){$(".tab-content").fadeOut("fast");var t=e.attr("rel");$("#"+t).fadeIn("slow"),e.addClass("selected")}function performAction(e){0==e.checked?downQuantity(e.id.replace("cart_quantity_up_",""),1):upQuantity(e.id.replace("cart_quantity_up_",""))}function createCookie(e,t,a){if(a){var i=new Date;i.setTime(i.getTime()+24*a*60*60*1e3);var o="; expires="+i.toGMTString()}else o="";document.cookie=e+"="+t+o+"; path=/"}function getCookie(e){for(var t=e+"=",a=document.cookie.split(";"),i=0;i<a.length;i++){for(var o=a[i];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""}function deleteCookie(e){document.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"}function gridView(){$("#list-view-result").hide().removeClass("list-view-result-active"),$("#grid-view-result").show().addClass("grid-view-result-active"),$("#grid-view-span").addClass("grid-view-active"),$("#list-view-span").removeClass("list-view-active"),createCookie("viewType","grid",365),$("body").removeClass("browse-listView")}function listView(){$("#list-view-result").show().addClass("list-view-result-active"),$("#grid-view-result").hide().removeClass("grid-view-result-active"),$("#grid-view-span").removeClass("grid-view-active"),$("#list-view-span").addClass("list-view-active"),createCookie("viewType","list",365),$("body").addClass("browse-listView")}function updateAddressByCountry(){"India"==$("#countryId_delivery option:selected").text()?(updateCityStateByPincode(),$("#edit-pin-wrapper .description").show(),$("#edit-pin-wrapper").removeClass("no-auto-population"),$("#edit-pin-wrapper .label_txt").html("Pin Code")):($("#edit-pin-wrapper .description").hide(),$("#edit-pin-wrapper").addClass("no-auto-population"),$("#edit-pin-wrapper .label_txt").html("Zip Code")),$("#edit-state-wrapper").children().remove(),$.ajax({type:"GET",url:GLOBAL_CTX+"/address/states",data:"ajax=true&id_country="+$("#countryId_delivery").val(),async:!1,cache:!0,dataType:"json",success:function(e){var t=e.callPrefix;0!=t?($("#edit-phone-wrapper .country-code").html("+"+t),$("#edit-phone-wrapper").removeClass("without-country-code"),$("#edit-phone-wrapper .country-code").show()):($("#edit-phone-wrapper .country-code").html(""),$("#edit-phone-wrapper").addClass("without-country-code"),$("#edit-phone-wrapper .country-code").hide());var a=!1,i=e.states;for(var o in i){a=!0;break}if(a){var r='<label for="id_state" class="col-xs-3 control-label">State</label><div class="col-xs-7"><select id="stateId_delivery" class="validate[required] form-control" name="state.id"><option value="">Select State</option>';for(var o in i)r+='<option value="'+o+'">'+i[o]+"</option>";r+="</select></div>",$("#edit-state-wrapper").append(r),$("#edit-state-wrapper").show()}else{r='<label for="id_state" class="col-xs-3 control-label">State</label><div class="col-xs-7"><select id="stateId_delivery" class="validate[required] form-control" name="state.id"><option value="-1">NA</option></select></div>';$("#edit-state-wrapper").append(r),$("#edit-state-wrapper").hide()}}})}function updateAddress(){var e="fullname="+encodeURIComponent($("#fullname_delivery").val())+"&",t=$("#id_address_delivery").val();0==t.length&&(t=0),e+="address="+encodeURIComponent($("#address_delivery").val())+"&",e+="street="+encodeURIComponent($("#street").val())+"&",e+="locality="+encodeURIComponent($("#locality").val())+"&",e+="landmark="+encodeURIComponent($("#landmark").val())+"&",e+="cityName="+encodeURIComponent($("#cityName_delivery").val())+"&",e+="stateId="+encodeURIComponent($("#stateId_delivery").val())+"&",e+="countryId="+encodeURIComponent($("#countryId_delivery").val())+"&",e+="contactNumber="+encodeURIComponent($("#contactNumber_delivery").val())+"&",e+="alternateContactNumber="+encodeURIComponent($("#alternateContactNumber_delivery").val())+"&",e+="postCode="+encodeURIComponent($("#postcode_delivery").val())+"&",e+="token="+encodeURIComponent($("#token").val())+"&",e=(e+="createdAt="+encodeURIComponent($("#createdAt").val())+"&").substr(0,e.length-1),$.ajax({type:"POST",url:GLOBAL_CTX+"/address/saveAddress",async:!1,cache:!1,dataType:"json",data:"alias=shipping&"+e,success:function(e){if(e.hasError){var t="";for(error in e.errors)"indexOf"!=error&&(t+="<li>"+e.errors[error]+"</li>");var a='<div class="error-container-inner"><ol>'+(t+="</div></ol>");$("#opc_account_errors").html('<div class="error-container">'+a+"</div>").slideDown("slow"),result=!1}else $("input#opc_id_address_delivery").val(e.id_address_delivery),$("input#opc_id_address_invoice").val(e.id_address_invoice),window.location.reload()},error:function(e,t,a){alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: "+e+"\nText status: "+t)}})}function validateAndSubmitAddress(){$("#address-form").validationEngine(),$("#address-form").validationEngine("validate")&&updateAddress()}function validateForgotPassword(){$("#forgot-password-form-set").validationEngine(),$("#forgot-password-form-set").validationEngine("validate")&&$("#forgot-password-form-set").submit()}function validateAndSubmitGiveawayForm(e){if(e.preventDefault(),$("#giveaway-form").validationEngine(),$("#giveaway-form").validationEngine("validate")){var t=$("#giveaway-email").val(),a=$("#giveaway-newsletter").is(":checked");$.ajax({type:"POST",url:GLOBAL_CTX+"/newsletter/weekly-giveaway",async:!1,cache:!1,dataType:"json",data:"email="+encodeURIComponent(t)+"&newsletter="+a,success:function(e){e.hasError?($("#giveaway-form .error").html('<div class="error-container-new"><div class="error-container-inner"> '+e.error+" </div></div>"),$("#giveaway-form .error").show()):($("#giveaway-form").hide(),$("#giveaway-form .error").hide(),$(".ga-form, .giveaway-form").html('<div class="success-container-new"><div class="success-container-inner">Thank You For Signing Up!<br/>Be sure to use your welcome credit of Rs 1000 on the first purchase.</div></div>'),setTimeout(function(){$(".suw").removeClass("stp2")},5e3),setTimeout(function(){$.fancybox.close()},6e3),setTimeout(function(){$.fancybox.close()},5e3))}})}}
52function validateAndSubmitRakhiContest(){var e=$("#name").val(),t=$("#email").val(),a=$("#mobile").val(),i=$("#moment").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/contest/rakhimoment",async:!1,cache:!1,dataType:"json",data:"email="+encodeURIComponent(t)+"&name="+encodeURIComponent(e)+"&mobile="+encodeURIComponent(a)+"&moment="+encodeURIComponent(i),success:function(e){return e.hasError?($("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.error+"</div><div>"),$("#popup-messages").show(),!1):($("#popup-messages").html('<div class="success-container"><div class="success-container-inner">'+e.success+"</div><div>"),$("#popup-messages").show(),$("#rakhicontest-form").each(function(){this.reset()}),!0)}})}function validateAndSubmitDirectSeller(){var e=$("#customername").val(),t=$("#question-email").val(),a=$("#question-phone").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/directseller/subscribe",async:!1,cache:!1,dataType:"json",data:"email="+encodeURIComponent(t)+"&name="+encodeURIComponent(e)+"&phone="+encodeURIComponent(a),success:function(e){return e.hasError?($("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.error+"</div><div>"),$("#popup-messages").show(),!1):($("#popup-messages").html('<div class="success-container"><div class="success-container-inner">'+e.success+"</div><div>"),$("#popup-messages").show(),$("#express-interest").each(function(){this.reset()}),!0)}})}function careerForm(){var e=$("#positionName").val(),t=$("#fullName").val(),a=$("#email").val(),i=$("#experience").val(),o=$("#fileData").prop("files")[0],r=new FormData;r.append("fileData",o),r.append("positionName",e),r.append("fullName",t),r.append("email",a),r.append("experience",i),$.ajax({type:"POST",url:GLOBAL_CTX+"/career/uploadResume",async:!1,cache:!1,dataType:"json",cache:!1,contentType:!1,processData:!1,data:r,success:function(e){return e.hasError?($("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.errorStr+"</div><div>"),$("#popup-messages").show(),$(".career-form-wrapper").hide(),!1):($("#popup-messages").html('<div class="success-container text-center"><div class="success-container-inner"><i class="icon-ion-ios-checkmark-outline"></i><span>Thank You for applying at Bluestone!</span><p>Once shortlisted, our recruitment team will get in touch with you.</p><p>In case you don\'t hear form us in the next 15 days, please write in to<br/><a href="mailto:[email protected]">[email protected]</a></p></div></div>'),$("#popup-messages").show(),$(".career-form-wrapper").hide(),!0)}})}
52function updatePassword(){var e=$("#old_passwd").val(),t=$("#passwd").val(),a=$("#confirmation").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/account/identity/",async:!1,cache:!1,dataType:"json",data:"updateCustomer=true&attributeName=password&oldPassword="+encodeURI(e)+"&attributeValue="+encodeURI(t)+"&confirmPassword="+encodeURI(a),success:function(e){return e.hasError?($("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.errors.join("<br />")+"</div><div>"),$("#popup-messages").show(),!1):($("#popup-messages").html('<div class="success-container"><div class="success-container-inner">'+e.success+"</div><div>"),$("#popup-messages").show(),$("#change-password").hide(),$("#changePasswd").show(),!0)}})}function updateCustomerAttribute(e,t,a,i){if(!$("#address-form").validationEngine("validateField","#"+t)){var o=$("#"+t).val(),r=getQueryString(e,o);i&&(r+="&otpId="+i),$.ajax({type:"POST",url:GLOBAL_CTX+"/account/identity/",async:!1,cache:!1,dataType:"json",data:r,success:function(i){return i.hasError?($("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+i.errors.join("<br />")+"</div><div>"),$("#popup-messages").show(),!1):($("#popup-messages").html('<div class="success-container"><div class="success-container-inner">'+i.success+"</div><div>"),$("#"+a).html(i.inputElementValue),$("#popup-messages").show(),afterSaveButton(t),e?.toLowerCase().includes("email")&&webengage&&(webengage.user.setAttribute("we_email",i.inputElementValue),$("#editEmailHidden").html(i.inputElementValue)),!0)}})}}function afterSaveButton(e){0!=$("#"+e).parents("body").children(".formError:visible").length?($("#"+e).parents(".form-item").children(".cancel-button, .save-button, .form-text, .subscribe-link").show(),$("#"+e).parents(".form-item").children(".edit-item, .edit-button").hide(),$("#change-password").slideUp("fast"),$("#changePasswd").slideDown("fast")):($("#"+e).parents(".form-item").children(".cancel-button, .save-button, .form-text, .subscribe-link").hide(),$("#"+e).parents(".form-item").children(".edit-item, .edit-button").show(),$("#change-password").slideUp("fast"),$("#changePasswd").slideDown("fast")),$(".success-container:visible").length&&($("#"+e).parents(".form-item").children(".cancel-button, .save-button, .form-text, .subscribe-link").hide(),$("#"+e).parents(".form-item").children(".edit-item, .edit-button").show(),$("#change-password").slideUp("fast"),$("#changePasswd").slideDown("fast"))}function validateAndUpdateName(){$("#address-form").validationEngine("validateField","#name")||updateCustomerAttribute("userName","name","firstname")}function checkCarrierAvailabilityFaq(e){$.ajax({type:"POST",url:GLOBAL_CTX+"/carrier/availability-faq",async:!1,cache:!0,dataType:"json",data:"ajax=true&mode=prepaid&faqPage=1&pincode="+e,success:function(e){e.hasError?($("#carrier_success").html(""),$("#carrier_error").html(e.errorStr)):($("#carrier_success").html(e.successStr),$("#carrier_error").html(""))}})}function checkCodAvailabilityFaq(e){$.ajax({type:"POST",url:GLOBAL_CTX+"/carrier/availability-faq",async:!1,cache:!0,dataType:"json",data:"ajax=true&mode=cod&faqPage=1&pincode="+e,success:function(e){e.hasError?($("#cod_carrier_success").html(""),$("#cod_carrier_error").html(e.errorStr)):($("#cod_carrier_success").html(e.successStr),$("#cod_carrier_error").html(""))}})}function validateAndSubmitRingSizerRequest(e){$("#custDetailsForRingSizerForm").validationEngine(),$("#custDetailsForRingSizerForm").validationEngine("validate")&&submitBookRingAndBangleSizer(e)}function validateAndSubmitBangleSizerRequest(){$("#custDetailsForBangleSizerForm").validationEngine(),$("#custDetailsForBangleSizerForm").validationEngine("validate")&&submitBookRingAndBangleSizer()}function submitWeddingPreference(){var e=$("#customername_contact").val(),t=$("input[name='kindofjewellery\\[\\]']:checked").map(function(){return $(this).val()}).get(),a=$("input[name='preferredstyle\\[\\]']:checked").map(function(){return $(this).val()}).get(),i=$("input[name='categories\\[\\]']:checked").map(function(){return $(this).val()}).get(),o=$("#budget").val(),r=$("#email_contact").val(),s=$("#phone_contact").val(),n=$("#address_contact").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/weddingPreference",async:!1,cache:!1,dataType:"json",data:"userName="+encodeURI(e)+"&contactNo="+encodeURI(s)+"&email="+encodeURI(r)+"&address="+encodeURI(n)+"&budget="+encodeURI(o)+"&kindofjewellery="+encodeURI(t)+"&preferredstyle="+encodeURI(a)+"&categories="+encodeURI(i),success:function(e){return e.hasError?($("#popup-messages-preference").html('<div class="error-container"><div class="error-container-inner">'+e.message+"</div><div>"),$("#popup-messages-preference").show(),$("#wedding-preference-form").each(function(){this.reset()}),!0):($("#popup-messages-preference").html('<div class="success-container"><div class="success-container-inner"><span>Thank you for your interest!</span><br/>One of our stylists will get in touch with you very soon..</div><div>'),$("#popup-messages-preference").show(),$("#wedding-preference-form").each(function(){this.reset()}),!0)}})}
52function submitSubscriber(){var e=$("#newsletter_subscriber").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/newsletter/subscribe",async:!1,cache:!1,dataType:"json",data:"email="+encodeURI(e),success:function(e){return e.hasError?($("#subscriber_msg").html(e.error),$("#subscriber_msg").show(),$("#subscriber-form .input-group").hide(),$("#subscriber-form").each(function(){this.reset()}),!0):($("#subscriber_msg").html(e.success),$("#subscriber_msg").show(),$("#subscriber-form .input-group").hide(),$("#subscriber-form").each(function(){this.reset()}),!0)}})}function submitDailyFortuneSubscriber(){var e=$("#daily_fortune_newsletter_subscriber").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/newsletter/daily-fortune-subscribe",async:!1,cache:!1,dataType:"json",data:"email="+encodeURI(e),success:function(e){return e.hasError?($("#daily_fortune_subscriber_msg").html(e.error),$("#daily_fortune_subscriber_msg").show(),$("#daily-fortune-subscriber-form").each(function(){this.reset()}),!0):($("#daily_fortune_subscriber_msg").html(e.success),$("#daily_fortune_subscriber_msg").show(),$("#daily-fortune-subscriber-form").each(function(){this.reset()}),setTimeout(function(){$(".etd-popup, .alert-popup").slideUp(),$("#daily_fortune_subscriber_msg").hide()},3e3),$("#daily-fortune-subscriber-form").hide(),!0)}})}function getPriceForCountry(e,t){if("India"!=t){var a=eRates[COUNTRY];e=Math.ceil(e/a)}return e}function HideshowCustomizationDiv(){$("#selectMetalAndDiamondQuality").slideUp(),$("#longDescriptionInRightPane").slideDown()}function getCustomization(e,t){$.ajax({type:"GET",url:GLOBAL_CTX+"/design/getcustomization",async:!1,cache:!1,dataType:"text",data:"ajax=true&customizationId="+customizationId+"&metals="+e+"&stones="+t,success:function(e){$("#customizationResponse").html(e),$("#designContent #details-top-right #details-top-right-inner #short_desc").html($("#customizationResponse #details-top-right #details-top-right-inner #short_desc").html()),$("#designContent #details-top-right #details-top-right-inner #our_price_display").html($("#customizationResponse #details-top-right #details-top-right-inner #our_price_display").html()),$("#designContent #details-top-right #details-top-right-inner #our_price_emi").html($("#customizationResponse #details-top-right #details-top-right-inner #our_price_emi").html()),$("#designContent #details-top-right #details-top-right-inner #expected_delievery_date").html($("#customizationResponse #details-top-right #details-top-right-inner #expected_delievery_date").html()),$("#designContent #details-top-left").html($("#customizationResponse #details-top-left").html()),$("#customizationIdField").html($("#customizationResponse #customizationIdField")),$("#designContent #item-details").html($("#customizationResponse #item-details").html()),$(".jcarousel-active-thumbs").jcarousel({vertical:!0,scroll:1}),$(".slide-thumbs ul li:last").addClass("last"),$(".slide-thumbs ul li:first").addClass("active"),$(".slide-thumbs ul li a").click(function(){$(".slide-thumbs ul li").removeClass("active"),$(this).parent().addClass("active")}),$(".cloud-zoom, .cloud-zoom-gallery").CloudZoom()}})}function redeemGoldminePlan(e,t){t.preventDefault();var a="planCode="+e;return $.ajax({type:"POST",url:GLOBAL_CTX+"/gmsp/redeem",async:!1,cache:!1,dataType:"json",data:a,success:function(t){t.hasError?($("#goldmine-redeem-"+e+" .error-container-inner").html("Your request could not be processed."),$("#goldmine-redeem-"+e+" #popup-messages").show()):$("#gm-redeem-success-wrapper-"+e+" a").trigger("click")}}),!1}function mycarousel_initCallback(e){e.buttonNext.bind("click",function(){e.startAuto(0)}),e.buttonPrev.bind("click",function(){e.startAuto(0)}),e.clip.hover(function(){e.stopAuto()},function(){e.startAuto()})}function noenter(){return!(window.event&&13==window.event.keyCode)}function showReservePriceFancyBox(e,t){trackGA("Product_Detail_Link","Click","Reserve Price",e),t=void 0!==t?t:1;var a=getCustomizationCode();1==t&&$.fancybox({transitionIn:"elastic",transitionOut:"fade",overlayColor:"#000",overlayOpacity:".2",centerOnScroll:!1,scrolling:"no",onComplete:function(){},onCleanup:function(){$("#reserve-price-form").validationEngine("hideAll")},href:GLOBAL_CTX+"/showReservePricePageBody/"+a})}function validateAndReservePrice(){return $("#reserve-price-form").validationEngine(),$("#reserve-price-form").validationEngine("validate")&&reserve_price(),!1}function reserve_price(){return $("#fancybox-loading").css("display","block"),$("#popup-messages").html('<div class="success"> Please wait ......</div>'),$.post($("#reserve-price-form").attr("action"),$("#reserve-price-form").serialize(),function(e){handleReservePriceResponse(e)},"json"),$("#fancybox-loading").css("display","none"),!1}function handleReservePriceResponse(e){0==e.hasError?$(".price-reserve-wrapper").html($(".price-reserved-wrapper").html()):$("#popup-messages").html('<div class="error-container"><div class="error-container-inner">'+e.errors.join("<br />")+"</div></div>")}$(function(){$("ul.products-grid li, #daily-fortune, #s-d li, .gift-link, .landing-browse-page").click(function(){window.location=$("a",this).attr("href")}),$("#voucher-form .btn").click(function(e){""==$("#voucher-form .form-control").val()?(e.preventDefault(),$("#voucher-form .form-control").addClass("error")):$("#voucher-form .form-control").removeClass("error")}),$("#newOffer-form .btn").click(function(e){""==$("#newOffer-form .form-control").val()?(e.preventDefault(),$("#newOffer-form .form-control").addClass("error")):$("#newOffer-form .form-control").removeClass("error")})}),$(document).ready(function(){var e;function hideTooltip(){e=setTimeout(function(){$(".jtooltip-trigger").parent().find(".jtooltip").removeClass("active")},400)}$("#featured-tabs ul.tabs li:first").attr("rel","tab1"),$(".tabs li").click(function(e){switch_tabs($(this)),e.preventDefault()}),"product"!=PAGE_TYPE||getCookie("tah_tooltip")||setTimeout(function(){$("#homeTryOnProductButton").parent().find(".jtooltip").addClass("active animated fadeInDown"),createCookie("tah_tooltip","true",365)},5e3),"browse"!=PAGE_TYPE&&"store-catalog"!=PAGE_TYPE||getCookie("tah_tooltip_bp")||$(".tah-add-option-wrap").hasClass("hidden")||$("body").on("click",".tah-bp-tooltip .close-tooltip",function(){$(".tah-bp-tooltip").remove(),trackGA("TAH","BP Tooltip","Got it clicked")}),"browse"!=PAGE_TYPE&&"store-catalog"!=PAGE_TYPE||!getCookie("pincode")||isGPin||($("#browsePincodeValue").text(getCookie("pincode")),$("#userPincodeStoreTAH").val(getCookie("pincode")).parent().addClass("auto-filled")),switch_tabs($(".defaulttab")),$(".jtooltip-trigger").mouseover(function(t){t.stopPropagation(),$(".jtooltip").removeClass("active animated fadeInDown"),$(this).parent().find(".jtooltip").addClass("active"),clearTimeout(e)}).mouseout(hideTooltip),$(".jtooltip").mouseover(function(){clearTimeout(e)}).mouseout(hideTooltip);var t="block"==$(".store-content .customization-available").css("display");"product"==PAGE_TYPE&&t&&trackGA("BsUI","Informed user about available delivery by tomorrow customizations","DesignId "+productDetails.id)}),$(function(){$("#featured-categories section, #featured-blocks .block-style1, #featured-blocks .box-link, #featured-cat section, #featured-cat2 section").click(function(){window.location=$("a",this).attr("href")})}),$(function(){$("#featured-cat img").hover(function(){$(this).stop().animate({top:"-5"},200)},function(){$(this).stop().animate({top:"0"},400)})}),$(document).ready(function(){$("#featured-next, #featured-prev, #tfeatured-next, #tfeatured-prev").css({opacity:0}
52),$("#trends, #featured-inner").hover(function(){$("#featured-next, #featured-prev, #tfeatured-next, #tfeatured-prev",this).stop().animate({opacity:"1"},{duration:300})},function(){$("#featured-next, #featured-prev, #tfeatured-next, #tfeatured-prev",this).stop().animate({opacity:"0"},{duration:300})})}),$(document).ready(function(){$("a.fancybox-popup").fancybox({autoScale:!1,beforeShow:function(){$("#size-helper").length>0&&(""!=$("#emailForLoggedInUser").val()&&$("#email").val($("#emailForLoggedInUser").val()),""!=$("#mobileForLoggedInUser").val()&&$("#mobile").val($("#mobileForLoggedInUser").val()))},afterClose:function(){$(".formError").remove(),$("#size-helper").length>0&&clearSizerPopupData()}}),$(".fancybox-popup-style2").fancybox({autoScale:!1,wrapCSS:"fancybox-style2",afterClose:function(){$(".formError").remove()}}),$(".fancybox-popup-style3").fancybox({width:560,height:560,autoSize:!1,wrapCSS:"fancybox-style3",afterClose:function(){$(".formError").remove(),trackGA("BsUI","BrowsePage","Video Fancybox Closed"),$("body").off("click",".fancybox-overlay")},afterShow:function(){setTimeout(function(){$("body").on("click",".fancybox-overlay",function(){$.fancybox.close()})},1e3)},helpers:{overlay:{css:{background:"rgba(0, 0, 0, 0.8)"},closeClick:!1}}}),$(".fancybox-popup-style-4").fancybox({width:726,height:426,autoSize:!1,wrapCSS:"fancybox-style-4",afterClose:function(){$(".formError").remove()},tpl:{closeBtn:'<a title="Close" class="fancybox-item  popup-close" href="javascript:;"><i class="icon-ion-android-close"></i></a>'},helpers:{overlay:{css:{background:"rgba(0, 0, 0, 0.5)"}}}}),$(".fancybox-popup-style-5").fancybox({autoScale:!1,wrapCSS:"fancybox-style-5",afterClose:function(){$(".formError").remove()}}),$(".fancybox-popup-style-6").fancybox({width:930,height:500,autoSize:!1,wrapCSS:"fancybox-style-6",afterClose:function(){$(".formError").remove()},tpl:{closeBtn:'<a title="Close" class="fancybox-item popup-close" href="javascript:;"><i class="icon-ion-android-close"></i></a>'},helpers:{overlay:{css:{background:"rgba(0, 0, 0, 0.5)"}}}}),$(".fancybox-popup-style-7").fancybox({width:600,height:426,autoSize:!1,wrapCSS:"fancybox-style-7",afterClose:function(){$(".formError").remove()},tpl:{closeBtn:'<a title="Close" class="fancybox-item  popup-close" href="javascript:;"><i class="icon-ion-android-close"></i></a>'},helpers:{overlay:{css:{background:"rgba(0, 0, 0, 0.5)"}}}}),$(".fg-fancybox-close").click(function(){return $.fancybox.close(),!1}),$("a.fancybox-popup-ov").fancybox({autoScale:!1,wrapCSS:"fancybox-overflow-visible",afterClose:function(){$(".formError").remove()},helpers:{overlay:{closeClick:!1}},keys:{close:[]}}),$("a.fancybox-popup-trn").fancybox({autoScale:!1,wrapCSS:"fp-transparent"}),gridView()}),$(".has-address #edit-submit-shipping-address, .has-address #edit-submit-billing-address").click(function(){return $(this).parents(".my-account").children(".user-address").slideUp("medium"),$(this).parents(".my-account").children(".content").slideToggle("medium"),!1}),$(".has-address #edit-cancel-shipping-address, .has-address #edit-cancel-billing-address").click(function(){return $(this).parents(".my-account").children(".content").slideUp("medium"),$(this).parents(".my-account").children(".user-address").slideToggle("medium"),!1}),$(document).ready(function(){$("#openGsPoup a").fancybox({type:"iframe",scrolling:"no",height:319,width:473}),$("#openGsPoup a").eq(0).trigger("click"),$("body.page-front .shop-b-p").fancybox().trigger("click"),$(".shop-b-p").fancybox(),$("#shop-b-p .optns .quiz").click(function(){"basequestion"==$(this).parents("li").attr("id")&&($(this).find(".chk-select").length<1&&($(this).parents("#shop-b-p").find(".checkbox").removeClass("chk-select"),$(this).parents("#shop-b-p").find("input").attr("checked",!1),$(this).parents("#shop-b-p").find(".next").css({visibility:"hidden"})),$(".formyself").show(),$(".formygirl").show(),"myself"==$(this).find("input").val()?$(".formygirl").hide():$(".formyself").hide());return $(this).parents(".optns").find(".checkbox").removeClass("chk-select"),$(this).parents("li").find(".next").css({visibility:"visible"}).animate({opacity:1},200),$(this).find(".checkbox").addClass("chk-select"),$(this).parents(".optns").find("input").attr("checked",!1),$(this).children("input").attr("checked","checked"),!1});var e=0;function checkPersonality(t,a){$.ajax({type:"POST",url:GLOBAL_CTX+"/pers
52onality/"+t,async:!1,cache:!1,dataType:"json",data:a,success:function(t){if(!t.isTie)return $.fancybox.close(),window.location=t.redirectURL,!1;e=t.score,$(".optns .tiebreaker").hide();for(var a=t.winner.split(","),i=0;i<a.length;i++){a[i]=a[i].replace(/^\s*/,"").replace(/\s*$/,"");var o=a[i].toLowerCase();$("."+o).show()}}})}function updateRefundAmounts(){var e=0,t=Number($("#available-bs-cash").html());$(".refund-row input:checkbox").each(function(){var a=Number($(this).parents("tr").find("span.refund-amt").html().trim()),i=Number($(this).parents("tr").find("span.refund-amt").data("amount"));$(this).is(":checked")?(t-=a=i,e+=a):(t+=a=0,e-=a),$(this).parents("tr").find("span.refund-amt").html(a)}),$("#bscash-refund-amount").html(e),$("#bscash-balance").html(t)}$("#shop-b-p #personality-quiz .finish").click(function(){checkPersonality("breaktie","q10="+$('input[name="q10"]:checked').val()+"&score="+e)}),$("#shop-b-p #personality-quiz .tiecheck").click(function(){checkPersonality("check","q1="+$('input[name="q1"]:checked').val()+"&q2="+$('input[name="q2"]:checked').val()+"&q3="+$('input[name="q3"]:checked').val()+"&q4="+$('input[name="q4"]:checked').val()+"&q5="+$('input[name="q5"]:checked').val()+"&q6="+$('input[name="q6"]:checked').val()+"&q7="+$('input[name="q7"]:checked').val()+"&q8="+$('input[name="q8"]:checked').val()+"&q9="+$('input[name="q9"]:checked').val())}),function checkCouplePersonalityQuizPopup(){0!=$(".platinum-page").length&&-1!=window.location.search.indexOf("sp=1")&&$(".trigger-c-q-p").fancybox().trigger("click")}
52(),$("#shop-b-p #couple-quiz .finish").click(function(){var e=$('input[name="q1"]:checked').val(),t=$('input[name="q2"]:checked').val(),a=$('input[name="q3"]:checked').val(),i=$('input[name="q4"]:checked').val(),o=$('input[name="q5"]:checked').val(),r=$('input[name="q6"]:checked').val(),s=$('input[name="q7"]:checked').val();$('input[name="q8"]:checked').val(),$('input[name="q9"]:checked').val();!function checkCouplePersonality(e,t){$.ajax({type:"POST",url:GLOBAL_CTX+"/couplequiz/"+e,async:!1,cache:!1,dataType:"json",data:t,success:function(e){return $.fancybox.close(),window.location=e.redirectURL,!1}})}("check","q1="+e+"&q2="+t+"&q3="+a+"&q4="+i+"&q5="+o+"&q6="+r+"&q7="+s)}),$(".international-shipping a").fancybox({height:500,width:400,scrolling:"no"}),$(".a-t-tc").fancybox({height:500,width:400,scrolling:"no"}),$("#bscash-refund-details").find(":checkbox").prop("checked","checked"),$("#initiate-offline-refund").click(function(){$(this).is(":checked")?$(".offline-payment-row").fadeIn("slow"):($(".offline-payment-row").fadeOut("fast"),$(".formError").remove())}),$(".neft-check").is(":checked")?$(".offline-payment-row").show():$(".offline-payment-row").hide(),$(".bscash-refund").fancybox({height:500,width:400,scrolling:"no",afterClose:function(){$(".bscash-refund").validationEngine("hideAll")},afterLoad:function(){updateRefundAmounts()}}),$(".bscash-refund-success-href").fancybox({height:500,width:400,scrolling:"no",afterClose:function(){location.reload()}}),$(".refund-tx").change(function(){updateRefundAmounts()}),$(".neft-check").change(function(){updateRefundAmounts(),$(".neft-check").is(":checked")?($("#refund-buttons_refund").hide(),$("#refund-buttons_neft").show()):($("#refund-buttons_refund").show(),$("#refund-buttons_neft").hide())}),$("#bs-cash-refund-cancel,#bs-cash-neft-refund-cancel").click(function(){return $.fancybox.close(),!1}),$("#bs-cash-refund-edit").click(function(){return $("#refund-neft-details").show(),$("#refund-buttons_refund").show(),$("#refund-confirm-details").hide(),!1}),$("#bscash-refund-success-ok").click(function(){return $.fancybox.close(),location.reload(),!1}),$("#sendOTPForNeft").click(function(e){e.preventDefault(),"myAccount"===PAGE_TYPE&&function validateNeftFormAndSendOTP(e){var t=$("input:checkbox[name=refund-tx]:checked").length,a=$(".neft-check").is(":checked");a&&t++;if(0==t)return void alert("Please select mode of refund and then click Refund button");if(a&&($("#neft-form").validationEngine(),!$("#neft-form").validationEngine("validate")))return!1;var i=otpUtilNew.sendOTP(e,OTP_TYPE.NEFT,"");i.hasError?($("#bscash-refund-details #popup-messages .error-container-inner").html(i.errorMsg),$("#bscash-refund-details #popup-messages").css("display","block")):($("#refund-neft-details").slideUp(),$("#refund-buttons_neft").slideUp(),i.isOtpSent&&(utilityFuncForOTP.addMaskedNumber(i.customerPhone),$("#bsWalletOTPPopup").slideDown(),document.getElementById("bsWalletOTPPopup").style.width="100%"));function initiateNeftRefund(){var e=$("#accountHolderName").val(),t=$("#bankName").val();"Other"==t&&(t=$("#otherBankName").val());var a=$("#bankBranchName").val(),i=$("#accountNumber").val(),o=$("#ifscCode").val();$("#confirm-bank").html(t),$("#confirm-bankbranch").html(a),$("#confirm-ifsc").html(o),$("#confirm-accountname").html(e),$("#confirm-accountnumber").html(i),$("#refund-confirm-details").slideDown()}$("#verifyBsWalletOTP").on("submit",function(e){e.preventDefault();var t=$("#otp").val(),a=otpUtilNew.verifyOTP(t);"myAccount"===PAGE_TYPE&&(a.isOtpVerified?($("#isBsCashOtpverified").val(!0),initiateNeftRefund(),otpEnteredOnPayment(e),document.getElementById("bsWalletOTPPopup").style.display="none"):utilityFuncForOTP.showOtpErrorMessage("#bscash-refund-details",a.errorMsg))}),$("#resendOtp").on("click",function(e){otpUtilNew.resendOTP(e,OTP_TYPE.NEFT,"")})}(e)}),$("#bs-cash-refund-confirm-ok,#bs-cash-neft-refund-confirm-ok").click(function(){var e=$
52("input:checkbox[name=refund-tx]:checked").length,t=$(".neft-check").is(":checked");if(t&&e++,0!=e){if(t&&($("#neft-form").validationEngine(),!$("#neft-form").validationEngine("validate")))return!1;var a="",i=0;$("input:checkbox[name=refund-tx]:checked").each(function(){var e=Number($(this).parents("tr").find(".ptx-id").html().trim()),t=Number($(this).parents("tr").find(".ptx-amnt").html());a=(a=a+"ptxId"+i+"="+e+"&")+"ptxAmnt"+i+"="+t+"&",i++}),a=a+"ptxCount="+i;var o=$("#isBsCashOtpverified").val(),r=$("#otpId").val();if(t&&"true"===o){a&&(a+="&"),a+="neft=true";var s=Number($(".neft-refund .refund-amt").html().trim()),n=$("#accountHolderName").val(),l=$("#bankName").val();"Other"==l&&(l=$("#otherBankName").val());var d=$("#accountNumber").val(),c=$("#ifscCode").val();a=(a=(a=(a=(a=(a=a+"&accountHolderName="+n)+"&bankName="+l)+"&accountNumber="+d)+"&ifscCode="+c)+"&neftAmount="+s)+"&otpId="+r}return $.ajax({type:"POST",url:GLOBAL_CTX+"/pg/refund",async:!1,cache:!1,dataType:"json",data:a,success:function(e){e.hasError?($("#bscash-refund-details .error-container-inner").html("Your request could not be processed. "+e.errorMessage),$("#bscash-refund-details #popup-messages").show()):$(".bscash-refund-success a").trigger("click")}}),!1}alert("Please select mode of refund and then click Refund button")}),$(".goldmine-redeem").fancybox({height:500,width:400,scrolling:"no",onClosed:function(){location.reload()}}),$(".gm-redeem-success-href").fancybox({height:500,width:400,scrolling:"no",onClosed:function(){location.reload()}}),$(".gm-redeem-cancel").click(function(){return $.fancybox.close(),!1}),$(".gm-redeem-success-ok").click(function(){return $.fancybox.close(),!1})}),$(document).ready(function(){$("#accountNumber, #confirmAccountNumber").on("cut copy paste",function(e){e.preventDefault()}),$(".other-bank").hide(),$("#neft-form select").change(function(){$("#confirmAccountNumber").removeClass(),$("#accountNumber").removeClass();var e="validate[required,custom[onlyNumberSp],equals[accountNumber],minSize["+$("option:selected",this).data("minchar")+"]] form-control";$("#confirmAccountNumber").addClass(e),$("#accountNumber").addClass(e);var t=$("option:selected",this).data("placeholder");$("#ifscCode").removeAttr("placeholder"),$("#ifscCode").attr("placeholder",t),$(".other-bank").slideUp("fast"),"Other"==$("option:selected",this).val()&&$(".other-bank").slideDown("slow"),$("#ifscCode").removeAttr("placeholder"),$("#ifscCode").attr("placeholder",t)}),$("#neft-form").validationEngine("attach",{})}),jQuery(document).ready(function(){jQuery(".product-carousel ul li:last-child").addClass("last"),$("#etd .date").click(function(e){e.stopPropagation(),$(".pin-code-error").hide(),$(".invalid-pin-code-error").hide(),$(".pin-code-required-error").hide(),$(this).parent("#etd").find(".form-text").val(""),$(this).parent("#etd").find(".etd-popup").slideDown("fast")}),$(".d-f-alert").click(function(e){e.stopPropagation(),$("#daily-fortune-subscriber-form").show(),$(".alert-popup").slideDown("fast"),$(".formError").show("fast")}),$("body").click(function(){$(".etd-popup, .alert-popup").slideUp(),$(".daily_fortune_newsletter_subscriberformError").hide("fast"),$(".invalid-pin-code-error").hide("fast"),$(".etd-popup").is(":visible")&&$(".formError").remove()}),$(".etd-popup, .alert-popup").click(function(e){e.stopPropagation()}),$("#sol-details #etd a.btn").click(function(e){e.preventDefault();var t=$(this).parents("#etd").find(".form-text").val(),a=$("#solitaire-code").html().trim();updateDeliveryDateByPincode(t,GLOBAL_CTX+"/deliverydate/solitaire/get","ajax=true&productcode="+a+"&pincode="+t)}),$("#build-sol #etd a.btn").click(function(e){e.preventDefault();var t=$(this).parents("#etd").find(".form-text").val(),a=$(".solitaire-code").html().trim(),i=$(".mount-code").html().trim();updateDeliveryDateByPincode(t,GLOBAL_CTX+"/deliverydate/solitairejewellery/get","ajax=true&mountcode="+i+"&solitaireCode="+a+"&pincode="+t)}),$("#p-ss .other a").click(function(e){var t=($(window).width()-575)/2,a=($(window).height()-400)/2,i=this.href,o="status=1,width=575,height=400,top="+a+",left="+t;return window.open(i,"twitter",o),!1}),$(".elowrcase").on("blur",function(e){var t=e.target.value.toLowerCase();$(this).val(t)}),$("body").on("blur","#edit-email-wrapper #email-id, #signup-edit-email-wrapper #email, #forget-edit-email-wrapper #recover_email",function(e){var t=e.target.value.toLowerCase();$(this).val(t)})});var timer,end,now,gosf_end,gosf_now,_second=1e3,_minute=60*_second,_hour=60*_minute,_day=24*_hour;function showRemaining(){now.setSeconds(now.getSeconds()+1);var e=end-now;
52if(e<0)clearInterval(timer);else{Math.floor(e/_day);var t=Math.floor(e%_day/_hour),a=Math.floor(e%_hour/_minute),i=Math.floor(e%_minute/_second);document.getElementById("countdown").innerHTML=t<10?'<span class="hr">0'+t+"</span>":'<span class="hr">'+t+"</span>",document.getElementById("countdown").innerHTML+='<span class="min">'+(a<10?"0"+a:a)+"</span>",document.getElementById("countdown").innerHTML+='<span class="sec">'+(i<10?"0"+i:i)+"</span>",$(".page-dod .d-counter span").each(function(e){var t=$(this).text().split("");$this=$(this),$this.empty(),$.each(t,function(e,t){$this.append("<i>"+t+"</i>")})})}}function showRemainingGosf(){gosf_now.setSeconds(gosf_now.getSeconds()+1);var e=gosf_end-gosf_now;if(e<0)return clearInterval(timer),void(document.getElementById("countdown").innerHTML="EXPIRED!");var t=Math.floor(e/_day),a=Math.floor(e%_day/_hour),i=Math.floor(e%_hour/_minute),o=Math.floor(e%_minute/_second);document.getElementById("countdown").innerHTML="<span class='first'>"+t+"</span><span class='separator'>:</span>",document.getElementById("countdown").innerHTML+="<span>"+a+"</span><span class='separator'>:</span>",document.getElementById("countdown").innerHTML+="<span>"+i+"</span><span class='separator'>:</span>",document.getElementById("countdown").innerHTML+="<span>"+o+"</span>"}function mainMenuInt(){$(".main-menu ul li.menuparent, .wh-navbar ul li.menuparent").hoverIntent({sensitivity:400,interval:25,over:showNav,timeout:25,out:hideNav}),$(".main-menu div.submenu ul li, .wh-navbar div.wh-submenu ul li").hoverIntent({sensitivity:400,interval:50,over:showSubNav,timeout:50,out:hideSubNav}),$(".no-submenu").parent(".submenu").width(198),$(".main-menu, .wh-navbar").hover(function(){$(".main-menu img, .wh-navbar img").each(function(){var e=$
52(this).data("imgsrc");$(this).attr("src",e)})})}function showNav(){$(this).addClass("active").find("div.submenu, div.wh-submenu").fadeIn("fast"),$(this).hasClass("no-wh-submenu")||$(".wh-overlay").show()}function hideNav(){$(this).removeClass("active").find("div.submenu, div.wh-submenu").fadeOut("medium"),$(".wh-overlay").hide()}function showSubNav(){$(this).addClass("active"),$(this).siblings().removeClass("active")}function hideSubNav(){$(this).addClass("active")}function showHideFilter(){$("#top-filter .block").hoverIntent({sensitivity:200,interval:25,over:showFilter,timeout:25,out:hideFilter})}function showHideSortBy(){$(".sort-options .sort-by").hoverIntent({sensitivity:200,interval:25,over:showFilter,timeout:25,out:hideFilter})}function showFilter(){$(this).addClass("active").find(".content").slideDown("fast"),logHoveredOverFilterEvent($(this).find(".title").text())}function hideFilter(){$(this).removeClass("active").find(".content").slideUp("medium")}function showHideCustomizeSizes(){$(".default-size-holder").hoverIntent({sensitivity:200,interval:25,over:showNDDFilter,timeout:25,out:hideNDDFilter})}function showNDDFilter(){$(this).addClass("active").find(".content").slideDown("fast"),logHoveredOverFilterEvent($(this).find(".title").text())}function hideNDDFilter(){$(this).removeClass("active").find(".content").slideUp("medium")}function formatNumberIndian(e,t,a,i){var o=(e=Number(e).toFixed(t))+"",r=o.toString().split("."),s=2==r.length?r[0]:o,n=("0."+(2==r.length?r[1]:0)).substr(2),l=s.length,d="";if(l>3)for(d=a+s.substring(l-3),s=s.substring(0,l-3),l-=3;l>2;)d=a+s.substring(l-2)+d,s=s.substring(0,l-2),l-=2;return s+=d,0==parseInt(t)?s:s+i+(n>0?n:"00")}function formatNumber(e){return"India"==COUNTRY?formatNumberIndian(e,0,",","."):(e+="").replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")}function forgotPasswordWithValidation(){return $("#forget-password").validationEngine(),$(".fancybox-overlay").on("click",function(){$(".formError").remove()}),$("#forget-password").validationEngine("validate")&&forgotPassword(),!1}function sendOTPtoLoginWithValidation(e){return e.preventDefault(),$("#loginbox #otp-form").validationEngine(),$("#loginbox #otp-form").validationEngine("validate")&&generateOTPForLogging(e),!1}function verifyOTPtoLoginWithValidation(e){return $("#user-login #otp-verification-form").validationEngine(),$("#user-login #otp-verification-form").validationEngine("validate")&&verifyOTPForLogging(e),!1}function showLoading(e){$(e+" button.btn span").hide(),$(e+" .ajax-loader").show()}function hideLoading(e){$(e+" button.btn span").show(),$(e+" .ajax-loader").hide()}function spcEmailValidation(e,t){if($("#userLoginForm").validationEngine(),$("#passwordForm").validationEngine(),$("#userLoginForm").validationEngine("validate")&&$("#passwordForm").validationEngine()){var a=document.getElementById("login-email").value;"change"==t&&(a=$(".your-details .spc-content-inner #change-email input[type=text]").val()),$(".user-email .email").html(a),$.ajax({type:"GET",url:GLOBAL_CTX+"/singlepagecheckout/customerByEmail",async:!1,cache:!1,dataType:"json",data:"loginEmail="+a+"&cartId="+e,success:function(e){updateSpcAddress(e,a),updateSpcLoginPage(e,t)}})}}function updateSpcAddress(e,t){if(setSpcStates(e),$(".spc-call-prefix").html("+"+e.callPrefix),void 0!==e.emailStatus&&"new"!=e.emailStatus){var a=JSON.parse(e.customerDetail);if(a&&0!==a.length){var i='<input id="countryId1_delivery" name="country.name" class="form-control-3" disabled="disabled" type="text"+ value="'+a.customerCountry+'" placeholder="SELECT COUNTRY"  size="42"/>';setSpcAddressHeader(a,t),$(".your-details #updateUserData .user-email .email").html(t),$(".your-details #updateUserData #fullname").val(a.customerName),$(".your-details #updateUserData #contactNumber").val(a.customerContactNo),$(".your-details #updateUserData #altContactNumber").val(a.customerAltContactNo),$(".your-details #updateUserData .countryList").html(i),$(".your-details #updateUserData #address").val(a.customerAddress),$(".your-details #updateUserData #postcode_delivery").val(a.customerPincode),$(".your-details #updateUserData #cityName_delivery").val(a.customerCity),e.city&&($("#cityName_delivery").val(e.city),"India"==e.country&&$("#stateId_delivery").val(e.id_state-1)),"United Kingdom"==e.country?$(".state-list").addClass("hide"):$(".state-list").removeClass("hide"),"India"!=e.country?$(".spc-pin-code").html("Zip Code"):$(".spc-pin-code").html("Pin Code")}}else $(".your-details .heading .email").html(t),$(".your-details #updateUserData .user-email .email").html(t),"United Kingodm"==e.country?$(".state-list").addClass("hide"):$(".state-list").removeClass("hide"),"India"!=e.country?$(".spc-pin-code").html("Zip Code"):$(".spc-pin-code").html("Pin Code")}function setSpcAddressHeader(e,t){$(".your-details .heading .email").html(t),$(".your-details .heading .name-contact").html(e.customerName+" +"+e.callPrefix+e.customerContactNo),$(".your-details .heading .city-pincode").html(e.customerCity+" - "+e.customerPincode),"United Kingdom"!=e.country?$(".your-details .heading .state").slideDown():$(".your-details .heading .state").slideUp(),$(".your-details .heading .state").html(e.customerState),$(".your-details .heading .address").html(e.customerAddress)}function updateSpcCartDetail(e){var t,a=e.cartItemTotalCount;t=e.spcCartDivision,$(".your-order .heading .cartCount").html(a),$(".your-order .cart-body .cart-item").html(t);var i=e.cartFinalPrice;$(".your-order .cart-footer .you-pay #getActualPrice").html(e.cartPriceWithoutDiscount),$(".your-order .you-pay .price-without-discount .WebRupee").html(e.currencySymbol),"India"==e.country?($(".your-order .you-pay .price-without-discount .WebRupee-spc").switchClass("WebRupee-spc","WebRupee").html(e.currencySymbol),$(".your-order .you-pay .price .WebRupee-spc").switchClass("WebRupee-spc","WebRupee").html(e.currencySymbol),$(".offer-helper-block #voucher-code").removeClass("hide")):($(".your-order .you-pay .price-without-discount .WebRupee").switchClass("WebRupee","WebRupee-spc").html(e.currencySymbol),$(".your-order .you-pay .price .WebRupee").switchClass("WebRupee","WebRupee-spc").html(e.currencySymbol),$(".offer-helper-block #voucher-code").addClass("hide"));var o=$(".your-order .cart-body .offer-container #actual-blue-wallet").val();$("#voucher-code input[type=checkbox]").is(":checked")&&0==e.voucherValue&&$(".your-order .cart-footer .voucher-code").addClass("hide"),void 0!==e.voucherValue&&0!=e.voucherValue&&null!=typeof e.voucherCode&&($(".your-order .cart-footer .voucher-code .voucher-value").html(e.voucherValue.toLocaleStr
52ing()),$(".your-order .cart-footer .voucher-code").removeClass("hide"),$("#discountCode").val(e.voucherCode),$(".offer-helper-block #voucher-code #have-discount").prop("checked",!0),$(".offer-helper-block #voucher-code").addClass("show-content"),$(".offer-helper-block #voucher-code label i").switchClass("icon-ion-ios-circle-outline","icon-ion-ios-checkmark"),$("#voucher-form button.btn > span").text("Remove"),$("#voucher-code .voucher .message.success").removeClass("hide"),$("#discountCode").attr("readonly","readonly")),$("#blue-wallet input[type=checkbox]").is(":checked")&&0!=o&&void 0===e.isVeryFirstOrder&&((i-=parseFloat(o.replace(/,/g,"")))<=0?(i=0,$(".your-order .cart-footer .blue-wallet-applied .blue-wallet").html(e.cartFinalPrice.toLocaleString()),$(".your-order .cart-body .offer-container .blue-wallet .blue-wallet-amount").html(e.cartFinalPrice.toLocaleString())):($(".your-order .cart-footer .blue-wallet-applied .blue-wallet").html(o),$(".your-order .cart-body .offer-container .blue-wallet .blue-wallet-amount").html(o.toLocaleString()))),$(".your-order .cart-footer .you-pay #getDiscountedPrice").html(i.toLocaleString()),$(".your-order .heading .right .you-pay").html(i.toLocaleString()),i<e.cartPriceWithoutDiscount?$(".your-order .cart-footer .you-pay .price-without-discount").removeClass("hide"):$(".your-order .cart-footer .you-pay .price-without-discount").addClass("hide")}function updateSpcLoginPage(e,t){var a=e.blueWallet;if("change"==t){var i=$(".your-details .spc-content-inner #change-email #login-email-update").val();$(".your-details .spc-content-inner .input-email #login-email").val(i)}a&&0!=a.length&&"0"!==a&&void 0===e.isVeryFirstOrder?($(".your-details .spc-content-inner #change-email").slideUp(),$(".your-details .spc-content-inner .input-email").slideUp(),$(".your-details .user-email .info-block .blue-wallet").html(a),"India"==e.country?$(".your-details .user-email .info-block .WebRupee-spc").switchClass("WebRupee-spc","WebRupee").html(e.currencySymbol):$(".your-details .user-email .info-block .WebRupee").switchClass("WebRupee","WebRupee-spc").html(e.currencySymbol),$(".your-order .offer-helper-block .blue-wallet .blue-wallet-amount").html(a),updateBlueWalletInfo(e),$(".your-details .spc-content-inner .user-email").slideDown(),$(".your-details .spc-content-inner .login-email").slideDown(),$(".your-details .spc-content-inner #enter-password-block").slideDown()):($(".your-details .spc-content-inner .change-email").slideUp(),$(".your-details .spc-content-inner #userLoginForm").slideUp(),$(".your-details .spc-content-inner #updateUserData").slideDown())}function updateBlueWalletInfo(e){var t=e.blueWallet;if(0!=t||"India"==e.country){$(".offer-helper-block").removeClass("hide");var a=!1,i=!1,o="Your account contains "+e.currencySymbol;e.blueCash&&0!=e.blueCash.length&&"0"!==e.blueCash&&(o+=e.blueCash+" in Blue Cash ",a=!0),e.blueCredit&&0!=e.blueCredit.length&&"0"!==e.blueCredit&&(o+=a?"And "+e.currencySymbol+e.blueCredit+" in Blue Credit ":e.blueCredit+" in Blue Credit ",i=!0),e.blueFew&&0!=e.blueFew.length&&"0"!==e.blueFew&&(o+=a||i?"And "+e.currencySymbol+e.blueFew+" in Blue Few ":e.blueFew+" in Blue Few "),""!=t&&($(".your-order .offer-helper-block .blue-wallet .blue-wallet-info").html(o),$(".your-details .login-email .user-email .blue-wallet-info").html(o))}else $(".offer-helper-block").addClass("hide")}function spcLogin(e){var t=$("#userLoginForm .user-email span.email").text(),a=$("#passwordForm #password").val();return $.ajax({type:"GET",url:GLOBAL_CTX+"/singlepagecheckout/loginCustomer",async:!1,cache:!1,dataType:"json",data:"loginEmail="+t+"&loginPassword="+a+"&cartId="+e,success:function(e){getSpcAddressDetail(e.errorMessage)}}),!1}function getSpcAddressDetail(e){e&&0!==e.length?($(".your-details #enter-password-block .error").removeClass("hide"),$(".your-details #enter-password-block .error .v-msg").html(e),$(".spc-content-inner #updateUserData #show-email-2").removeClass("hide")):($(".spc-content-inner #updateUserData #show-email-2").addClass("hide"),$(".your-details #enter-password-block .error").addClass("hide"),$(".spc-content-inner .login-email").slideUp(),$(".spc-content-inner #enter-password-block").slide
52Up(),$(".spc-content-inner #updateUserData").slideDown())}function updateSpcShippingAddress(e){if($("#updateUserData").validationEngine(),$("#updateUserData").validationEngine("validate")){var t=$(".your-details #updateUserData #fullname").val(),a=$(".your-details #updateUserData .user-email .email").html(),i=$(".your-details #updateUserData #contactNumber").val(),o=$(".your-details #updateUserData #altContactNumber").val(),r=document.getElementById("countryId1_delivery");null==r&&(r=document.getElementById("countryId_delivery"));var s="";s="SELECT"==r.tagName?r.options[r.selectedIndex].value:$(".your-details #updateUserData #countryId1_delivery").val();var n=document.getElementById("stateId_delivery"),l=n.options[n.selectedIndex].text,d=$(".your-details #updateUserData #address").val(),c=$(".your-details #updateUserData #postcode_delivery").val(),u=$(".your-details #updateUserData #cityName_delivery").val();$("#blueWallet").is(":checked")?useBlueWallet=!0:useBlueWallet=!1;var p=$(".your-details #gift-msg-form #giftTo").val(),m=$(".your-details #gift-msg-form #giftFrom").val(),h=$(".your-details #gift-msg-form #giftMsg").val(),v="";$("#edit-gift-wrapper label input").is(":checked")&&(v="on"),$.ajax({type:"POST",url:GLOBAL_CTX+"/singlepagecheckout/updateShippingAddress",async:!1,cache:!1,dataType:"json",data:"cartId="+e+"&fullname="+t+"&contactNumber="+i+"&altContactNumber="+o+"&state="+l+"&customerCountry="+s+"&customerAddress="+d+"&customerPincode="+c+"&customerCity="+u+"&loginEmail="+a+"&addGiftMsg="+v+"&giftTo="+p+"&giftFrom="+m+"&giftMsg="+h,success:function(e){var t="";if(void 0!==e.showJpMilesOption&&1==e.showJpMilesOption?(void 0!==e.jpMilesCardNumber&&"-1"!=e.jpMilesCardNumber?($("#jp-miles .jp-miles #jp-miles-form #jp-miles-discountCode").val(e.jpMilesCardNumber),$(".offer-helper-block #jp-miles #lbl-jp-miles").prop("checked",!0),$(".offer-helper-block #jp-miles").addClass("show-content"),$(".offer-helper-block #jp-miles label i").switchClass("icon-ion-ios-circle-outline","icon-ion-ios-checkmark"),$("#jp-miles .jp-miles .error").addClass("hide"),void 0!==e.jpMilesPoints&&$("#jp-miles .jp-miles .success #jp-miles-point").html(e.jpMilesPoints),$("#jp-miles-discountCode").attr("readonly","readonly"),$("#jp-miles-form #jp-miles-toggle").val("Remove"),$("#jp-miles .jp-miles .success").removeClass("hide")):($("#jp-miles .jp-miles #jp-miles-form #jp-miles-discountCode").val(""),$(".offer-helper-block #jp-miles #lbl-jp-miles").prop("checked",!1),$(".offer-helper-block #jp-miles").removeClass("show-content"),$(".offer-helper-block #jp-miles label i").switchClass("icon-ion-ios-checkmark","icon-ion-ios-circle-outline"),$("#jp-miles .jp-miles .error").addClass("hide"),$("#jp-miles-discountCode").removeAttr("readonly"),$("#jp-miles-form #jp-miles-toggle").val("Apply"),$("#jp-miles .jp-miles .success").addClass("hide")),$("#jp-miles").removeClass("hide")):$("#jp-miles").addClass("hide"),void 0!==e.pinCodeError&&1==e.pinCodeError)t='<div class="msg-style-2 error"> <span class="icon-ion-android-alert"></span> <div class="v-msg"> Invalid Pincode</div> </div>',$(".spc-body .pincode-error").html(t),$(".spc-body .pincode-error").slideDown();else{$(".spc-body .error-wrapper").html(t),$(".spc-body .error-wrapper").slideUp(),void 0!==e.country&&"India"==e.country?($(".your-order .cart-body .offer-container .blue-wallet .WebRupee").switchClass("WebRupee-spc","WebRupee").html(e.currencySymbol),$(".your-order .cart-footer .blue-wallet-applied .WebRupee").switchClass("WebRupee-spc","WebRupee").html(e.currencySymbol)):($(".your-order .cart-body .offer-container .blue-wallet .WebRupee").switchClass("WebRupee","WebRupee-spc").html(e.currencySymbol),$(".your-order .cart-footer .blue-wallet-applied .WebRupee").switchClass("WebRupee","WebRupee-spc").html(e.currencySymbol)),updateSpcCartDetail(e),getSpcCartDetail(e),setSpcAddressHeader(e,a),updateBlueWalletInfo(e);var i=e.cartFinalPrice;void 0!==e.blueWallet&&"0"!=e.blueWallet&&(i=e.cartFinalPrice,void 0===e.isVeryFirstOrder&&($(".your-order .cart-body .offer-container #actual-blue-wallet").val(e.blueWallet),$(".offer-helper-block #blue-wallet").removeClass("hide").addClass("show-content"),$(".offer-helper-block #blue-wallet #blueWallet").prop("checked",!0),$(".offer-helper-block #blue-wallet label i").switchClass("icon-ion-ios-circle-outline","icon-ion-ios-checkmark"),i-=e.blueWallet),e.blueWallet&&0!=e.blueWallet.length&&"0"!==e.blueWallet&&void 0===e.isVeryFirstOrder?($(".your-order .cart-footer .blue-wallet-applied").removeClass("hide"),i<=0?($(".your-order .cart-footer .you-pay #getDiscountedPrice").html(0),$(".your-order .cart-body .offer-container .blue-wallet .blue-wallet-amount").html(e.cartFinalPrice),$(".your-order .cart-footer .blue-wallet-applied .blue-wallet").html(e.cartFinalPrice)):($(".your-order .cart-body .offer-container .blue-wallet .blue-wallet-amount").html(e.blueWallet.toLocaleStr
52ing()),$(".your-order .cart-footer .you-pay #getDiscountedPrice").html(i.toLocaleString()),$(".your-order .cart-footer .blue-wallet-applied .blue-wallet").html(e.blueWallet.toLocaleString()))):($(".your-order .cart-footer .blue-wallet-applied").slideUp(),$(".your-order .cart-footer .blue-wallet-applied .blue-wallet").html(e.blueWallet),$(".your-order .cart-footer .you-pay #getDiscountedPrice").html(i)),$(".your-order .heading .right .you-pay").html(i)),i<=0?($(".cart-footer .confirm-btn-wrapper").removeClass("hide"),$(".cart-footer #cart-continue-to-pay").addClass("hide"),$("section.payment-options").addClass("hide")):($(".cart-footer .confirm-btn-wrapper").addClass("hide"),$(".cart-footer #cart-continue-to-pay").removeClass("hide"),$("section.payment-options").removeClass("hide")),$(".your-details .spc-content .spc-content-inner > .content").slideUp(),$("#updateUserData button.btn span").show(),$("#updateUserData .ajax-loader").hide(),i<e.cartPriceWithoutDiscount?$(".your-order .cart-footer .you-pay .price-without-discount").removeClass("hide"):$(".your-order .cart-footer .you-pay .price-without-discount").addClass("hide")}}})}}function setPaymentDetail(e,t){var a=e.cartFinalPrice;void 0!==e.voucherValue&&(a+=e.voucherValue);var i='<span class="WebRupee-spc">'+e.currencySymbol+"</span>";void 0!==e.country&&"India"==e.country&&(i='<span class="WebRupee">'+e.currencySymbol+"</span> ");var o=!1;void 0!==e.isVeryFirstOrder&&1==e.isVeryFirstOrder&&(o=!0);var r=e.finalPriceToPay,s="<ul>";s+="<li>",s+="<div>Items Total</div>",s+="<div>"+i+a.toLocaleString()+"</div>",s+="</li>",1==t&&void 0!==e.blueWallet&&"0"!=e.blueWallet&&0==o&&(s+="<li>",s+='<div class="blue-wallet">Blue Wallet</div>',s+="<div>-"+i+e.blueWallet.toLocaleString()+"</div>",s+="</li>"),void 0!==e.voucherValue&&"0"!=e.voucherValue&&(s+="<li>",s+='<div class="dicount-voucher">Discount<span>(Via Voucher)</span></div>',s+="<div>-"+i+e.voucherValue.toLocaleString()+"</div>",s+="</li>"),void 0!==e.giftVoucher&&"0"!=e.giftVoucher&&(0==t&&void 0!==e.creditDebited&&"0"!=e.creditDebited&&(s+="<li>",s+='<div class="blue-wallet">Blue Wallet</div>',s+="<div>-"+i+e.creditDebited.toLocaleString()+"</div>",s+="</li>"),s+="<li>",s+='<div class="gift-voucher">Gift Voucher<span></span></div>',s+="<div>-"+i+e.giftVoucher.toLocaleString()+"</div>",s+="</li>"),s+='<li class="reward-point-tab hide">',s+='<div class="reward-point">
52Reward Points</div>',s+="<div>-"+i+'<span class="reward-amount"> '+e.rewardPoint+"</span></div>",s+="</li>",$(".payment-options .payment-option-wrapper .payment-details .paymnet-breakup").html(s),s="</ul>",s+='<div class="final-price">',s+="<div>You Pay</div>",s+="<div>",s+='<div class="new-price">'+i+'<span class="you-pay-net"> '+r.toLocaleString()+"</span></div>",e.cartFinalPrice<e.cartPriceWithoutDiscount&&(s+='<div class="old-price strike" >'+i+e.cartPriceWithoutDiscount.toLocaleString()+"</div>"),s+="</div>",s+="</div>",$(".payment-options .payment-option-wrapper .payment-details .paymnet-you-pay").html(s),r<=0?$("section.payment-options").addClass("disable-payment-option"):$("section.payment-options").removeClass("disable-payment-option"),$(".your-order .heading .right .you-pay").html(r.toLocaleString()),void 0!==e.country&&"India"==e.country?$(".your-order .heading .right .WebRupee-spc").switchClass("WebRupee-spc","WebRupee").html(e.currencySymbol):$(".your-order .heading .right .WebRupee").switchClass("WebRupee","WebRupee-spc").html(e.currencySymbol)}function updateSpcCityStateByPincode(){var e=document.getElementById("countryId_delivery");if("India"==(null==e?document.getElementById("countryId1_delivery").value:e.options[e.selectedIndex].text)){$(".spc-body .pincode-error").html(""),$(".spc-body .pincode-error").slideUp();var t=$("#postcode_delivery").val();$.ajax({type:"GET",url:GLOBAL_CTX+"/address/",async:!1,cache:!0,dataType:"json",data:"ajax=true&submitPincode=true&pincode="+t,success:function(e){e.city&&($("#cityName_delivery").val(e.city),$("#stateId_delivery").val(e.id_state-1))}})}}function updateSpcAddressFormByCountry(e){$("#countryId_delivery")[0];$("#edit-state-wrapper").children().remove(),$.ajax({type:"GET",url:GLOBAL_CTX+"/singlepagecheckout/address/states",data:"ajax=true&country="+$("#countryId_delivery").val(),async:!1,cache:!0,dataType:"json",success:function(e){setSpcStates(e)}})}function setSpcStates(e){var t=!1,a=e.states;for(var i in a){t=!0;break}var o='<label class="col-xs-3 control-label text-right" for="stateId_delivery">State</label>';if(o+='<div class="col-xs-5">',t){for(var i in o+='<select id="stateId_delivery" name="stateId" class="form-control-3 validate[required]" ><option value="">Select State</option>',a)o+='<option value="'+i+'">'+a[i].stateName+"</option>";o+="</select></div>",$("#updateUserData .state-list").html(o),$("#updateUserData .state-list").removeClass("hide")}else o+='<select id="stateId_delivery" name="stateId" class="form-control-3 validate[required]" ><option value="-1">NA</option></select></div>',$("#updateUserData .state-list").html(o),$("#updateUserData .state-list").addClass("hide")}function getSpcCartDetail(e){$(".spc-content-inner #updateUserData").slideUp(),$(".spc-body .your-details").addClass("completed"),$(".spc-body .your-details").removeClass("active-tab"),$(".spc-body .your-order").addClass("active-tab"),$(".spc-body .your-order .spc-content-inner > .content").slideDown(),e.cartFinalPrice<e.cartPriceWithoutDiscount&&$(".your-order .cart-footer .you-pay .price-without-discount").removeClass("hide")}function updateSpcQuantity(e,t,a){var i=e.options[e.selectedIndex].value;$(e).prop("disabled","disabled"),setTimeout(function(){$(e).removeAttr("disabled")},3e3),updateSpcCartItemQuantity(a,t,i),$(e).removeAttr("disabled")}function updateSpcCartItemQuantity(e,t,a){$(".formError").remove();$("#blueWallet").is(":checked"),$.ajax({type:"POST",url:GLOBAL_CTX+"/singlepagecheckout/updateQuantity",async:!1,cache:!1,dataType:"json",data:"cartItemId="+e+"&cartItemQuantity="+a+"&cartId="+t,success:function(e){if(void 0!==e.jpMilesPoints&&$("#jp-miles .jp-miles .success #jp-miles-point").html(e.jpMilesPoints),$(".spc-body .your-order .delivery-error").slideUp(),0==e.cartItemTotalCount)window.location.href=GLOBAL_CTX+"/jewellery.html";else{updateSpcCartDetail(e);var t=0;$("#blue-wallet input[type=checkbox]").is(":checked")&&0!=blueWallet&&void 0===e.isVeryFirstOrder&&(t=e.blueWallet),e.cartFinalPrice<=t?($(".cart-footer .confirm-btn-wrapper").removeClass("hide"),$(".cart-footer #cart-continue-to-pay").addClass("hide"),$("section.payment-options").addClass("hide")):($(".cart-footer .confirm-btn-wrapper").addClass("hide"),$(".cart-footer #cart-continue-to-pay").removeClass("hide"),$("section.payment-options").removeClass("hide"))}}})}function toggleVoucherCode(e,t){var a=document.getElementById("discountCode").value,i=$("#voucher-form button.btn > span").text();i="Apply"==i?"true":"false";var o=$(".your-details #updateUserData .user-email .email").html();$.ajax({type:"POST",url:GLOBAL_CTX+"/singlepagecheckout/toggleVoucherCode",async:!1,cache:!1,dataType:"json",data:"discountCode="+a+"&cartId="+t+"&useVoucherCode="+i+"&loginEmail="+o,success:function(t){handleVoucherCode(e,t,i)}})}function handleVoucherCode(e,t,a){if(0==t.isVoucherCodeError){var i=!1;$("#jp-miles input[type=checkbox]").is(":checked")&&(i=!0),i&&($("#jp-miles label").removeClass("jpm-applied"),$("#jp-miles .jp-miles .error").addClass("hide"),$("#jp-miles .jp-miles .success").addClass("hide"),$("#jp-miles-form #jp-miles-toggle").val("Apply"),$("#jp-miles-discountCode").removeAttr("readonly"),$("#jp-miles .jp-miles #jp-miles-form #jp-miles-discountCode").val(""),$(".offer-helper-block #jp-miles #lbl-jp-miles").prop("checked",!1),$(".offer-helper-block #jp-miles").removeClass("show-content"),$(".offer-helper-block #jp-miles label i").switchClass("icon-ion-ios-checkmark","icon-ion-ios-circle-outline")),$("#blue-wallet input[type=checkbox]").is(":checked")?useBlueWallet=!0:useBlueWallet=!1;var o=0,r=0;(o=useBlueWallet?t.cartFinalPrice-t.blueWallet:t.cartFinalPrice)<=0?(r=t.cartFinalPrice,$(".your-order .heading .right .you-pay").html(0),$(".your-order .cart-footer .you-pay #getDiscountedPrice").html(0)):(r=t.blueWallet,$(".your-order .heading .right .you-pay").html(o.toLocaleStr
52ing()),$(".your-order .cart-footer .you-pay #getDiscountedPrice").html(o.toLocaleString())),$(".your-order .cart-body .offer-container .blue-wallet .blue-wallet-amount").html(r),$(".your-order .cart-footer .blue-wallet-applied .blue-wallet").html(r),"true"==a&&0==t.isVoucherCodeError&&1==t.voucherApplied&&t.voucherValue&&"0"!==t.voucherValue?($(".your-order .cart-body #voucher-code label").addClass("voucher-applied"),$("#discountCode").attr("readonly","readonly"),$("#have-discount").attr("readonly","readonly"),$("#voucher-form button.btn > span").text("Remove"),$(".your-order .cart-footer .voucher-code .voucher-value").html(t.voucherValue),$(".your-order .cart-footer .voucher-code").removeClass("hide"),$(".your-order .cart-body .offer-helper-block .voucher .error").addClass("hide").fadeOut(),setTimeout(function(){$(".your-order .cart-body .offer-helper-block .voucher .success").removeClass("hide")},500)):"false"==a&&0==t.isVoucherCodeError&&1==t.voucherApplied&&($("#discountCode").removeAttr("readonly"),$("#have-discount").removeAttr("readonly"),$(".your-order .cart-body #voucher-code label").removeClass("voucher-applied"),$("#voucher-form button.btn > span").text("Apply"),$(".your-order .cart-body .offer-helper-block .voucher .success").addClass("hide"),$(".your-order .cart-footer .voucher-code").addClass("hide"),$(".your-order .cart-footer .voucher-code .voucher-value").html(t.voucherValue)),o<t.cartPriceWithoutDiscount?$(".your-order .cart-footer .you-pay .price-without-discount").removeClass("hide"):$(".your-order .cart-footer .you-pay .price-without-discount").addClass("hide")}else $(".your-order .cart-body .offer-helper-block .voucher .error").fadeOut().fadeIn()}function toggleJpMilesCode(e,t){var a=document.getElementById("jp-miles-discountCode").value,i=$("#jp-miles-form #jp-miles-toggle").val();i="Apply"==i?"true":"false";var o=$(".your-details #updateUserData .user-email .email").html();$.ajax({type:"POST",url:GLOBAL_CTX+"/singlepagecheckout/toggleJpMilesPoint",async:!1,cache:!1,dataType:"json",data:"jpmNumber="+a+"&cartId="+t+"&useJpMiles="+i+"&loginEmail="+o,success:function(e,t){setJpMilesInfo(e,i)}})}function setJpMilesInfo(e,t){if("true"==t)if(void 0!==e.isJpmNumberError&&0==e.isJpmNumberError){var a=!1;$("#voucher-code input[type=checkbox]").is(":checked")&&(a=!0),a&&($("#discountCode").removeAttr("readonly"),$("#have-discount").removeAttr("readonly"),$(".your-order .cart-body #voucher-code label").removeClass("voucher-applied"),$("#voucher-form button.btn > span").text("Apply"),$(".your-order .cart-body .offer-helper-block .voucher .success").addClass("hide"),$(".your-order .cart-body .offer-helper-block .voucher .error").addClass("hide"),$(".your-order .cart-footer .voucher-code").addClass("hide"),$(".your-order .cart-footer .voucher-code .voucher-value").val(""),$(".offer-helper-block #voucher-code #voucher #discountCode").val(""),$(".offer-helper-block #voucher-code #have-discount").prop("checked",!1),$(".offer-helper-block #voucher-code").removeClass("show-content"),$(".offer-helper-block #voucher-code label i").switchClass("icon-ion-ios-checkmark","icon-ion-ios-circle-outline")),$("#jp-miles label").addClass("jpm-applied"),$("#jp-miles .jp-miles .error").addClass("hide"),void 0!==e.jpMilesPoints&&$("#jp-miles .jp-miles .success #jp-miles-point").html(e.jpMilesPoints),$("#jp-miles-discountCode").attr("readonly","readonly"),$("#jp-miles-form #jp-miles-toggle").val("Remove"),$("#jp-miles .jp-miles .success").removeClass("hide");$(".your-order .cart-footer .you-pay #getDiscountedPrice").html(),$(".your-order .cart-footer .you-pay #getActualPrice").html();var i=!1;$("#blue-wallet input[type=checkbox]").is(":checked")&&(i=!0);var o=e.cartFinalPrice;if(i){var r=$(".your-order .cart-footer .blue-wallet-applied .blue-wallet").html(),s=$(".your-order .cart-body .offer-container #actual-blue-wallet").val();(o-=parseFloat(s.replace(/,/g,"")))<=0?(o=0,r=parseFloat(cartPrice.replace(/,/g,""))):r=s,$(".your-order .cart-footer .blue-wallet-applied .blue-wallet").html(r.toLocaleString()),"0"==o?($(".cart-footer .confirm-btn-wrapper").removeClass("hide"),$(".cart-footer #cart-continue-to-pay").addClass("hide"),$("section.payment-options").addClass("hide")):($(".cart-footer .confirm-btn-wrapper").addClass("hide"),$(".cart-footer #cart-continue-to-pay").removeClass("hide"),$("section.payment-options").removeClass("hide")),o<e.cartPriceWithoutDiscount?$(".your-order .cart-footer .you-pay .price-without-discount").removeClass("hide"):$(".your-order .cart-footer .you-pay .price-without-discount").addClass("hide")}
52$(".your-order .heading .right .you-pay").html(o.toLocaleString()),$(".your-order .cart-footer .you-pay #getDiscountedPrice").html(o.toLocaleString())}else{var n="Error in redemtion";void 0!==e.isJpmNumberError&&void 0!==e.jpMilesError&&(n=e.jpMilesError,$("#jp-miles .jp-miles .error #jp-miles-error").html(n),$("#jp-miles .jp-miles .success").addClass("hide"),$("#jp-miles .jp-miles .error").removeClass("hide"))}else if(void 0!==e.isJpmNumberError&&0==e.isJpmNumberError)$("#jp-miles .jp-miles .error").addClass("hide"),$("#jp-miles .jp-miles .success").addClass("hide"),$("#jp-miles-form #jp-miles-toggle").val("Apply"),$("#jp-miles-discountCode").removeAttr("readonly"),$("#jp-miles .jp-miles #jp-miles-form #jp-miles-discountCode").val(""),$("#jp-miles label").removeClass("jpm-applied");else{n="Error in remove";$("#jp-miles .jp-miles .error #jp-miles-error").html(n),$("#jp-miles .jp-miles .success").addClass("hide"),$("#jp-miles .jp-miles .error").removeClass("hide")}}function getPaymentOptions(e,t,a){clearGiftCardField();var i=$(".your-details #updateUserData #login-email").val();null==e&&(e="jewellery");var o=!1,r="false";r=!!$("#blueWallet").is(":checked"),$.ajax({type:"GET",url:GLOBAL_CTX+"/singlepagecheckout/getPaymentDetail",async:!1,cache:!1,dataType:"json",data:"loginEmail="+i+"&cartId="+a+"&useBlueWallet="+r,success:function(e){var t="";void 0!==e.isPrePaidCarrierAvailable&&0==e.isPrePaidCarrierAvailable?(t='<p><span class="icon"></span>'+e.prepaidErrorStr+"</p>",$(".spc-body .your-order .delivery-error").html(t),$(".spc-body .your-order .delivery-error").slideDown(),o=!0):void 0!==e.pinCodeError&&1==e.pinCodeError?(t='<p><span class="icon"></span> Invalid Pincode </p>',$(".spc-body .your-order .delivery-error").html(t),$(".spc-body .your-order .delivery-error").slideDown(),o=!0):(o=!1,$(".spc-body .your-order .delivery-error").html(t),$(".spc-body .your-order .delivery-error").slideUp(),setPaymentDetail(e,r),$(".cart-footer button.btn span").show(),$(".cart-footer .ajax-loader").hide(),void 0!==e.country&&"India"==e.country?($(".payment-option-title ul li").removeClass("selected"),$(".indian-payment-form").children().removeClass("selected"),$(".payment-option-title ul li.credit-card-tab").addClass("selected"),$(".indian-payment-form #creditcard-content").addClass("selected"),void 0!==e.rewardPoint&&"0"!=e.rewardPoint&&e.cartFinalPrice==e.rewardPoint?($(".payment-option-title .reward-point-tab").addClass("selected"),$(".payment-option-title ul li.gc").removeClass("hide")):void 0!==e.rewardPoint&&e.rewardPoint>=0?($(".payment-option-form #spc-finalMessageDiv #spc-amountRedeemed").html(e.rewardPoint.toLocaleString()),$(".payment-option-form #spc-finalMessageDiv").slideDown(),$(".payment-option-form #rewardPointsFinalForm #ContinuePaymentDiv").slideDown(),$(".payment-option-form  #cardDetailsDiv").slideUp()):($(".payment-option-form #spc-finalMessageDiv").slideUp(),$(".payment-option-form #spc-finalMessageDiv #spc-amountRedeemed").html("0"),$(".payment-option-form #rewardPointsFinalForm #ContinuePaymentDiv").slideUp(),$(".payment-option-form  #cardDetailsDiv").slideDown()),void 0!==e.rewardPoint&&"0"!=e.rewardPoint&&($(".payment-option-wrapper .payment-details .paymnet-breakup .reward-point-tab .reward-amount").html(e.rewardPoint.toLocaleString()),$(".paymnet-breakup .reward-point-tab").removeClass("hide")),1==e.isEmiApplicable?$(".payment-option-wrapper .payment-option-title .emi-tab").removeClass("hide"):$(".payment-option-wrapper .payment-option-title .emi-tab").addClass("hide"),1==e.hasGoldCoin?$(".payment-option-wrapper .payment-option-title .reward-point-tab").addClass("hide"):$(".payment-option-wrapper .payment-option-title .reward-point-tab").removeClass("hide"),void 0!==e.isPostPaidCarrierAvailable&&0==e.isPostPaidCarrierAvailable?($(".payment-options #cashondelivery .cod-carrier-error").removeClass("hide"),$(".payment-options #cashondelivery .cod-carrier-error .spc-cod-error").html(e.codErrorStr),$(".payment-options #cashondelivery .cod-error").addClass("hide"),$(".payment-options #cashondelivery .net-banking").addClass("hide")):($(".payment-options #cashondelivery .cod-carrier-error").addClass("hide"),$(".payment-options #cashondelivery .cod-error").removeClass("hide"),$(".payment-options #cashondelivery .net-banking").removeClass("hide"),void 0!==e.isBluestoneCarrier_checkout&&0==e.isBluestoneCarrier_checkout?$(".payment-options #cashondelivery .nopad
52ding").addClass("hide"):$(".payment-options #cashondelivery .nopadding").removeClass("hide"),void 0!==e.hasSolitaire&&e.hasSolitaire?($(".payment-options #cashondelivery .net-banking").addClass("hide"),$(".payment-options #cashondelivery .cod-error").removeClass("hide")):($(".payment-options #cashondelivery .net-banking").removeClass("hide"),$(".payment-options #cashondelivery .cod-error").addClass("hide")))):($(".payment-option-title ul li.credit-card-tab").removeClass("selected"),$(".payment-option-title ul li.selected").siblings().addClass("hide"),$(".indian-payment-form").children().removeClass("selected")))}}),0==o&&($(".spc-body .your-order .spc-content-inner > .content").slideUp(),$(".spc-body .your-order").removeClass("active-tab"),$(".spc-body .your-order").addClass("completed"),$(".spc-body .payment-options").addClass("active-tab"),$(".spc-body .payment-options .spc-content-inner > .content").slideDown())}function toggleGiftCard(e,t){if($("#egift-card-form .gc-apply .gc-err").addClass("hide"),$("#egift-card-form").validationEngine(),0==$("#egift-card-form").validationEngine("validate"))return!1;$("#add-more-btn-div").addClass("hide");var a=0;null!=$(".giftcard-1 #giftCardNumber-1").val()&&""!=$(".giftcard-1 #giftCardNumber-1").val()&&(a++,$(".gc-info .gc-succ-1 .gift-card-no").html($(".giftcard-1 #giftCardNumber-1").val())),null!=$(".giftcard-2 #giftCardNumber-2").val()&&""!=$(".giftcard-2 #giftCardNumber-2").val()&&(a++,$(".gc-info .gc-succ-2 .gift-card-no").html($(".giftcard-2 #giftCardNumber-2").val())),null!=$(".giftcard-3 #giftCardNumber-3").val()&&""!=$(".giftcard-3 #giftCardNumber-3").val()&&(a++,$(".gc-info .gc-succ-3 .gift-card-no").html($(".giftcard-3 #giftCardNumber-3").val()));var i="giftCardNumber1="+$(".giftcard-1 #giftCardNumber-1").val()+"&giftCardPin1="+$(".giftcard-1 #giftCardPin-1").val();i+="&giftCardNumber2="+$(".giftcard-2 #giftCardNumber-2").val()+"&giftCardPin2="+$(".giftcard-2 #giftCardPin-2").val()+"&giftCardNumber3="+$(".giftcard-3 #giftCardNumber-3").val()+"&giftCardPin3="+$(".giftcard-3 #giftCardPin-3").val();var o=!1;$("#blue-wallet input[type=checkbox]").is(":checked")&&(o=!0),$.ajax({type:"POST",url:GLOBAL_CTX+"/singlepagecheckout/getGiftCardDetail",async:!1,cache:!1,dataType:"json",data:i+"&cartId="+e+"&giftCardsCount="+a+"&useBlueWallet="+o,success:function(e){$(".gc-info .success").removeClass("hide"),isAllCardAppliedValid(e,a)&&void 0!==e.giftCardAmount&&0!=e.giftCardAmount?($("#egift-card-form .gc-apply .gc-err").addClass("hide"),setPaymentDetail(e,o),void 0!==e.rewardPoint&&"0"!=e.rewardPoint&&($(".payment-option-wrapper .payment-details .paymnet-breakup .reward-point-tab .reward-amount").html(e.rewardPoint.toLocaleString()),$(".paymnet-breakup .reward-point-tab").removeClass("hide")),$(".gc-info .gc-succ .gc-remain").html(e.finalPriceToPay),$(".gc-info .gc-succ-remain").removeClass("hide"),$(".your-order .heading .right .you-pay").html(e.finalPriceToPay),$(".gc-info").removeClass("hide"),$(".gc-info .remain-info").removeClass("hide"),e.finalPriceToPay>0?$("#egift-card-form .gc-apply #gcPlaceOrder").addClass("hidden"):($(".payment-option-title ul li.selected").siblings().addClass("hide"),$("#egift-card-form .gc-apply #gcPlaceOrder").removeClass("hidden"),$("#egift-card-form .gc-apply #gcButton").addClass("hidden"),$(".gc-info .remain-info").addClass("hide")),$("#egift-card-form .gc-apply #gcButton").addClass("hidden"),$(".gc-info .success").removeClass("hide"),e.giftCardAmountUsed1>0&&($(".gc-info .gc-succ-1 .gc-used").html(e.giftCardAmountUsed1),$(".gc-info .gc-succ-1").removeClass("hide"),$(".gc-info .gc-bal-1 .card-value").html(e.giftCardAmountRemain1),$(".gc-info .gc-bal-1").removeClass("hide"),$(".giftcard-1").addClass("hide")),e.giftCardAmountUsed2>0&&($(".gc-info .gc-succ-2 .gc-used").html(e.giftCardAmountUsed2),$(".gc-info .gc-succ-2").removeClass("hide"),$(".gc-info .gc-bal-2 .card-value").html(e.giftCardAmountRemain2),$(".gc-info .gc-bal-2").removeClass("hide"),$(".giftcard-2").addClass("hide")),e.giftCardAmountUsed3>0&&($(".gc-info .gc-succ-3 .gc-used").html(e.giftCardAmountUsed3),$(".gc-info .gc-succ-3").removeClass("hide"),$(".gc-info .gc-bal-3 .card-value").html(e.giftCardAmountRemain3),$(".gc-info .gc-bal-3").removeClass("hide"),$(".giftcard-3").addClass("hide")),(1==a||2==a)&&e.finalPriceToPay>0&&$("#add-more-btn-div").removeClass("hide"),$(".form-group .gc-apply").addClass("hide")):1==t&&0==a?($("#egift-card-form .gc-apply #gcPlaceOrder").addClass("hidden"),setPaymentDetail(e,o),$(".giftcard-1").removeClass("hide"),$("#egift-card-form .gc-apply #gcButton").removeClass("hidden"),$(".gc-info .gc-bal-1").addClass("hide"),$(".gc-info .remain-info").addClass("hide"),$(".gc-info .gc-succ-remain").addClass("hide"),$(".gc-info .gc-succ-remain .gc-remain").html(),$(".your-order .heading .right .you-pay").html(e.finalPriceToPay)):($("#egift-card-form .gc-apply .gc-err").removeClass("hide"),$("#egift-card-form .gc-apply .gc-err .gc-error-msg").html(e.giftCardErrorMessage)),1==e.isEmiApplicable&&1==t?$(".payment-option-wrapper .payment-option-title .emi-tab").removeClass("hide"):$(".payment-option-wrapper .payment-option-title .emi-tab").addClass("hide"),1==e.hasGoldCoin?$(".payment-option-wrapper .payment-option-title .reward-point-tab").addClass("hide"):void 0!==e.rewardPoint&&"0"!=e.rewardPoint&&($(".payment-option-wrapper .payment-details .paymnet-breakup .reward-point-tab .reward-amount").html(e.rewardPoint.toLocaleStr
52ing()),$(".payment-option-wrapper .payment-option-title .reward-point-tab").removeClass("hide"),$(".paymnet-breakup .reward-point-tab").removeClass("hide"))}})}function isAllCardAppliedValid(e,t){var a=0,i=!1;return e.giftCardAmountUsed1>0&&a++,e.giftCardAmountUsed2>0?a++:($(".giftcard-2 #giftCardNumber-2").val(""),$(".giftcard-2 #giftCardPin-2").val(""),$("#egift-card-form .giftcard-2").addClass("hide")),e.giftCardAmountUsed3>0?a++:($(".giftcard-3 #giftCardNumber-3").val(""),$(".giftcard-3 #giftCardPin-3").val(""),$("#egift-card-form .giftcard-3").addClass("hide")),i=t==a,t>1&&0==a&&($("#add-more-btn-div").removeClass("hide"),$("#egift-card-form .gc-apply #gcPlaceOrder").addClass("hidden"),$("#egift-card-form .gc-apply #gcButton").addClass("hidden")),i}function removeGiftCard(e,t){$(".gc-info .gc-bal-1").addClass("hide"),$(".gc-info .gc-bal-1 .card-value").html(),$(".gc-info .gc-succ-1").addClass("hide"),$(".gc-info .gc-succ-1 .gift-card-no").html(),$(".gc-info .gc-bal-2").addClass("hide"),$(".gc-info .gc-bal-2 .card-value").html(),$(".gc-info .gc-succ-2").addClass("hide"),$(".gc-info .gc-succ-2 .gift-card-no").html(),$(".gc-info .gc-bal-3").addClass("hide"),$(".gc-info .gc-bal-3 .card-value").html(),$(".gc-info .gc-succ-3").addClass("hide"),$(".gc-info .gc-succ-3 .gift-card-no").html(),$("#egift-card-form .giftcard-"+t).addClass("hide"),$(".giftcard-"+t+" #giftCardNumber-"+t).val(""),$(".giftcard-"+t+" #giftCardPin-"+t).val(""),toggleGiftCard(e,!0)}function clearGiftCardField(){$(".gc-info .gc-bal-1").addClass("hide"),$(".gc-info .gc-bal-1 .card-value").html(),$(".gc-info .gc-succ-1").addClass("hide"),$(".gc-info .gc-succ-1 .gift-card-no").html(),$(".gc-info .gc-bal-2").addClass("hide"),$(".gc-info .gc-bal-2 .card-value").html(),$(".gc-info .gc-succ-2").addClass("hide"),$(".gc-info .gc-succ-2 .gift-card-no").html(),$(".gc-info .gc-bal-3").addClass("hide"),$(".gc-info .gc-bal-3 .card-value").html(),$(".gc-info .gc-succ-3").addClass("hide"),$(".gc-info .gc-succ-3 .gift-card-no").html(),$(".giftcard-1 #giftCardNumber-1").val(""),$(".giftcard-1 #giftCardPin-1").val(""),$(".giftcard-2 #giftCardNumber-2").val(""),$(".giftcard-2 #giftCardPin-2").val(""),$(".giftcard-3 #giftCardNumber-3").val(""),$(".giftcard-3 #giftCardPin-3").val(""),$(".giftcard-1").removeClass("hide"),$(".giftcard-2").addClass("hide"),$(".giftcard-2").addClass("hide"),$(".gc-succ-remain").addClass("hide"),$(".gc-info .gc-succ-remain .gc-remain").html(),$("#egift-card-form .gc-apply #gcPlaceOrder").addClass("hidden"),$("#egift-card-form .gc-apply #gcButton").removeClass("hidden")}function handleGiftCardPayment(e,t){var a="giftCardNumber1="+$(".giftcard-1 #giftCardNumber-1").val()+"&giftCardPin1="+$(".giftcard-1 #giftCardPin-1").val();handleBsCashPayment(t,a+="&giftCardNumber2="+$(".giftcard-2 #giftCardNumber-2").val()+"&giftCardPin2="+$(".giftcard-2 #giftCardPin-2").val()+"&giftCardNumber3="+$(".giftcard-3 #giftCardNumber-3").val()+"&giftCardPin3="+$(".giftcard-3 #giftCardPin-3").val())}function handleMaxGetPayment(e){handleBsCashPayment(e,getGiftCardDetail())}function confirmOrder(e){var t="false";$("#blue-wallet input[type=checkbox]").is(":checked")&&(t="true"),url="useBlueWallet="+t,handleBsCashPayment(e,url)}function handleBsCashPayment(e,t){$.ajax({type:"POST",url:GLOBAL_CTX+"/singlepagecheckout/bsCashPayment",async:!1,cache:!1,dataType:"json",data:t+"&cartId="+e,success:function(e){$("#bs-cash-success .bs-order").val(e.orderCode),$("#bs-cash-success").submit()}})}function addAnotherGiftCard(e){$(".giftcard-"+e).removeClass("hide"),$("#egift-card-form .gc-apply #gcButton").removeClass("hidden"),$("#egift-card-form .gc-apply").removeClass("hide"),$(".gc-info .success").addClass("hide"),$(".gc-info .success").addClass("hide"),$("#egift-card-form .gc-apply .gc-err").addClass("hide"),$("#egift-card-form #add-more-btn-div").addClass("hide"),"3"==e?$("#add-more-btn-div").addClass("hide"):$(".add-more-btn #add-more").data("id","3")}function sendSpcOTPForVerification(e){$.ajax({type:"POST",url:GLOBAL_CTX+"/cart/sendOtpForVerification/",async:!1,cache:!1,dataType:"json",data:"cartId="+e,success:function(e){e.hasError?($("#cash-on-delivery-content-otp").hide(),$("#cash-on-delivery-content").show()):($("#otp-verification").hide(),$("#cash-on-delivery-content-otp").show())}})}function resendSpcOTPForVerification(e){$.ajax({type:"POST",url:GLOBAL_CTX+"/cart/sendOtpForVerification/",async:!1,cache:!1,dataType:"json",data:"cartId="+e,success:function(e){e.hasError?($("#cash-on-delivery-content-otp").hide(),$("#cash-on-delivery-content").show()):($(".sent-otp-code").show(),$(".otp-code-expired").hide(),$(".invali
52d-otp-code").hide(),$(".EnterVerificationCode .form-control").val(""))}})}function spcOtpVerificationForCOD(e){e.preventDefault();var t=$("#otp-code").val(),a=$("#cartId").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/cart/otpVerification/",async:!1,cache:!1,dataType:"json",data:"otp="+t+"&cartId="+a,success:function(e){e.hasError?e.expired?($(".sent-otp-code").hide(),$(".otp-code-expired").show(),$(".invalid-otp-code").hide()):(otpCounter>=2?($("#cash-on-delivery-content-otp").hide(),$("#cash-on-delivery-content").show()):($(".invalid-otp-code").show(),$(".sent-otp-code").hide(),$(".EnterVerificationCode .form-control").val("")),otpCounter++):initSinglePagePaymet(a)}})}function getGiftCardDetail(){var e="",t=0;return null!=$(".giftcard-1 #giftCardNumber-1").val()&&""!=$(".giftcard-1 #giftCardNumber-1").val()&&""!=$(".gc-info .gc-succ-1 .gc-used").html()&&(e="&giftCardNumber1="+$(".giftcard-1 #giftCardNumber-1").val()+"&giftCardPin1="+$(".giftcard-1 #giftCardPin-1").val(),t++),null!=$(".giftcard-2 #giftCardNumber-2").val()&&""!=$(".giftcard-2 #giftCardNumber-2").val()&&""!=$(".gc-info .gc-succ-2 .gc-used").html()&&(e+="&giftCardNumber2="+$(".giftcard-2 #giftCardNumber-2").val()+"&giftCardPin2="+$(".giftcard-2 #giftCardPin-2").val(),t++),null!=$(".giftcard-3 #giftCardNumber-3").val()&&""!=$(".giftcard-3 #giftCardNumber-3").val()&&""!=$(".gc-info .gc-succ-3 .gc-used").html()&&(e+="&giftCardNumber3="+$(".giftcard-3 #giftCardNumber-3").val()+"&giftCardPin3="+$(".giftcard-3 #giftCardPin-3").val(),t++),0!=t&&(e+="&giftCardsCount="+t+"&useQwikcilverGiftCards=apply"),e}function initSinglePagePaymet(e){var t="",a=$(".payment-option-form .selected > form").attr("name");if("cashondelivery"==a)$(".payment-option-form .selected >form input[name=instrumentType]").val(a),t="instrumentType="+a;else{var i=$(".payment-option-form .selected .service_provider_radio").filter(":checked").val(),o=$(".payment-option-form .selected #transfer-bank")[0],r="default";if(o&&(r=o.options[o.selectedIndex].value),!(i||r&&"default"!=r))return void alert("Please select an option");var s="";if(r&&(s=r),i&&(s=i),$(".payment-option-form .selected > form input[name=instrumentType]").val(a),"netbanking"==a||"rewardpoints"==a)$(".payment-option-form .selected > form input[name=issuingAuthority]").val(s),t="instrumentType="+a+"&issuingAuthority="+s;else if("emi"==a){var n=s.split("-");$(".payment-option-form .selected > form input[name=instrumentType]").val(n[0]),$(".payment-option-form .selected > form input[name=issuingAuthority]").val(n[1]),t="instrumentType="+n[0]+"&issuingAuthority="+n[1]}else $(".payment-option-form .selected > form input[name=cardPaymentNetwork]").val(s),t="instrumentType="+a+"&cardPaymentNetwork="+s}$("#blue-wallet input[type=checkbox]").is(":checked")&&(t+="&useBlueWallet="+!0),t+=getGiftCardDetail();var l=$(".your-details #gift-msg-form #giftTo").val(),d=$(".your-details #gift-msg-form #giftFrom").val(),c=$(".your-details #gift-msg-form #giftMsg").val(),u="";$("#edit-gift-wrapper label input").is(":checked")&&(u="on"),t+="&giftTo="+l+"&giftFrom="+d+"&giftMsg="+c+"&addGiftMsg="+u,$.ajax({type:"POST",url:GLOBAL_CTX+"/singlepagecheckout/initPaymentTransaction",async:!1,cache:!1,dataType:"json",data:t+"&cartId="+e,success:function(t){"cashondelivery"==a?paymentPostPaidFormSubmission(t,e,a):paymentPrePaidFormSubmission(t,e)}})}function paymentPostPaidFormSubmission(e,t,a){var i=e.bluestoneTxnId,o=$(".your-details #gift-msg-form #giftTo").val(),r=$(".your-details #gift-msg-form #giftFrom").val(),s=$(".your-details #gift-msg-form #giftMsg").val(),n="";$("#edit-gift-wrapper label input").is(":checked")&&(n="on"),$(".payment-option-form .selected > form input[name=giftTo]").val(o),$(".payment-option-form .selected > form input[name=giftFrom]").val(r),$(".payment-option-form .selected > form input[name=giftMsg]").val(s),$(".payment-option-form .selected > form input[name=addGiftMsg]").val(n),$(".payment-option-form .selected > form input[name=instrumentType]").val(a),$(".payment-option-form .selected > form input[name=bluestoneTxnId]").val(i),$(".payment-option-form .selected > form input[name=cartId]").val(t),$(".payment-option-form .selected > form input[name=useBlueWallet]").val("true");var l=GLOBAL_CTX+"/singlepagecheckout/postPaidTransaction";$(".payment-option-form .selected > form").action=l,$('form[name="'+a+'"]').submit()}function paymentPrePaidFormSubmission(e,t){var a=e.bluestoneTxnId,i=GLOBAL_CTX+"/paymentrequest/"+a+"/"+t;$.ajax({type:"GET",url:i,dataType:"json",async:!1,cache:!1,success:function(e){try{e.hasError?$("#payment-message .description").html(e.data):($(".payment-options #paymentFormDiv").html(e.data),$("#paymentForm").submit())}catch(e){alert(e)}}})}function getRewardBalance(e){if($("#rewardpoints-1").validationEngine(),0==$("#rewardpoints-1").validationEngine("validate"))return!1;if($(".rewardpoints-content .row").hasClass("error"))return $("#balanceDiv, #otpDiv, #spc-finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),!1;$(".otherError").html(""),$(".cardError").html(""),$(".mobileError").html("");var t=$("#cardNumber").val(),a=$("#mobileNo").val(),i=$(".your-order .heading .you-pay").html();if("0"!=i&&(i=parseFloat(i.replace(/,/g,""))),""==t||""==a)return $("#balanceDiv, #otpDiv, #spc-finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),!1;$.ajax({type:"POST",url:GLOBAL_CTX+"/maxget/checkBalance",async:!1,cache:!1,dataType:"json",data:"cardNumber="+t+"&mobileNumber="+a+"&cartId="+e,success:function(e){if(e.hasError)return""!=e.errorMessage&&"undefined"!=e.errorMessage&&$(".otherError").html(getNotificationErrorHtml(e.errorMessage)),$("#balanceDiv, #otpDiv, #spc-finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),$("#cardDetail
52sDiv .btn, #otpDiv .btn").removeClass("gray"),$("#cardDetailsDiv .btn-check-balance, #balanceDiv .btn-get-otp").removeClass("btn-light-blue"),""!=e.cardError&&"undefined"!=e.cardError&&$(".cardError").html(getNotificationErrorHtml(e.cardError)),$("#balanceDiv, #otpDiv, #spc-finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),$("#cardDetailsDiv .btn, #otpDiv .btn").removeClass("gray"),$("#cardDetailsDiv .btn-check-balance, #balanceDiv .btn-get-otp").removeClass("btn-light-blue"),""!=e.mobileError&&"undefined"!=e.mobileError&&$(".mobileError").html(getNotificationErrorHtml(e.mobileError)),$("#balanceDiv, #otpDiv, #spc-finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),$("#cardDetailsDiv .btn, #otpDiv .btn").removeClass("gray"),$("#cardDetailsDiv .btn-check-balance, #balanceDiv .btn-get-otp").removeClass("btn-light-blue"),!0;e.amount>0?($("#amountAvailable").html(e.amount),$("#amountToRedeem").val(Math.min(e.amount,i)),$("#mobileNumberSpan").html(a),$("#balanceDiv").css("display","block"),$("#cardDetailsDiv .btn").attr("disabled","disabled"),$("#balanceDiv .btn").removeAttr("disabled"),$("#cardDetailsDiv .btn").addClass("gray"),$("#balanceDiv .btn, #balanceEmptyDiv .btn, #balanceEmptyDiv .btn").removeClass("gray"),$("#otpDiv, #spc-finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),$("#cardDetailsDiv .btn-check-balance").addClass("btn-light-blue"),$("#balanceDiv .btn-get-otp").removeClass("btn-light-blue")):$("#balanceEmptyDiv").css("display","block"),trackGA("BsUI","MaxGet","Get_Balance")}})}function spcGetOTP(e){if($("#rewardpoints-2").validationEngine(),0==$("#rewardpoints-2").validationEngine("validate"))return!1;if($(".rewardpoints-content .row").hasClass("error"))return $("#otpDiv, #spc-finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),!1;$(".otherError").html(""),$(".amountError").html("");var t=$("#cardNumber").val(),a=$("#mobileNo").val(),i=$("#amountToRedeem").val(),o=$(".your-order .heading .you-pay").html();"0"!=o&&(o=parseFloat(o.replace(/,/g,"")));var r=$("#amountAvailable").html();return parseInt(i,10)>parseInt(o,10)?($(".otherError").html(getNotificationErrorHtml("Amount to redeem is greater than final price.")),!1):parseInt(i,10)>parseInt(r,10)?($(".otherError").html(getNotificationErrorHtml("Amount to redeem is greater than available balance.")),!1):void $.ajax({type:"POST",url:GLOBAL_CTX+"/maxget/getOTP",async:!1,cache:!1,dataType:"json",data:"amount="+i+"&cardNumber="+t+"&mobileNumber="+a+"&invoiceAmount="+o+"&cartId="+e,success:function(e){if(e.hasError)return""!=e.errorMessage&&"undefined"!=e.errorMessage&&$(".otherError").html(getNotificationErrorHtml(e.errorMessage)),""!=e.amountError&&"undefined"!=e.amountError&&$(".amountError").html(getNotificationErrorHtml(e.amountError)),!0;$("#amountToRedeemSpan").html(i),$("#otpDiv").css("display","block"),$("#tokenNumber").val(e.tokenNumber),$("#isPartial").val(e.isPartial),$("#balanceDiv .btn").addClass("gray"),$("#balanceDiv .btn-get-otp").addClass("btn-light-blue"),$("#entry").val(e.entry),$("#balanceDiv .btn").attr("disabled","disabled");var t=$("#counter"),a=t.text();OTPCounterInterval=setInterval(function(){t.text(a),0==a&&($("#resend-otp-block span.information").hide(),$("#resend-otp-block a.change-link").removeClass("hidden"),clearInterval(OTPCounterInterval)),a-=1},1e3),trackGA("BsUI","MaxGet","Get_OTP")}})}function spcRedeemPoints(e){if($("#rewardpoints-31").validationEngine(),0==$("#rewardpoints-31").validationEngine("validate"))return!1;if($(".rewardpoints-content .row").hasClass("error"))return $("#balanceDiv, #otpDiv, #spc-finalMessageDiv, #ConfirmPaymentDiv, #ContinuePaymentDiv").hide(),!1;$(".otherError").html(""),$(".otpError").html("");var t=$("#otpValue").val(),a=$("#tokenNumber").val(),i=$("#isPartial").val(),o=$(".your-order .heading .you-pay").html();$.ajax({type:"POST",url:GLOBAL_CTX+"/maxget/redeemPoints",async:!1,cache:!1,dataType:"json",data:"otpCode="+t+"&tokenNumber="+a+"&cartId="+e,success:function(e){if(e.hasError)return $(".payment-option-form #spc-finalMessageDiv").slideUp(),""!=e.errorMessage&&"undefined"!=e.errorMessage&&$(".otherError").html(getNotificationErrorHtml(e.errorMessage)),""!=e.otpError&&"undefined"!=e.otpError&&$(".otpError").html(getNotificationErrorHtml(e.otpError)),!0;void 0!==e.amount&&0!=e.amount&&($(".payment-option-wrapper .payment-details .paymnet-breakup .reward-point-tab .reward-amount").html(e.amount.toLocaleStr
52ing()),$(".paymnet-breakup .reward-point-tab").removeClass("hide"));var t=$(".payment-options .payment-option-wrapper .payment-details .paymnet-you-pay .you-pay-net").html();t=(t=parseFloat(t.replace(/,/g,""))-e.amount)>0?t.toLocaleString():0,$(".your-order .heading .right .you-pay").html(t),$(".payment-options .payment-option-wrapper .payment-details .paymnet-you-pay .you-pay-net").html(t),parseFloat(o.replace(/,/g,""))>e.amount&&(i=!0),$("#spc-finalMessageDiv").css("display","block"),i?($("#ContinuePaymentDiv").css("display","block"),$("#rewardPointsEventId").val("applyMaxgetPoints")):($("#ConfirmPaymentDiv").css("display","block"),$("#rewardPointsEventId").val("bsCashPayment"),$(".payment-option-title ul li.selected").siblings().addClass("hide"),$(".payment-option-title ul li.gc").removeClass("hide")),$("#spc-programName").html(e.programName),$("#spc-amountRedeemed").html(e.amount),$("#spc-authCode").val(e.authCode),$("#amountRedeemed").val(e.amount),$("#spc-amountRedeemedFinal").val(e.amount),$("#otpDiv .btn").addClass("gray"),$("#otpDiv .btn").attr("disabled","disabled"),$("#balanceDiv, #otpDiv, #cardDetailsDiv").hide()}})}function spcCancelOffer(e,t){$(".otherError").html("");if(1==confirm("Reward points will not be applicable for this order. Are you sure you want to continue?")){var a=$(".paymnet-breakup .reward-point-tab .reward-amount").html();a=parseFloat(a.replace(/,/g,""));var i=$("#spc-authCode").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/maxget/cancel",async:!1,cache:!1,dataType:"json",data:"amount="+a+"&authCode="+i+"&cartId="+t,success:function(a){if(a.hasError)return $(".payment-option-form  #cardDetailsDiv").slideUp(),$(".payment-option-form #rewardPointsFinalForm #ContinuePaymentDiv").slideDown(),""!=a.errorMessage&&"undefined"!=a.errorMessage&&$(".otherError").html(getNotificationErrorHtml(a.errorMessage)),!0;$("#balanceDiv").css("display","none"),$("#cardDetailsDiv").css("display","none"),$("#transfer-bank-points").val("default"),$("#ConfirmPaymentDiv").css("display","none"),$("#ContinuePaymentDiv").css("display","none"),$("#spc-finalMessageDiv").css("display","none"),$("#otpDiv").css("display","none"),$("#transfer-bank-points option:first").attr("selected","selected"),$(".payment-option-form  #cardDetailsDiv #cardNumber").val(""),$(".payment-option-form  #cardDetailsDiv #mobileNo").val(""),$(".payment-option-form  #otpDiv #rewardpoints-31 #otpValue").val(""),getPaymentOptions("jewellery",e,t),$(".payment-option-form #rewardPointsFinalForm #ContinuePaymentDiv").slideUp(),$(".payment-option-form  #cardDetailsDiv").slideDown()}})}}function getOrderDetail(e){$.ajax({type:"GET",url:GLOBAL_CTX+"/singlepagecheckout/getCartDetail",async:!1,cache:!1,dataType:"json",data:"country=India&cartId="+e,success:function(e){updateOrderDetail(e)}})}function updateOrderDetail(e){var t=e.cartDetail,a=e.cartId,i=e.cartItemTotalCount;cartDetailJson=JSON.parse(t);var o="";for(var r in cartDetailJson){var s=JSON.parse(cartDetailJson[r]);o+=getCartItemDiv(s,a)}$(".your-order .heading .cartCount").html(i),$(".your-order .cart-body .bag-item").html(o),$(".spc-content-inner #updateUserData").slidUp(),$(".spc-body .your-details").addClass("completed"),$(".spc-body .your-details").removeClass("active-tab"),$(".spc-body .your-order").addClass("active-tab"),$(".spc-body .your-order .spc-content-inner > .content").slideDown(),$(".your-order .heading .WebRupee").html(e.cartFinalPrice),$(".your-order .cart-footer .you-pay #getActualPrice").html(e.cartPriceWithoutDiscount),$(".your-order .cart-footer .you-pay #getDiscountedPrice").html(e.cartFinalPrice),parseInt(e.cartFinalPrice)<parseInt(e.cartPriceWithoutDiscount)&&$(".your-order .cart-footer .you-pay .price-without-discount").removeClass("hide")}function getShoppingBagDetail(){if($(".shopping-bag-popup").is(":visible"))return $(".shopping-bag-popup").slideUp(),!1;$.ajax({type:"GET",url:GLOBAL_CTX+"/singlepagecheckout/getShoppingBag",async:!1,cache:!1,dataType:"json",data:"imgSize=50",success:function(e){showShoppingBagList(e)}})}function showShoppingBagList(e){var t=e.cartDetail;if(void 0!==t){var a=e.discount;cartDetailJson=JSON.parse(t);var i="",o='<span class="WebRupee-spc">'+e.currencySymbol+"</span>";
52for(var r in void 0!==e.country&&"India"==e.country&&(o='<span class="WebRupee">'+e.currencySymbol+"</span> "),cartDetailJson){i+=getShoppingBagItem(JSON.parse(cartDetailJson[r]),e,o)}$(".shopping-bag-popup #mCSB_1_container").html(i),$(".shopping-bag-popup .body").mCustomScrollbar(),setTimeout(function(){$(".shopping-bag-popup").slideDown()},50);var s='<div class="row"><div class="col-xs-8">You Pay</div>';if(s+='<div class="col-xs-4 nopadding"><span class="total-amt">'+o+e.cartFinalPrice.toLocaleString()+"</span>",e.cartFinalPrice<e.cartPriceWithoutDiscount&&(s+='<span class="strike">'+o+e.cartPriceWithoutDiscount.toLocaleString()+"</span>"),s+="</div></div>",$(".shopping-bag-popup .you-pay").html(s),"0"!=a){var n='<div class="row">';n+='<div class="col-xs-8">Discount</div> ',n+='<div class="col-xs-4">-'+o+a,n+="</div>",$(".shopping-bag-popup .footer .discounts-block").html(n)}}}function getShoppingBagItem(e,t,a){var i='<div class="row bag-item">';return i+='<div class="col-xs-3 image">',i+="<img src="+e.cartItemImageUrl+" alt="+e.cartItemName+' class="img-responsive"/>',i+="</div>",i+='<div class="col-xs-6 description">',i+='<div class="title">'+e.cartItemName+"</div>",void 0!==e.cartItemSize&&(i+='<div class="row">',i+='<div class="col-xs-4 nopadding-right"> Size </div>',i+='<div class="col-xs-8 nopadding-left">: '+e.cartItemSize+"</div>",i+="</div>"),i+='<div class="row">',i+='<div class="col-xs-4 nopadding-right">Qty</div>',i+='<div class="col-xs-8 nopadding-left">: '+e.cartItemQuantity+"</div>",i+="</div>",i+="</div>",i+='<div class="col-xs-3 price">',i+='<div class="row item-price">',i+=a+e.cartItemTotalPrice.toLocaleString(),i+="</div>",parseInt(e.cartItemTotalPrice)<parseInt(e.cartItemTotalPriceWithoutDiscount)&&(i+='<div class="row strike">',i+=a+e.cartItemTotalPriceWithoutDiscount.toLocaleString(),i+="</div>"),i+="</div>",i+="</div>"}function updateNumberOfDays(e,t,a){var o=$(e).val();for($(e).html(""),month=$(t).val(),year=$(a).val(),days=daysInMonth(month,year),i=1;i<days+1;i++)$(e).append($("<option />").val(i).html(i));$(e).val(o),$(e).prepend("<option>Day</option>")}function daysInMonth(e,t){return new Date(t,e,0).getDate()}function appendShortDesc(){$("#short_desc_goldWt").html("("+$("#metalWeight").html()+" gram)");var e=$("td:contains('carats')"),t=0;$.each(e,function(e,a){var i=$(a).html().split(" ")[0];t=Number(t)+Number(i)}),Number(t)>0&&$("#short_desc_diamondCt").html(" with Diamonds&nbsp;("+t.toFixed(4)+" Ct)"),document.getElementById("preSetSolitaire-details")&&$("#short_desc_preSetSolitaireCt").html(" and Solitaire&nbsp;("+$("#preSetSolitaireCarat").html()+" Ct)")}function showHideSameDayDeliveryMessage(e){if(1==e.sameDayDelivery||"true"==e.sameDayDelivery)$("#ringselect").length>0&&$("#same-day-delivery-top-div").addClass("full-width"),$("#same-day-delivery-top-div").fadeIn(0),$("#normal-delivery").fadeOut(0),$("#same-day-delivery").fadeIn(0),$(".pr-highligh-box-wrapper").addClass("same-day-delivery"),$(".pr-highligh-box-wrapper").removeClass("normal-delivery"),$(".making-charges-old-ndd").addClass("line-through"),$(".offer-wrapper-ndd").addClass("offer-wrapper"),$(".offer-wrapper-ndd").show(0),$(".our_price_display_ndd").show(0),$(".mkg-chrg-only-ndd").show(0),$(".making-charges-new-ndd").show(0),$(".making-charges-old-ndd").show(0),$(".earlydeliverylink").hide(),$("#normal-delivery-size").hide(),$(".ndd-static-msg").show();else{$(".earlydeliverylink").show(),$("#same-day-delivery").fadeOut(0),$(".our_price_display_ndd").hide(0),$(".mkg-chrg-only-ndd").hide(0),$(".making-charges-new-ndd").hide(0),$(".offer-wrapper-ndd").removeClass("offer-wrapper"),$(".making-charges-old-ndd").removeClass("line-through"),$(".making-charges-old-ndd").show(0),1==e.sameDayDeliveryPincode&&($("#normal-delivery-pincode").fadeOut(0),$("#normal-delivery").fadeIn(0)),1!=e.isSameDayDeliveryCustomization&&"true"!=e.isSameDayDeliveryCustomization||($(".making-charges-old-ndd").addClass("line-through"),$(".offer-wrapper-ndd").addClass("offer-wrapper"),$(".mkg-chrg-only-ndd").show(0),$(".making-charges-new-ndd").show(0),$("#makingChargesNew_b-ndd").show(0),$(".making-charges-old-ndd").show(0),$(".our_price_display_ndd").show(0)),$(".pr-highligh-box-wrapper").removeClass("same-day-delivery"),$(".pr-highligh-box-wrapper").addClass("normal-delivery");var t=$("#product_type_name").val();"block"==$("#same-day-delivery-top-div").css("display")&&"block"==$("#normal-delivery-size").css("display")&&trackGA("BsUI","Viewed NDD link of specific size",t)}$("#sdd_cityFromIP").html(e.city),$("#sdd_expectedDeliveryDate").html(e.expectedDeliveryDate),$(".etd-date").html(e.expectedDeliveryDate),changeEDDToOccasionDate(
52)}function showHideSameDayDeliveryMessagePincode(e){1==e.sameDayDelivery||"true"==e.sameDayDelivery?($("#same-day-delivery-top-div").fadeIn(0),$("#normal-delivery").fadeOut(0),$("#normal-delivery-pincode").fadeOut(0),$("#same-day-delivery").fadeIn(0),$(".pr-highligh-box-wrapper").addClass("same-day-delivery"),$(".pr-highligh-box-wrapper").removeClass("normal-delivery"),$(".mkg-chrg-only-ndd").show(0),$(".earlydeliverylink").hide(),$("#normal-delivery-size").hide(),$(".ndd-static-msg").show()):1==e.sameDayDeliveryPincode?($("#same-day-delivery").fadeOut(0),$("#normal-delivery-pincode").fadeOut(0),$("#normal-delivery").fadeIn(0),$(".pr-highligh-box-wrapper").removeClass("same-day-delivery"),$(".pr-highligh-box-wrapper").addClass("normal-delivery")):(1!=e.isSameDayDeliveryCustomization&&"true"!=e.isSameDayDeliveryCustomization||($(".making-charges-old-ndd").addClass("line-through"),$(".mkg-chrg-only-ndd").show(0),$(".making-charges-new-ndd").show(0),$(".making-charges-old-ndd").show(0)),$("#same-day-delivery").fadeOut(0),$("#normal-delivery").fadeOut(0),$("#normal-delivery-pincode").fadeIn(0),$(".pr-highligh-box-wrapper").addClass("same-day-delivery"),$(".pr-highligh-box-wrapper").removeClass("normal-delivery"),$(".earlydeliverylink").show()),$("#sdd_cityFromIP").html(e.city),$("#sdd_expectedDeliveryDate").html(e.expectedDeliveryDate),$(".etd-date").html(e.expectedDeliveryDate),changeEDDToOccasionDate()}function signup_through_hto(e){var t="password="+e.password+"&email="+e.email;$.post(GLOBAL_CTX+"/signin",t,function(e){$(".fancybox-close, .fancybox-overlay").on("click",function(e){location.reload()}),sign_in_and_sigup_response(e,!0)},"json")}function setRingSizerHTO(e){e?($("#ringSizerHTO").val("RING_SIZER_REQUEST"),$("#homeTryOnProduct").addClass("hto_ring")):($("#ringSizerHTO").val("BANGLE_SIZER_REQUEST"),$("#homeTryOnProduct").addClass("hto_bangle"))}function submitBookRingAndBangleSizer(e){var t=null,a=null,i=null,o=null,r=null,s=null,n=null,l=null,d=null;e?(d="RING_SIZER",t=$("#custAddress_RingSizer").val(),a=$("#custStreet_RingSizer").val(),i=$("#custLocality_RingSizer").val(),o=$("#custLandmark_RingSizer").val(),r=$("#custPincode_RingSizer").val(),s=$("#custState_RingSizer").val(),mobile=$("#custMobile_RingSizer").val(),n=$("#custName_RingSizer").val(),l=$("#custCity_RingSizer").val()):(d="BANGLE_SIZER",t=$("#custAddress_BangleSizer").val(),a=$("#custStreet_BangleSizer").val(),i=$("#custLocality_BangleSizer").val(),o=$("#custLandmark_BangleSizer").val(),r=$("#custPincode_BangleSizer").val(),s=$("#custState_BangleSizer").val(),mobile=$("#custMobile_BangleSizer").val(),n=$("#custName_BangleSizer").val(),l=$("#custCity_BangleSizer").val()),$.ajax({type:"POST",url:GLOBAL_CTX+"/ringAndBangleSizeHelp/bookDummyRingAndBangleSizer",async:!1,cache:!1,dataType:"json",data:"name="+encodeURIComponent(n)+"&address="+encodeURIComponent(t)+"&street="+encodeURIComponent(a)+"&locality="+encodeURIComponent(i)+"&landmark="+encodeURIComponent(o)+"&postcode="+encodeURIComponent(r)+"&city="+encodeURIComponent(l)+"&mobile="+encodeURIComponent(mobile)+"+&state="+encodeURIComponent(s)+"&type="+d,success:function(t){if(!t.hasError)return $(".success-msg").html('<div class="success-container"><div class="success-container-inner"><span>Thank you for your interest!</span><p>Our jewellery expert will soon get in touch with you.</p></div></div>'),$("#custDetailsForRingSizer.wrapper").hide(),$(".success-msg").show(),e?trackGA("Ring-Size-Help","RingSizer","Requested-desktop"):trackGA("Bangle-Size-Help","BangleSizer","Requested-desktop"),!0;alert(t.message)}})}function addToWishList(e,t,a,i,o,r){trackGA("wishlist","add to wishlist clicked",e,0,!1),$.ajax({type:"POST",url:GLOBAL_CTX+"/wishlist/addProduct",async:!0,cache:!1,dataType:"json",data:"designId="+encodeURI(e)+"&customizationId="+encodeURI(t),success:function(s){if(s.hasError)return!0;var n='<div class="bs-tt bs-tt-tr dark-bg wishlist-bp-tooltip active"><p><strong>Did you know?</strong>Now, you could also share your wishlist over Email with your friends and family.</p><div class="bottom-links"><span class="pull-left close">Later</span><span class="pull-right"><a href="'+GLOBAL_CTX+"/wishlist/view\" onclick=\"trackGA( 'browse page share popup',  'goto wishlist is clicked');\">Take me to my Wishlist ></a></span></div></div>";if(getCookie("isWishlistShareTooltipShown")||($(".wishlist.clicked").closest(".pr-i, .pr-d-inner").append(n),createCookie("isWishlistShareTooltipShown",!0,1),trackGA("browse page share popup","popup shown")),$.fancybox.close(),$(".white-header li .user-links").hasClass("loggedin")||($(".white-header").load(GLOBAL_CTX+"/about.html .white-header-inner",function(e,t,a){mainMenuInt(),headerHoverItemInt()}),$(".header-right").removeClass("header-right col-xs-10")),$(".testi-pager span").each(function(e){$(this).addClass("item"+(e+1))}),r)window.location=r;else{$("#wishListCountHeader").replaceWith("<span class='wish-list-count cart-no' id='wishListCountHeader'><span>"+s.wishListItemCount+"</span> </span>");var l=$(".wishlist, .no-wishlist");l.removeClass("showLoginBox"),l.unbind("click.fb"),l.data("auth",!0);for(var d=0;d<s.wishListItemDesignIds.length;d++)wishlistBtnToBeEnabled=$("a[data-id='"+s.wishListItemDesignIds[d]+"'], div[data-id='"+s.wishListItemDesignIds[d]+"']"),wishlistBtnToBeEnabled.each(function(e){enableWishListButton($(this))})}return logAddedToWishListEvent(e),facebookAddToWishlist(e,i,a,t,o,s.wishListItemCount),trackGA("wishlist","added to wishlist",e),!0}})}function enableWishListButton(e){$(".wishlist-button").find(".txt").html("Remove from Wishlist"),$(".added-to-wishlist").html("Product Added to your wish list"),$(".added-to-wishlist").stop().animate({bottom:0},"easeOutCubic"),setTimeout(function(){$(e).addClass("wishlist-added wave"),$(e).attr("title","Added to wishlist"),$(e).removeClass("outline").addClass("fill"),$(e).attr("title","Added to wishlist")}),setTimeout(function(){$(e).removeClass("wave")},1e3),setTimeout(function(){$(".added-to-wishlist").stop().animate({bottom:-41},"easeOutCubic")},2500)}function disableWishListButton(e){$(".wishlist-button").find(".txt").html("Remove from Wishlist"),$(".added-to-wishlist").html("Product removed from your wish list"),$(".added-to-wishlist").stop().animate({bottom:0},"easeOutCubic"),setTimeout(function(){$(e).removeClass("wishlist-added"),$(e).attr("title","Add to wishlist"),$(e).removeClass("fill").addClass("outline")}),setTimeout(function(){$(".added-to-wishlist").stop().animate({bottom:-41},"easeOutCubic")},2500)}function signInToKnowBestPriceFunction(e){var t=getParamsObject(e).showingPrice;$.ajax({type:"POST",url:GLOBAL_CTX+"/design/getbestprice",async:!0,cache:!1,dataType:"json",data:"showingPrice="+encodeURI(t),success:function(e){if(e.hasError)return!0;loadSizeAndPrices(),$("#best_price_amount").html(t),$("#price_best_price_amount").html(e.bestPrice);var a=getCurrencySymbolForCountry(COUNTRY);return e.bestPrice&&$("#best_price_display").html('<span class="price strike"><span class="price-inner">'+a+'</span><span id="best_price_amount">'+e.actualPrice+'</span></span><span class="price" > <span class="price_best_price_amount">'+a+'</span><span id="price_best_price_amount">'+e.bestPrice+"</span></span><span>Redeem "+e.redeemPoints+" points in your account</span>"),$.fancybox.close(),$(".white-header").load(GLOBAL_CTX+"/about.html .white-header-inner",function(e,t,a){mainMenuInt(),headerHoverItemInt()}),$(".header-right").removeClass("header-right col-xs-10"),$(".testi-pager span").each(function(e){$(this).addClass("item"+(e+1))}),$("#best_price_display_non_loggedin").hide(),$("#best_price_display").show(),!0}})}
52function calculateBSContribution(){var e=$("#amount").val(),t=$("#goldMineMonth").val(),a=$("#goldMineMonth").find(":selected").data("discount");if(null!=e&&""!=e&&$.isNumeric(e)&&e>=1500&&null!=t&&""!=t&&null!=a&&""!=a){var i=Math.floor(e*a/100);$("#bsAmount").val(i);var o=parseInt(e),r=parseInt(i),s=parseInt($("#goldMineMonth").find(":selected").val())*o+r;$("#TotalMaturityAmount").val(s)}null!=t&&""!=t&&null!=a&&""!=a&&maturityDate()}function maturityDate(){var e=$(".start-date").html(),t=parseInt($("#goldMineMonth").find(":selected").val()),a=new Date(e);a.setMonth(a.getMonth()+t);var i=a.getFullYear(),o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][a.getMonth()],r=a.getDate();$("#maturityDate").html('<span class="day">'+r+' </span><span class="day">'+o+' </span><span class="day">'+i+"</span>")}function flogin(e){$.ajax({type:"GET",url:GLOBAL_CTX+e,async:!1,cache:!1,dataType:"text",success:function(e){if(e){var t=parseInt(screen.availWidth/2-250),a=parseInt(screen.availHeight/2-150),i="width=500,height=300,status,resizable,left="+t+",top="+a+"screenX="+t+",screenY="+a;window.open(e,"fbPopup",i),window.callParentFBFunction=function(e,t,a){null!=e&&0!=e?("false"==a&&trackGA("BsUI","Signup successful","Facebook"),trackGA("SignupGiveaway","facebook-desktop-registration-complete",""),$.ajax({type:"GET",url:GLOBAL_CTX+"/auth/checkFBHappyCustomerAfterLogin/"+e,async:!1,cache:!1,dataType:"json",success:function(t){if(t.hasError)location.reload();else{Object.keys(t.topCustomerWhoPurchased).length>0?($.fancybox({openEffect:"elastic",closeEffect:"fade",overlayColor:"#000",overlayOpacity:".2",centerOnScroll:!1,scrolling:"no",type:"ajax",wrapCSS:"auth-login",beforeLoad:function(){$(this).validationEngine("hideAll")},onComplete:function(){},onCleanup:function(){$("#user-login1").validationEngine("hideAll")},afterClose:function(){action&&window[action](actionParams),location.reload()},href:GLOBAL_CTX+"/auth/showFBHappyCustomerAfterLogin/"+e}),$(".fancybox-overlay").on("click",function(){action&&window[action](actionParams),location.reload()})):(action&&window[action](actionParams),location.reload());trackGA("BsUI","Login successful","Facebook")}}})):location.reload()}}}})}$(document).ready(function(){$("#surprise-form .btn").click(function(e){if(e.preventDefault(),$("#surprise-form-feedback").validationEngine(),$("#surprise-form-feedback").validationEngine("validate")){var t=$("#surprise-form").find('input[name="date-of-birth"]').val(),a=$("#surprise-form").find('input[name="married"]:checked').val(),i=$("#surprise-form").find('input[name="anniversary-date"]').val(),o=$("#surprise-form").find('input[name="spouse-birth"]').val(),r=$("#purchase-occasion o
52ption:selected").text(),s=$("#surprise-form").find('input[name="oCode"]').val(),n=$("#surprise-form").find('input[name="cid"]').val();$.ajax({type:"POST",url:GLOBAL_CTX+"/feedback/order/surprise",async:!1,cache:!1,dataType:"json",data:"birthday="+t+"&maritalStatus="+a+"&anniversary="+i+"&spouseBirthday="+o+"&purchaseOccassion="+r+"&cid="+n+"&oCode="+s,success:function(e){$(".details-saved-text").removeClass("hidden"),$(".btn.btn-block").addClass("hidden"),$(".btn.btn-disabled").removeClass("hidden")}})}})}),$(document).ready(function(){mainMenuInt(),$("#filter_ndd").on("click",function(){$(this).is(":checked")?(window.location.href=$("#checkBoxLinkId").val(),trackGA("Browse-Page-Filters","Delivery Time","next day delivery checkbox")):window.location.href=$("#checkBoxLinkId").val()}),$(".menu-close").click(function(){$(this).closest(".menuparent").removeClass("active"),$(".wh-overlay").hide()}),$(".tooltip-close").click(function(){$(this).closest(".top-level-dd").removeClass("top-level-dd-hover")}),$(".wh-navbar").hover(function(){$(this).closest("body").addClass("menu-hovered")},function(){$(this).closest("body").removeClass("menu-hovered")})}),showHideSortBy(),showHideCustomizeSizes(),$(document).ready(function(){$(".landingv2 .animated, .womens-day .animated").css({top:"30px",opacity:0}),$(".landingv2 .show-animated, .womens-day .show-animated").animate({top:"0",opacity:1},800,"easeOutQuad"),$(".womens-day .with-hover .hover").css({opacity:".9"})}),$(function(){$(".landingv2 .animated, .womens-day .animated").appear(),$(".landingv2 .animated").bind("appear",".landingv2 ul",function(e){$(this).animate({top:"0",opacity:1},800,"easeOutQuad")}),$(".womens-day .animated").bind("appear",".womens-day div",function(e){$(this).animate({top:"0",opacity:1},800,"easeOutQuad")}),$("div.submenu ul.submenu-left").hover(function(){$(this).toggleClass("active")})}),function(e){e.fn.extend({addTemporaryClass:function(t,a){var i=this;return setTimeout(function(){i.removeClass(t)},a),this.each(function(){e(this).addClass(t)})}})}(jQuery),$(function(){for(i=(new Date).getFullYear();i>1900;i--)$("#dob-bs-years").append($("<option />").val(i).html(i)),$("#ann-bs-years").append($("<option />").val(i).html(i)),$("#spouse-bs-years").append($("<option />").val(i).html(i));updateNumberOfDays("#dob-bs-days","#dob-bs-months","#dob-bs-years"),$("#dob-bs-months, #dob-bs-years").change(function(){updateNumberOfDays("#dob-bs-days","#dob-bs-months","#dob-bs-years")}),updateNumberOfDays("#ann-bs-days","#ann-bs-months","#ann-bs-years"),$("#ann-bs-months, #ann-bs-years").change(function(){updateNumberOfDays("#ann-bs-days","#ann-bs-months","#ann-bs-years")}),updateNumberOfDays("#spouse-bs-days","#spouse-bs-months","#spouse-bs-years"),$("#spouse-bs-months, #spouse-bs-years").change(function(){updateNumberOfDays("#spouse-bs-days","#spouse-bs-months","#spouse-bs-years")})}),$(window).load(function(){jQuery(".pr-has-carousel .product-list, .has-carousel .product-list").owlCarousel({items:6,slideSpeed:1200,paginationSpeed:1200,scrollPerPage:!0,pagination:!0,navigation:!1,autoPlay:!0,navigationText:["<i class='icon-ion-chevron-left'></i>","<i class='icon-ion-chevron-right'></i>"]}),jQuery(".recently-viewed .product-list").owlCarousel({items:12,slideSpeed:1200,paginationSpeed:1200,scrollPerPage:!0,pagination:!0,navigation:!1,navigationText:["<i class='icon-ion-chevron-left'></i>","<i class='icon-ion-chevron-right'></i>"]}),setTimeout(function(){$(".carousel-wrapper, .testimonial, .pd-testimonials").addClass("extend")},1e3)}
52),$(document).ready(function(){var e=$("td.totalnoofdiamonds"),t=0;$.each(e,function(e,a){var i=$(a).html().split(" ")[0];t=Number(t)+Number(i)}),Number(t)>0&&($(".detail-with-diamond h2.title").remove(".t-d-d"),$(".detail-with-diamond h2.title").after("<div class='t-d-d last' id='totalDiamonds' data-totaldiamonds='"+t.toFixed(0)+"'>Total No. Of Diamonds <span>"+t.toFixed(0)+"</span></div>"),$(".detail-with-diamond h2.title").removeClass("expanded"));var a=$("td:contains('carats')"),i=0;$.each(a,function(e,t){var a=$(t).html().split(" ")[0];i=Number(i)+Number(a)}),Number(i)>0&&($(".detail-with-diamond h2.title").remove(".t-d-d"),$(".detail-with-diamond h2.title").after('<div class="t-d-d"><div class="weight-tooltip">Total Weight <a class="tooltip-section" data-tooltiptype="total_weight"> <span class="icon-ion-information-circled"></span> <div class="bs-tt bs-tt-hct bs-tt-sq"><span>The final invoice amount will be adjusted in case of variation in weight.</span></div> </a></div>  <span id="pptotaldmdwt" data-dweight="'+i.toFixed(3)+'">
52'+i.toFixed(3)+" Ct</span></div>"),$(".detail-with-diamond h2.title").removeClass("expanded"))}),$(document).ready(function(){$("#corporate-discount-form").submit(function(e){if(e.preventDefault(),$("#corporate-discount-form").validationEngine(),$("#corporate-discount-form").validationEngine("validate")){var t=$("#login-email").val(),a=$("#userName").val(),i=$("#customerPhone").val(),o=$("#vouchercode").val(),r=$("#newsletter1").is(":checked");$.ajax({type:"POST",url:GLOBAL_CTX+"/corporatevoucher/redeem",async:!1,cache:!1,dataType:"json",data:"email="+t+"&userName="+a+"&customerPhone="+i+"&voucherCode="+o+"&newsletter="+r,success:function(e){if(e.hasError)for(error in $(".error-container-inner").html("<i class='icon-ion-ios-close-outline'></i><p>"+e.errors[0]+"</p>"),$(".error-container").show(),e.errors);else $(".error-container").hide(),$(".success-container-inner").html("<i class='icon-ion-ios-checkmark-outline'></i><p>"+e.success+"</p>"),$("#order-login-title").hide(),$("#corporate-discount-form").hide(),$(".success-container").show()}})}}),$(document).ready(function(){$("#egc #eg-submit").click(function(e){e.preventDefault();var t="";t="DIAMOND"===$(".selected #occasion").data("cardtype")?$(".diamond-card").data("cardtype"):$(".gold-card").data("cardtype"),$("#customizationId").val(t);var a=$("#eGiftCardSubmitForm");a.html(""),a.append($("#eGiftCard2").html()),a.append($("#eGiftCard3").html()),$(".egc-details input").each(function(e){var t="#"+$(this).attr("id");a.find(t).val($(this).val())}),$(".egc-details textarea").each(function(e){var t="#"+$(this).attr("id");a.find(t).val($(this).val())}),a.append($("input#occasion:checked")[0].outerHTML),a.submit()})}),$("#corporate-discount-form .fancybox-popup").click(function(){$("#corporate-discount-form").validationEngine("hideAll")})});var getFilterparams=function(){var e={},t=[],a=[];$(".filters-container section.block").each(function(){if($(this).find(".form-item").hasClass("selected")){var e=$(this).find(".title").text(),i=$(this).find("a").attr("title");null==t&&null==t||null==a&&null==a||(t.push(e),a.push(i))}});var i=$.unique(t),o=$.unique(a);return e.filterUniqueCategory=i,e.filterUniqueTags=o,e}();function browseWishlist(e){var t="bs-tt-tr";e.parents("li").hasClass("three-column-browse")&&(t="bs-tt-tl");var a='<div class="bs-tt '+t+' dark-bg wishlist-bp-tooltip active"><p><strong>Did you know?</strong>Now, you could also share your wishlist over Email with your friends and family.</p><div class="bottom-links"><span class="pull-left close">Later</span><span class="pull-right"><a href="'+GLOBAL_CTX+"/wishlist/view\" onclick=\"trackGA( 'browse page share popup',  'goto wishlist is clicked');\">Take me to my Wishlist ></a></span></div></div>";$(".wishlist").removeClass("clicked"),$(".wishlist-bp-tooltip").remove();var i=e.data("auth"),o=e.data("id"),r=e.data("customizationid"),s=e.data("category"),n=e.data("name"),l=e.data("price");if(e.hasClass("wishlist-added"))removeFromWishList(o,!1,e);else{if(1!=i)return action="addToWishList",actionParams="design_id="+o,void(getCookie("isWishlistShareTooltipShown")||e.addClass("clicked"));addToWishList(o,r,s,n,l),getCookie("isWishlistShareTooltipShown")?e.closest(".pr-i, .pr-d-inner").find(".wishlist-bp-tooltip").remove():(e.closest(".pr-i, .pr-d-inner").append(a),createCookie("isWishlistShareTooltipShown",!0,1),trackGA("browse page share popup","popup shown"))}}function productHoveredAndLogEventLogger(e,t,a){a.find(".offer").text();var i=getURLparamsForURL(a.find(".p-image a").attr("href"));void 0!==i&&i.posEvent;var o="";null!=document.getElementById("view-sort-by")&&($("body").hasClass("b-new-filter")?document.querySelector("#view-sort-by .selected").textContent.trim():(o=document.getElementById("view-sort-by").selectedIndex,document.getElementById("view-sort-by").options[o].text))}function firstTimeBrowseVideo(){if(!getCookie("newFeatureIntroPopup")&&("browse"==PAGE_TYPE||"store-catalog"==PAGE_TYPE)&&$(".three-column-browse").hasClass("newFeatureIntroPopup-holder")){var e='<source src="'+$(".newFeatureIntroPopup-holder .bvideo-icon2").data("video-url")+'" t
52ype="video/mp4">',t=$(".newFeatureIntroPopup-holder").data("position");setTimeout(function(){$(".newFeatureIntroPopup-wrapper video").get(0).play()},1e3),$("body").addClass("newFeatureIntroPopup-inactive"),$(".newFeatureIntroPopup-wrapper video").html(e),$(window).scroll(function(){$(".newFeatureIntroPopup-holder").width();var e=$(".newFeatureIntroPopup-holder .bvideo-icon2").offset().left,a=$(".newFeatureIntroPopup-holder").offset().top,i=$(window).scrollTop();$(".newFeatureIntroPopup-holder").hasClass("column-three")?($(".newFeatureIntroPopup-wrapper").removeClass("arrow-left").addClass("column-third arrow-right"),$(".newFeatureIntroPopup-wrapper").css("top",a)):$(".newFeatureIntroPopup-wrapper").css({top:a+"px",left:e+73}),i>a-100&&$("body").hasClass("newFeatureIntroPopup-inactive")&&$("#grid-view-result").hasClass("grid-view-result-active")&&($("body").removeClass("newFeatureIntroPopup-inactive"),$("body").addClass("newFeatureIntroPopup-active"),$(".newFeatureIntroPopup-wrapper").append('<span class="bvideo-icon2-top"></span>'),$("html, body").animate({scrollTop:a-100}),trackGA("Video","Viewed Video Feature FTUE",""+t),createCookie("newFeatureIntroPopup",!0,1))}),$(".newFeatureIntroPopup-close").click(function(){$("body").removeClass("newFeatureIntroPopup-active"),$(".bvideo-icon2-top").remove(),trackGA("Video","Dismissed Video Feature FTUE","Clicked Close")}),$(".newFeatureIntroPopup-footer .btn").click(function(){$("body").removeClass("newFeatureIntroPopup-active"),$(".bvideo-icon2-top").remove(),trackGA("Video","Dismissed Video Feature FTUE","Clicked Got It")}),$(".newFeatureIntroPopup-overlay").click(function(){$("body").removeClass("newFeatureIntroPopup-active"),$(".bvideo-icon2-top").remove(),trackGA("Video","Dismissed Video Feature FTUE","Clicked outside popup")})}}function logViewedProductCarouselEvent(e,t){var a=new Object,i=$("#customizationId").val();a.id=i,a._eventId="viewed_product_carousel",a.total_available_product_images=t,void 0!==$(".carousel-active-thumbs").val()?a.viewed_product_image=e.closest(".owl-item").index():a.viewed_product_image=e.closest(".item").index(),a.pageType=PAGE_TYPE}function logBannerClickedEvent(e){var t=new Object;t._eventId="clicked_banner",t.banner_title=e.title;var a=e.baseURI;t.banner_target_page_url=e.href.replace(a,""),t.banner_position=$(e).parent().parent().index(),t.pageType=PAGE_TYPE}function logHoveredOverFilterEvent(e){var t=new Object;t._eventId="hovered_over_filter",t.feature="Filters",t.eventValue=e}function videoPlayOnScroll(){$(".static-video").each(function(){if($(window).scrollTop()>100){var e="<source src='"+$(this).data("url")+"'></source>";$(this).html(e),$(this).get(0).play()}})}function fancyboxFixedPopup(){jQuery.extend(jQuery.fancybox.defaults,{autoCenter:!0,fixed:!0})}function fetchBrowsingHistoryData(){$.ajax({type:"GET",url:GLOBAL_CTX+"/recently-viewed/visitor-data/",cache:!1,dataType:"json",success:function(e){var t="",a=e.browsingHistory.total;a>2&&$(".bh-block").addClass("show-tooltip"),a>0&&(t=getRecentlyViewedItems(e.browsingHistory.browsingHistory),$("#recently-viewed-placeholder").html(t),$(".bh-block .cart-no").html(a).show(),a.toString())}})}function getRecentlyViewedItems(e){for(var t=0,a="";t<4;t++)e[t]&&(a+='<div class="rv-product"><a href="'+GLOBAL_CTX+"/"+e[t].designItem.productPageUrl+'"><img src="'+e[t].designItem.imageUrl+'" width="95" height="95" class="lazyOwl"/></a></div>');return a}function decodeCookie(e){return!!e&&(e=e.replace(/"/g,""),decodeURIComponent(atob(e)))}$("#uploadResumeForm").submit(function(e){e.preventDefault(),$("#uploadResumeId").attr("disabled","disabled");var t=new FormData(this);$.ajax({type:"POST",url:GLOBAL_CTX+"/career/uploadResume",processData:!1,contentType:!1,dataType:"json",data:t,success:function(e){e.hasError?$(".popup-messages").html('<div class="grid_12"><div class="alert error"> <span class="icon"></span><span class="close">x</span> <strong>Error!</strong>'+e.errorStr+"</div></div>"):$(".popup-messages").html('<div class="grid_12"><div class="alert success"> <span class="icon"></span><span class="close">x</span>Resume uploaded successfully</div></div>'),$("#uploadResumeId").removeAttr("disabled")},failure:function(e){alert("Server failed to process request"),$("#uploadButtonId").removeAttr("disabled")}})}),$(document).ready(function(){if($("body").hasClass("new-checkout-flow")){function toggleValidationState(e){var t=$(".defer-skip-address-fields, #billing-address-form").find("input, select");
52e?t.each(function(){var e=$(this);void 0===e.data("orig-class")&&e.data("orig-class",e.attr("class")||"");var t=(e.attr("class")||"").replace(/\b(required|min-length_\d+|max-length_\d+|word|pincode|zipcode)\b/g,"").trim();e.attr("class",t)}):t.each(function(){var e=$(this);void 0!==e.data("orig-class")&&e.attr("class",e.data("orig-class"))})}$(".pi-inner").hover(function(){$(".bs-tt").removeClass("active"),$(this).find(".bs-tt").addClass("active")},function(){$(this).find(".bs-tt").removeClass("active")}),$(".view-gift-message").click(function(e){e.stopPropagation(),$(this).parents(".gift-message").find(".bs-tt").addClass("active")}),$(".cart_place_order").click(function(){$(".submit-cart-save-gift-msg").trigger("click")}),$("body").click(function(){$(".checkout .bs-tt, .gift-message .bs-tt").removeClass("active")}),$(document).on("click",".edd-view",function(e){e.stopPropagation(),$(this).parents(".edd-wrapper").find(".bs-tt").addClass("active"),$(".view-summary-details").find(".bs-tt").removeClass("active")}),$(".view-summary-details").click(function(e){e.stopPropagation(),$(this).find(".bs-tt").addClass("active"),$(".edd-wrapper").find(".bs-tt").removeClass("active")}),$(".gift-message .bs-tt").click(function(e){"edit"!==e.target.dataset.action&&e.stopPropagation()}),$("body").hasClass("new-checkout-flow")&&$("#payment-details .form-submit-wrapper .btn, #payment-details .form-submit-wrapper .btn-primary").removeClass("btn-primary").addClass("btn btn-new btn-block"),$("#address-form").on("submit",function(){$("#postcode_delivery").prop("disabled",!1),$("#ba_postcode_delivery").prop("disabled",!1)}),$(".delivery-page-proceed").click(function(e){if("true"===$("#isAddressDeferredEnabled").val()&&"true"===$("#isAddressDeferred").val())return($("#postcode_delivery").val()||"").trim()?($("input[name='_eventId']").val("checkoutSaveAddressDetails"),$("#postcode_delivery, #ba_postcode_delivery").prop("disabled",!1),$(".submit-checkout-save-address").trigger("click"),trackGA("BsUI","Skipped Delivery Address","Anonymous"),!1):($(".defer-notifications-delivery-type").html(getNotificationErrorHtml("Please enter your pincode to continue.")),!1);$(".submit-checkout-save-address").trigger("click"),trackGA("BsUI","Provided Delivery Details","Anonymous")}),window.toggleAddressDeferred=function(e){$("#isAddressDeferred").val(e?"true":"false");var t=$(".delivery-type-details-block"),a=$(".defer-skip-address-fields"),i=$(".address-details-block"),o=0===$("#pickupAtStore").length;toggleValidationState(e);var r=$(".proceed-to-addr").is(":visible");e?(t.slideUp("fast"),a.slideUp("fast"),r||i.stop(!0,!0).slideUp("fast")):r||(o?t.hide():t.slideDown("fast"),$("input[name=deliveryType]:checked").length>0?(a.show(),i.stop(!0,!0).slideDown("fast")):i.stop(!0,!0).slideUp("fast"))},$(".showLoginBox").click(function(){$("#voucher-wrapper").css("display","none")}
52),$("#shipping-address #email").on("blur",function(){var e=$(this).val(),t=$(this);setTimeout(function(){$(t).parents(".fl-wrap").hasClass("error")||trackGA("BsUI","Updated Email on Delivery Details Page",e)},1e3)}),$("#shipping-address #contactNumber").on("blur",function(){var e=$(this).val(),t=$(this);setTimeout(function(){$(t).parents(".fl-wrap").hasClass("error")||trackGA("BsUI","Updated Mobile on Delivery Details Page",e)},1e3)}),$("#save_gift_message").on("click",function(){var e=$("#gift-msg-form #giftFrom").val(),t=$("#gift-msg-form #giftTo").val(),a=$("#gift-msg-form #giftMsg").val(),i=!1;if($("#gift-msg-form .fl-wrap").hasClass("error")&&(i=!0),giftMessageEvent(a,t,e,i),""==e||""==t||""==a||$("#gift-msg-form .fl-wrap").hasClass("error"))$(".gift-message-save").trigger("click");else{if($("#giftFrom").val(e),$("#giftTo").val(t),$("#giftMsg").val(a),$("#gift_message_added_from").text(e),$("#gift_message_added_to").text(t),$("#gift_message_added_message").text(a),$("ul").hasClass("messages"))return!1;UpdateGiftMsg($("#cartIdValue").val(),a,t,e),$.fancybox.close(),$(".gift-message .add-gift").addClass("hidden"),$(".gift-message .gift-message-added").removeClass("hidden")}})}function toggleValidationState(e){var t=$(".defer-skip-address-fields, #billing-address-form").find("input, select");
52e?t.each(function(){var e=$(this);void 0===e.data("orig-class")&&e.data("orig-class",e.attr("class")||"");var t=(e.attr("class")||"").replace(/\b(required|min-length_\d+|max-length_\d+|word|pincode|zipcode)\b/g,"").trim();e.attr("class",t)}):t.each(function(){var e=$(this);void 0!==e.data("orig-class")&&e.attr("class",e.data("orig-class"))})}$(window).scroll(function(){var e=$(window).scrollTop(),t=$("#shopping-bag").hasClass("row"),a=$("body").hasClass("new-checkout-flow"),i=$("body");$("div").hasClass("education-page");if(t&&a){if($(".bag-item").length>1){var o=$("#shopping-bag-left").outerHeight(),r=$(".shopping-bag-right").outerHeight();e>104&&r<o?i.addClass("sticky-cart"):i.removeClass("sticky-cart")}}}),$(".education-page .navigation h2").on("click",function(){$(this).parent().addClass("active").siblings().removeClass("active"),$(this).parent().find(".nav-child-items").slideDown(),$(this).parent().siblings().find(".nav-child-items").slideUp()}),$(".education-page .bread-crumbs li:last-child").on("click",function(e){e.preventDefault()}),$(".proceed-to-addr").on("click",function(e){var t=v2.Form.forms["address-form"].validate(),a=($("#email").val(),$("#contactNumber").val(),$(".delivery-page-proceed")),i="true"===$("#isAddressDeferredEnabled").val();t?(a.removeClass("btn-disabled"),a.prop("disabled",!1),$("#deferred-checkbox-wrapper").show(),$(".whatsapp-details").show(),$(".address-pincode-for-deferred-flow").show(),i||$(".delivery-arrow").hide(),$(".address-combined-wrapper").slideDown("slow",function(){i||$("#address-accordion-trigger").trigger("click")}),$(".skip-address-toggle").slideDown("fast"),$(this).parent().remove(),i?($("#isAddressDeferred").val("true"),toggleValidationState(!0)):($("#isAddressDeferred").val("false"),toggleValidationState(!1)),$(".delivery-type-details-block").hide(),$(".defer-skip-address-fields").hide(),$(".address-details-block").hide(),userDetailsAddedEvent()):($("#email").parent(".fl-wrap").hasClass("error")&&EmailIncorrectEvent(e,$("#email").val()),$("#contactNumber").parent(".fl-wrap").hasClass("error")&&PhoneIncorrectEvent(e,$("#contactNumber").val()))}),$(document).on("click","#address-accordion-trigger",function(e){if(!($(e.target).is("#deferAddressBtn")||$(e.target).closest("#deferAddressBtn").length>0||$(this).hasClass("expanded"))){$(this).addClass("expanded"),$("#addressAccordionRadio").prop("checked",!0),$(this).find(".delivery-arrow").hide(),$(this).find("#deferAddressBtn").show(),$(this).find(".delivery-dropdown").css("border-bottom","1px solid #d4d4d4"),$("#isAddressDeferred").val("false"),toggleValidationState(!1);var t=0===$("#pickupAtStore").length,a=$(".delivery-type-details-block");$(".defer-skip-address-fields"),$(".address-details-block"),$("#postcode_delivery");t?(a.hide(),$("#homeDelivery").prop("checked",!0).trigger("change")):a.slideDown("fast")}}),$(document).on("click","#deferAddressBtn",function(e){e.preventDefault(),e.stopPropagation();var t=$("#address-accordion-trigger");t.removeClass("expanded"),$("#addressAccordionRadio").prop("checked",!1),t.find("#deferAddressBtn").hide(),t.find(".delivery-arrow").show(),t.find(".delivery-dropdown").css("border-bottom","none"),$("#isAddressDeferred").val("true"),toggleValidationState(!0),$(".delivery-type-details-block").slideUp("fast"),$(".defer-skip-address-fields").slideUp("fast"),$(".address-details-block").slideUp("fast",function(){$("#pickupStore").length>0&&""!==$("#pickupStore").val()&&null!==$("#pickupStore").val()&&"-"!==$("#pickupStore").val()&&($("#postcode_delivery").val(""),$("#edit-pin-wrapper").removeClass("auto-filled success focused")),$("#postcode_delivery").prop("disabled",!1).removeClass("gray-bg"),$(".notifications-delivery-type").html(""),$(".defer-notifications-delivery-type").html(""),$(".formError").remove();var e=document.querySelector(".delivery-page-proceed");e&&e.click()}),trackGA("BsUI","Deferred Delivery Address via Button","Anonymous")}),$(".bh-block .prcs-d").on("click",function(){var e=document.querySelector(".bh-block .cart-no").textContent;trackGA("BlueStone Header","Clicked on Browsing History Icon",e)})});var storeData=getCookie("store_data"),storeCookies=JSON.parse(decodeCookie(storeData));
52$(document).ready(function(){if("browse"==PAGE_TYPE||"store-catalog"==PAGE_TYPE){var e=$("#eventAttributes").data("pincodetype"),t=$("#eventAttributes").data("userpincode"),a=$("#eventAttributes").data("cityname"),i=$("#eventAttributes").data("storename"),o=getCookie("sortingPreference");trackGA("BsUI","Sorted by "+o,e+" "+t+" City "+a+" Store Name "+i);if(window.location.hash&&-1!==window.location.hash.indexOf("#s")){var r=location.hash.split("_"),s=parseInt(r[1]),n=parseInt(r[2]),l=parseInt(r[3]),d=(parseInt(n),parseInt(n)+1),c="?",u=up1,p=up2,m=$(".seo-content-bottom").height()+2500,h=999,v=!0,f="",g="",y=n,b=$("#product_list_ui li:first-child").innerHeight(),C=($("#list-view li:first-child").innerHeight(),!1),w=!1,k=!1,P=totalDesigns,S=0,T=!1;if(l!=(storeCookies.storeId?storeCookies.storeId:0))return history.back(),setTimeout(function(){location.reload()},10),!1;p.indexOf("?")>-1&&(c="&");var D=document.querySelector("ul.product-grid"),I=document.querySelector("li.markt-unit"),A=document.querySelector(".related-searches"),x=document.querySelector(".bp-store-widget"),O=document.querySelector(".tf-advantages-wrapper");null!==I&&null!==D&&D.removeChild(I),null!==A&&null!==D&&D.removeChild(A),null!==x&&null!==D&&D.removeChild(x),null!==O&&null!==D&&D.removeChild(O),removeTrustFactors(1);for(var E=0;E<24;E++)g+="<li class='items col-xs-4'><span class='tmp-inner'><span class='pd-i'></span></li>";for(E=2;E<=n;E++){f+="<ul class='product-grid tmp-ul' style='height: "+8*b+"px;' id='product_list_ui' data-id='page"+E+"'>"+g+"</ul>"}$("#mainContent").find("#product_list_ui").parent().append(f),setTimeout(function(){window.scrollTo(0,s)},500),$(document).unbind("scroll"),$(window).load(function(){url=setURL(u,n,p,c),fetchNewPage(url,function(e,t){$("#mainContent").find("#product_list_ui[data-id=page"+n+"]").replaceWith("<ul class='product-grid' id='product_list_ui' data-id='page"+n+"'>"+e+"</ul>"),$("#mainContent").find("#list-view[data-id=page"+n+"]").replaceWith("<ul class='product-grid' id='list-view' data-id='page"+n+"'>"+t+"</ul>"),$("#mainContent").find("#countRangeTop").html($("#tempHiddenPage").find("#countRange").html()),$("#mainContent").find("#nextPageLink").data("href",$("#tempHiddenPage").find("#nextPageLink").data("href")),d=n+1,$(".lazy-bg").lazyload({effect:"fadeIn"}).removeClass("lazy-bg"),(S=P-24*n)>0?$(".product-count").html(S):($("#showMoreResult").hide(),k=!0),$("#grid-view-result .bpvideo").each(function(e,t){loadVideoUrl(this),playVideo(this)}),removeTrustFactors(n)}),!infiniteScroll&&S>0&&(k=!1,url=setURL(u,d,p,c),fetchNewPage(url,function(e,t){$("#tempHiddenPage").html("<ul id='product_list_ui'>"+e+"</ul>"),$("#mainContent").find("#countRangeTop").html($("#tempHiddenPage").find("#countRange").html()),$("#mainContent").find("#nextPageLink").data("href",$("#tempHiddenPage").find("#nextPageLink").data("href")),removeTrustFactors(d=n+2)}),k=!0),$(window).scroll(function(){$(".tmp-ul").each(function(){if($(this).is(":in-viewport")){var e=$(this).data("id");if((e=parseInt(e.split("page")[1]))>1)k=!1,fetchNewPage(setURL(u,e,p,c),function(t,a){$("#mainContent #product_list_ui[data-id='page"+e+"']").replaceWith("<ul class='product-grid' id='product_list_ui' data-id='page"+e+"'>"+t+"</ul>"),$("#mainContent #list-view[data-id='page"+e+"']").replaceWith("<ul class='product-grid' id='list-view' data-id='page"+e+"'>"+a+"</ul>"),y=e,$(".lazy-bg").lazyload({effect:"fadeIn"}).removeClass("lazy-bg"),removeTrustFactors(y)})}}),$(window).scrollTop()>=s&&!T&&(T=!0);var e=$(window).scrollTop()>=$(document).height()-$(window).height()-m;C=-1==$("#mainContent").find("#nextPageLink").data("href").toLowerCase().indexOf("void"),e&&C&&S>0&&T&&(url=setURL(u,d,p,c),fetchNewPage(url,function(e,t){infiniteScroll&&($("#mainContent").find("#product_list_ui").parent().append("<ul class='product-grid' id='product_list_ui' data-id='page"+d+"'>"+e+"</ul>"),$("#mainContent").find("#list-view").parent().append("<ul class='product-grid' id='list-view' data-id='page"+d+"'>"+t+"</ul>")),$("#mainContent").find("#countRangeTop").html($("#tempHiddenPage").find("#countRange").html()),$("#mainContent").find("#nextPageLink").data("href",$("#tempHiddenPage").find("#nextPageLink").data("href")),C=-1==$("#mainContent").find("#nextPageLink").data("href").toLowerCase().indexOf("void"),y=d,d+=1,removeTrustFactors(y)})),w||C||($("div#loadmoreajaxloader").hide(),trackGA("BsUI","Page Viewed","Page Scroll Ended"),w=!0)})})}function setURL(e,t,a,i){var o="";return o+=location.pathname,""!==location.search?o+=location.search+"&":o+="?",o+="p="+t+"&scroll=true"}function removeTrustFactors(e){var t=Array.prototype.slice.call(document.querySelectorAll("#mainContent ul.product-grid")),a=t[e-1].querySelectorAll(".tf-wrapper"),i=Array.prototype.slice.call(a),o=document.querySelector(".bp-gms-wrapper");if(null!==o&&null!==t&&t[e-1].removeChild(o),i.length>0)if(1==e)t[e-1].removeChild(i[0]);else for(var r=0;r<i.length;r++)t[e-1].removeChild(i[r])}function fetchNewPage(e,t){d<h&&v&&!k&&(v=!1,$("div#loadmoreajaxloader").fadeIn(),!infiniteScroll&&S>0&&($("#showMoreResult").hide(),$(".showMoreResultLoader").show()),$.ajax({url:e,dataType:"text",async:!1,success:function(e,a,i){if
52(200==i.status&&!infiniteScroll&&S>0&&($(".showMoreResultLoader").hide(),$("#showMoreResult").show()),e){$("#tempHiddenPage").html(e),infiniteScroll||(k=!0);var o=$("#tempHiddenPage").find("#product_list_ui").html(),r=$("#tempHiddenPage").find("#list-view").html();t&&t(o,r),$("#mainContent").find("#newBrowsePage").html($("#tempHiddenPage").find("#newBrowsePage").html());$("<html />").html(e);var s,l=$(".product-count").html();finalCount=l>24?l-24:0,$("body").hasClass("load-more-designs")&&trackGA("BsUI","Clicked Load more designs",'"'+y+'"',finalCount),S=P-24*n,v=!0,infiniteScroll&&$(".lazy-bg").lazyload({effect:"fadeIn"}).removeClass("lazy-bg"),hoverInit(),$("div#loadmoreajaxloader").hide(),$("#grid-view-result .product-grid  .pr-i").hover(function(){var e=$(this),t=$("input:hidden",this).val();s||(s=window.setTimeout(function(){s=null,productHoveredAndLogEventLogger(window.location.href,t,e)},2e3))},function(){s?(window.clearTimeout(s),s=null):$("#SeeAllEvents").slideUp("slow")})}var d;function hideTooltip(){d=setTimeout(function(){$(".jtooltip-trigger").parent().find(".jtooltip").removeClass("active")},400)}switch_tabs($(".defaulttab")),$(".jtooltip-trigger").mouseover(function(e){e.stopPropagation(),$(".jtooltip").removeClass("active"),$(this).parent().find(".jtooltip").addClass("active"),clearTimeout(d)}).mouseout(hideTooltip),$(".jtooltip").mouseover(function(){clearTimeout(d)}).mouseout(hideTooltip)}}))}"scrollRestoration"in history&&(history.scrollRestoration="manual"),getCookie("showTFcards")||createCookie("showTFcards",!1,1),$(".middle-filter-blocks .filter-item").removeClass("active"),location.search.includes("sid")?($(".middle-filter-blocks.store .filter-item").addClass("active"),getLocalStorageWithExpiry("isStores")||(window.history.replaceState("",window.location.href,window.location.pathname),$(".middle-filter-blocks .filter-item").removeClass("active"),$(".middle-filter-blocks.all .filter-item").addClass("active"))):location.search.includes("wid")?($(".middle-filter-blocks.tah .filter-item").addClass("active"),getLocalStorageWithExpiry("isTAH")||(window.history.replaceState("",window.location.href,window.location.pathname),$(".middle-filter-blocks .filter-item").removeClass("active"),$(".middle-filter-blocks.all .filter-item").addClass("active"))):$(".middle-filter-blocks.all .filter-item").addClass("active")}});var isCSShown=!1,isFAQ=!1,iscalcShown=!1;function gmsGaEvents(){"goldmine"==PAGE_TYPE&&($(".faq-block").is(":in-viewport")&&!isFAQ&&(trackGA("GMS","Shown GMS FAQ","GMS FAQs shown"),isFAQ=!0),$(".more-questions").is(":in-viewport")&&!isCSShown&&(trackGA("GMS","Shown GMS CS","GMS CS - End of page shown"),isCSShown=!0),$(".slider-block").is(":in-viewport")&&!iscalcShown&&(trackGA("GMS","Shown GMS Calculator","GMS Calculator Seen on Landing"),iscalcShown=!0))}function updateCustomization(e){var t=$(e).find("#metalColor").html(),a=$(e).find("#purity").html();if(0==$(e).find("#solitaireColor").length){var i=$(e).find("#diamondClarity").html()+" "+$(e).find("#diamondColor").html();$(".diamond label input").removeAttr("checked"),$(".diamond label input[name=diamondQuality][value='"+i+"']").prop("checked",!0)}else{var o=$(e).find("#solitaireClarity").html(),r=$(e).find("#solitaireColor").html(),s=$(e).find("#solitaireCarat").html();i=($(e).find("#diamondClarity").html()||o)+" "+$(e).find("#solitaireColor").html();$(".select-size.clarity-wrapper #clarityselect").val(o),$(".select-size.color-wrapper #colorselect").val(r),$("#caratselect").val(s),$("#qualityselect").val(i)}if($("#select-gold .selected .color-val").html(t),$("#select-gold .selected").removeClass("white-gold"),$("#select-gold .selected").removeClass("yellow-gold"),t&&$("#select-gold .selected").addClass(t.toLowerCase()+"-gold"),$(".metal-purities").hide(),$("."+t+"-purities").show(),$(".metal-purities label input").removeAttr("checked"),$(".metal-purities label input#metalPurity_"+a+"[name='metalPurity-"+t+"']").prop("checked",!0),$(".metal-purities label input#metalPurity_"+a+"[name='metalPurity-"+t+"']").attr("checked",!0),$("#ringselect").length>0){var n=$(e).find("#available-size").data("sizevalue"),l=$(e).find("#available-size").data("sizekey");window.sizeKey=l+"",$(".icon-ion-ios-checkmark-empty").removeClass("active"),$("#sizeList ul li").removeClass("size-selected"),$("#sizeList ul li[data-key='"+l+"']").addClass("size-selected"),$("#sizeList ul li[data-key='"+l+"']").children(".icon-ion-ios-checkmark-empty").addClass("active"),$("#ringselect").attr("data-key",l),$("#ringselect").val(n),$(".size-box-overlay").html(n),$(".size-box-overlay").attr("data-size",n),getPriceOnSize()}getCustomizationOnDiamondQuality();$(".product-reserve-cta").data("storename"),$("#cust-details .city").text(),$(".delivery-pincode").text(),$(".store-delivery strong").text(),$(e).children("span:first-child").text();$(".store-on-load-section").data("guessedpin"),trackGA("BsUI","Viewed details for delivery by tomorrow customization","DesignId "+productDetails.id)}function openPopup(){$.fancybox({autoScale:!0,transitionIn:"elastic",transitionOut:"elastic",speedIn:500,speedOut:300,autoDimensions:!0,centerOnScroll:!0,href:"#codPopup",afterShow:function(){updateSelectedTabOnFailure("PAY BY CASH","")}}),localStorage.setItem("payByCashShown",!0)}function storeDetailsForProductPage(e,t,a){var i=$("#getNearestStore").val(),o=getCustomizationCode();$(".customization-available").hide(),$.ajax({type:"GET",url:GLOBAL_CTX+"/deliverydate/getAllAvailableProductInStore",dataType:"json",data:"pincode="+i+"&productcode="+o+"&isNdd=false",success:function(e){if(!e.hasError){if(a||!$(".store-available-wrapper").hasClass("hidden")&&(0===$(".default-content").length||$(".store-inner-content").hasClass("hidden"))||e.nearestStoreResponse.inventoryAvailable&&e.nearestStoreResponse.storeName){var t=e.nearestStoreResponse.storeMessage,i=t.split("@"),r=i[0],s="",n="",l="",d=!1,c="",u=$("#isNdd").val(),p=$(".store-on-load-section .get-nearest-store.active").val();$("#cust-details .city").text(e.nearestStoreResponse.cityName),i[1]&&(n=(s=i[1].split("."))[0],s[1]&&(". "+s[1]+".",l=" third-msg"));var m=e.nearestStoreResponse&&e.nearestStoreResponse.hasOwnProperty("destinationPlaceId")?"https://www.google.com/maps/search/?api=1&query=BlueStone+Jewellery&query_place_id="+e.nearestStoreResponse.destinationPlaceId:"https://www.google.com/maps/search/?api=1&query="+e.nearestStoreResponse.latitude+","+e.nearestStoreResponse.longitude,h=$(".store-common-map").html(),v="";e.nearestStoreResponse.inventoryAvailable&&(v=' <a href="javascript:void(0)" class="product-reserve-cta" data-storename="'+e.nearestStoreResponse.storeName+'"><strong>Reserve&nbsp;Now</strong></a>');var f="";$("#sizeList").length&&($("#sizeList li").children(".deliverBy").html(e.defaultDeliveryDate),$("#sizeList li").children(".deliverBy").removeClass("tomorrow")),e.nearestStoreResponse&&e.nearestStoreResponse.storeName?e.nearestStoreResponse.inventoryAvailable?(f='<div class="store-details " > <span class="icon-ion-ios-checkmark"></span> <span class="msg-part-1">'+r+'<strong> @ </strong></span>    <div class="store-name-wrap '+l+'">   <strong class="nowrap store-msg jtooltip-trigger">'+n+"</strong> "+storeTooltipData(m,t,h,e.nearestStoreResponse.storeName,e.nearestStoreResponse.storeAddress,e.nearestStoreResponse.contactNumber)+" </div>"+v+"</div>",d=!0):$(".store-details").length>0?(f='<div class="store-details " > <span class="icon-ion-ios-checkmark" style="color:grey!important"></span> <span class="msg-part-1">'+r+'<strong> @ </strong></span>    <div class="store-name-wrap '+l+'">   <strong class="nowrap store-msg jtooltip-trigger">'+n+"</strong> "+storeTooltipData(m,t,h,e.nearestStoreResponse.storeName,e.nearestStoreResponse.storeAddress,e.nearestStoreResponse.contactNumber)+" </div>"+v+"</div>",d=!0):f="":$(".store-details").length>0&&(f='<div class="store-details"> <span class="msg-part-1">'+r+"</span></div>");var g=e.availableCustomizations;if(Object.keys(g).length>0){var y=!1,b=!1,C="",w=[],k=!1,P=[],S=!1;
52Object.keys(e.availableCustomizations).forEach(function(t){var a="";if(!("00"in(P=g[t].availableSizes)))for(var i in a=Object.keys(P)[0],w=[],P)P[i].availableTomorrow&&w.push(P[i].value);if(g[t].willDeliverTomorrow&&(k=!0,g[t].solitaireColor?(C+="<li ><span>",g[t].metalPurity&&(C=C+'<span id="purity">'+g[t].metalPurity+"</span> kt "),g[t].metalColor&&(C=C+'<span id="metalColor">'+g[t].metalColor+"</span>,"),g[t].solitaireCarat&&(C=C+'<span id="solitaireCarat">'+g[t].solitaireCarat.toFixed(2)+"</span>&nbsp;"),g[t].solitaireClarity&&(C=C+'<span id="clarity">'+g[t].solitaireClarity+"</span>&nbsp;"),g[t].solitaireColor&&(C=C+'<span id="solitaireColor">'+g[t].solitaireColor+"</span> Solitaire"),w.length>0&&(C=C+', Size <span id="available-size" data-key="'+a+'">'+w.toString()+"</span>"),C+='</span>&nbsp;<span onclick="updateCustomization(this.parentElement)"><strong>View&nbsp;Details</strong></span></li>'):(C+="<li><span>",g[t].metalPurity&&(C=C+'<span id="purity">'+g[t].metalPurity+"</span> kt "),g[t].metalColor&&(C=C+'<span id="metalColor">'+g[t].metalColor+"</span>, "),g[t].diamondClarity&&(C=C+'<span id="clarity">'+g[t].diamondClarity+"</span>&nbsp;"),g[t].diamondColor&&(C=C+'<span id="diamondColor">'+g[t].diamondColor+"</span> Diamonds, "),w.length>0&&(C=C+'Size <span id="available-size" data-key="'+a+'">'+w.toString()+"</span>"),C+='</span>&nbsp;<span onclick="updateCustomization(this.parentElement)"><strong>View&nbsp;Details</strong></span></li>')),o==t)for(var i in y=!0,P){var r=$("#ringselect").val();P[i].availableTomorrow?(!g[t].willDeliverTomorrow||""!=r&&P[i].value!=r||(b=!0),$("#sizeList li[data-key="+i+"]").children(".deliverBy").html("Tomorrow"),$("#sizeList li[data-key="+i+"]").children(".deliverBy").addClass("tomorrow")):($("#sizeList li[data-key="+i+"]").children(".deliverBy").html(e.warehouseDeliveryDate),$("#sizeList li[data-key="+i+"]").children(".deliverBy").removeClass("tomorrow")),P[i].value==r&&(S=!0)}}),y?b?(f=(f=f+'<div class="store-delivery" style=""><span class="icon-ion-ios-checkmark"></span> Delivery By <strong class="">Tomorrow</strong> for <span class="strong">Pincode <span class="delivery-pincode">'+p+"</span></span></div>")+'<div class="customization-available" style="display:none"> <p><strong>Need it by Tomorrow?</strong> These customizations are available</p><ul class="customization-list">'+C+"</ul></div>",c=e.nearestStoreResponse.inventoryAvailable&&u||e.nearestStoreResponse.inventoryAvailable?"Store Inventory":"Warehouse Inventory"):(f=S?f+'<div class="store-delivery" style=""><span class="icon-ion-ios-checkmark"></span> Delivery By <strong class="">'+e.warehouseDeliveryDate+'</strong> for <span class="strong">Pincode <span class="delivery-pincode">'+p+"</span></span></div>":f+'<div class="store-delivery" style=""><span class="icon-ion-ios-checkmark"></span> Delivery By <strong class="">'+e.defaultDeliveryDate+'</strong> for <span class="strong">Pincode <span class="delivery-pincode">'+p+"</span></span></div>",k&&(f=f+'<div class="customization-available"> <p><strong>Need it by Tomorrow?</strong> These customizations are available</p><ul class="customization-list">'+C+"</ul></div>",trackGA("BsUI","Informed user about available delivery by tomorrow customizations","DesignId "+productDetails.id))):(f=f+'<div class="store-delivery" style=""><span class="icon-ion-ios-checkmark"></span> Delivery By <strong class="">'+e.defaultDeliveryDate+'</strong> for <span class="strong">Pincode <span class="delivery-pincode">'+p+"</span></span></div> ",k&&(f=f+'<div class="customization-available"> <p><strong>Need it by Tomorrow?</strong> These customizations are available</p><ul class="customization-list">'+C+"</ul></div>",trackGA("BsUI","Informed user about available delivery by tomorrow customizations","DesignId "+productDetails.id)))}else f=f+'<div class="store-delivery" style=""><span class="icon-ion-ios-checkmark"></span> Delivery By <strong class="">'+e.defaultDeliveryDate+'</strong> for <span class="strong">Pincode <span class="delivery-pincode">'+p+"</span></span></div> ";if($("#orderInventory").val(c),$(".store-available .store-inner .store-inner-content").html(f),$(".store-available-wrapper").removeClass("hidden"),$(".store-content").removeClass("hidden"),$(".store-available-wrapper").removeClass("hidden"),e.nearestStoreResponse.inventoryAvailable){$("#cust-details .city").text();var T=$(".store-delivery strong").text();getImageUrl();trackGA("BsUI","Informed user about design availability at store on product page","DesignId "+productDetails.id+" EDD "+T)}a&&(e.nearestStoreResponse.inventoryAvailable&&$(".store-for-pincode-section").removeClass("hidden"),$(".store-on-load-section .store-inner").removeClass("default-screen"),$(".get-nearest-store").removeClass("active"),$(".store-content .get-nearest-store").addClass("active"));var D=$(".store-on-load-section").data("storemsg");$(".store-on-load-section").data("pincode"),$(".store-on-load-section").data("pincodecity"),$(".store-on-load-section").data("pincodetype"),$(".store-on-load-section").data("edd");0;var I=$("#cust-details .city").text(),A=$(".store-delivery strong").text(),x=d?r:" ";isDeliveryByTomorrow(A)&&trackGA("BsUI","Informed user about delivery by tomorrow on product page","DesignId "+productDetails.id),a&&(trackGA("BsUI","Updated pincode against store availability message",D),trackGA("BsUI","New message shown after updating pincode against store availability message",x),window.storePincodeType="User Specified",$(".store-on-load-section").attr("data-pincode",p),$(".store-on-load-section").attr("data-pincodecity",I),$(".store-on-load-section").attr("data-storemsg",r),$(".store-on-load-section").attr("data-pincodetype",window.storePincodeType),$(".store-on-load-section").attr("data-edd",A));var O=e.nearestStoreResponse.contactNumber;O&&(O=O.replace(/\D/g,""));
52var E='<a href="https://api.whatsapp.com/send?phone=+91 '+O+"&text=Hi! Please reserve the design "+productDetails.name+'" class="b-o" title="whatsapp"><i class="icon icon-whatsapp"></i> <span>WhatsApp</span></a>',_='<a href="tel:'+O+'" class="b-f" title="call"><i class="icon icon-phone"></i> <span>Call</span></a>';$("#reserve-popup .store-whatsapp").html(E),$("#reserve-popup .store-phone").html(_)}else;jtooltipControlsForAjaxFunc()}}})}function updateDeliveryDateByPincode(e,t,a,i,o){ndd=getUrlParam("ndd"),a+="&ndd="+ndd;var r=$("#occasionId").val();r&&(a+="&occasionId="+r+"&occasionDelivery="+$("#occasionDeliveryCB").is(":checked"));e&&e.trim()?e.length<6||e.trim().length<6?($(".pin-code-required-error").hide(),$(".invalid-pin-code-error").show(),$(".pin-code-error").hide()):$.ajax({type:"GET",url:t,async:!1,cache:!0,dataType:"json",data:a,success:function(e){if(e.hasError)e.invalid_pincode?o?$(".store-invalid-pin-code").show():($(".invalid-pin-code-error").show(),$(".pin-code-error").hide(),$(".pin-code-required-error").hide()):(o?($(".store-on-load-section .store-available .store-inner .store-inner-content").html("<div >Oops! We do not deliver to your pincode. Please try again with any other Pincode</div>"),$(".store-inner-content").html("Oops! We do not have store in y
52our location."),$(".not-deliverable-pincode").show(),trackGA("BsUI","Oops We do not have store in your location.")):($(".pin-code-error").show(),$(".invalid-pin-code-error").hide(),$(".pin-code-required-error").hide()),$(".store-invalid-pin-code").hide());else{var t=getCustomizationCombinationKey(metalColor,metalPurity,diamondColorClarity,solitaireCarat,solitaireClarity,solitaireColor),a=eddDateFormat(e.designEddDetails[t].skuCodeMap[sizeKey].deliveryDateInfo.expectedDeliveryDate);$(".fetch-edd").text(a),$(".pin-code-error").hide(),$(".pin-code-required-error").hide(),$(".invalid-pin-code-error").hide(),$(".delivery-pincode").html(r),$(".store-invalid-pin-code").hide(),$(".store-delivery").show(),$(".customization-available").show(),$("#cust-details .city").text(e.city),$(".not-deliverable-pincode").hide(),$("#etd .pin").html(r),$(".occasion-edd-wrapper #cust-details h2 .pin").html(r),$("#etd .city").html(e.city),$(".etd-date").html(e.expectedDeliveryDate),$("#isNdd").val(e.ndd),$("#actualExpectedEDD").val(e.expectedDeliveryDate);var r=$(".store-on-load-section .get-nearest-store.active").val();$("#getNearestStore").val();if(updateGoldminePlanOnCustomization(),1!=e.optionAvailable?$("#nddUrlForSize").hide():($("#nddUrlForSize").attr("href",e.nddUrlForBrowsePage),$("#nddUrlForSize").show()),1!=i)showHideSameDayDeliveryMessagePincode(e);else if((1==e.sameDayDelivery||"true"==e.sameDayDelivery)&&$("#ringselect").length>0){var s=document.getElementById("ringselect");$("#nddSizeKey").val(s.value),$("#nddSizeValue").val(s.value)}ShowOccasionDelivery(e.pinEligibleForBSSelf),$("#thirdPartyOccasionMessage").text(e.occasionDeliveryMessage)}}}):($(".pin-code-required-error").show(),$(".invalid-pin-code-error").hide(),$(".pin-code-error").hide())}function openGMSClickToPayPopup(){$.fancybox({wrapCSS:"fancybox-style-4",href:"#goldmineNonLoggedInPopup",afterClose:function(){$(".formError").remove(),resetForm("getPlanIdDetail"),$(".gmsPlanID").parent().removeClass("success"),$(".gms-plan-id-details").addClass("hidden"),$(".plan-not-available").length>0&&$(".plan-not-available").addClass("hidden")},tpl:{closeBtn:'<a title="Close" class="fancybox-item  popup-close" href="javascript:;"><i class="icon-ion-android-close"></i></a>'},helpers:{overlay:{css:{background:"rgba(0, 0, 0, 0.5)"}}}})}function voucherGmsStart(){trackGA("GMS","Clicked Start GMS","Discount Voucher Start")}function voucherPopupEvents(){trackGA("GMS","Discount Voucher","Know More Click")}function getEDDForCOD(){$(".nc-order-summary .edd-wrapper .edd-row .date").hide(),$(".nc-order-summary .edd-wrapper .edd-row .date-cod").show()}function getEDDForPrepaid(){$(".nc-order-summary .edd-wrapper .edd-row .date").show(),$(".nc-order-summary .edd-wrapper .edd-row .date-cod").hide()}$(document).ready(function(){gmsGaEvents(),$(window).scroll(function(){gmsGaEvents()}),$(".bp-store-widget").click(function(){trackGA("Clicked Trust Element","Trust Elements on Browse Page","Store")}),"goldMine"===getUrlParam("cart")&&$("body").addClass("gms-success-page"),$("#residentPopup .btn").click(function(){$('input[id="indian"]').prop("checked",!0)})}),$(window).load(function(){var e=GLOBAL_CTX+"/resources/themes/bluestone/js/modernizr-form.js";loadScriptAsync(e,function(){if(!Modernizr.inputtypes.date){$.datepicker.setDefaults({dateFormat:"dd-mm-yy",changeMonth:!0,changeYear:!0,yearRange:"-100:+0"});var e=$("input[type='date']");e.prop("type","text"),e.datepicker({maxDate:"@maxDate",onSelect:function(){e.parent().hasClass("error")&&(e.parent().removeClass("error"),e.parent().find("ul.messages").remove())}})}})}),$(document).ready(function(){storeUser&&storeInventoryUtil.init()});var storeInventoryUtil={openSwipeSection:function(){this.swipeSection.classList.toggle("open")},getAvailableInventory:function(e,t,a){var i=this;$.ajax({type:"POST",url:GLOBAL_CTX+"/physical-store/availableinventory",dataType:"json",data:"designId="+e+"&customizationId="+t+"&sizeSelected="+a,success:function(e){var t="No inventory available";e.hasError?t=e.errorMessage:((e.sameSkuInventory||e.sameCustomizationInventory||e.sameDesignInventory)&&(t='<tr class="inventory-item" bgcolor="pink"><th class="inventory-id">Inventory Id</th><th class="metal-wt">Metal Wt</th><th class="dia-wt">Dia Wt</th><th class="stone-wt">Stone WT</th><th class="preset-sol-wt">PreSet Sol Wt</th><th class="sku">SKU</th><th class="mrp">MRP</th><th class="sp">SP</th><th align="right">Action</th></tr>'),e.sameSkuInventory&&(t=i.getBody(e.sameSkuInventory,t,"sameSkuInventory")),e.sameCustomizationInventory&&(t=i.getBody(e.sameCustomizationInventory,t,"sameCustomizationInventory")),e.sameDesignInventory&&(t=i.getBody(e.sameDesignInventory,t,"sameDesignInventory"))),$("#availableInventoryTable tbody").html(t)},error:function(e){}})},getBody:function(e,t,a){var i=this.getCurrentList();for(var o in e){var r="",s="Add",n=e[o];i.indexOf(n.inventoryId+"")>-1&&(r="added",s="Added"),t=t+'<tr class="inventory-item '+a+'"><td class="inventory-id">'+n.inventoryId+'</td><td class="metal-wt">'+n.metalWt+'</td><td class="dia-wt">'+n.diaWt+'</td><td class="stone-wt">'+n.stoneWt+'</td><td class="preset-sol-wt">'+n.preSetSolitaireWt+'</td><td class="sku">'+n.skuCode+'</td><td class="mrp">'+n.price.mrp+'</td><td class="sp">'+n.price.sp+'</td><td>
52<span class="add-inventory id-'+n.inventoryId+" btn-rounded "+r+'" data-inventoryid="'+n.inventoryId+'" data-inventoryType="'+n.inventoryItemType+'" data-refernceNumber="'+n.referenceNumber+'">'+s+"<span></td></tr>"}return t},addInventory:function(e,t,a){if(a)(i=this.getCurrentList()).push(e),localStorage.setItem("addedInventory",JSON.stringify(i)),this.renderUI();else if(!t.target.classList.contains("added")){var i;(i=this.getCurrentList()).push(e),localStorage.setItem("addedInventory",JSON.stringify(i)),$(t.target).hasClass("manual")||(t.target.innerHTML="Added",t.target.classList.add("added")),this.renderUI()}},removeInventory:function(e,t){var a=this.getCurrentList(),i=a.indexOf(e);i>-1&&(a.splice(i,1),localStorage.setItem("addedInventory",JSON.stringify(a))),this.updateAddButton(e,!0),this.renderUI()},showAddedInventoryList:function(){var e=this.getCurrentList(),t="",a=this;return e.length>0?(e.forEach(function(e){t+='<div class="btn-rounded remove-inventory" data-inventoryid="'+e+'">'+e+" X </div>",setTimeout(function(){a.updateAddButton(e,!1)},100)}),this.proceedBtn.classList.remove("hidden")):(t="Your added products will appear here",this.proceedBtn&&this.proceedBtn.classList.add("hidden")),t},getCurrentList:function(){return JSON.parse(localStorage.getItem("addedInventory"))||[]},updateAddButton:function(e,t){var a=document.querySelector(".id-"+e);a&&(t?(a.innerHTML="Add",a.classList.remove("added")):(a.innerHTML="Added",a.classList.add("added")))},validateInventory:function(e){var t=!1;return $.ajax({type:"POST",url:GLOBAL_CTX+"/physical-store/validate-inventory",dataType:"json",async:!1,data:"inventoryId="+e,success:function(e){e.hasError?(t=!1,$(".add-inventory-section #voucher-message").remove(),$(".add-inventory-section").append('<div id="voucher-message" class="msg-style-2 error"><div class="v-msg">'+e.errorMsg+"</div></div>")):(t=!0,$("#voucher-message").remove())},error:function(e){t=!1,$(".add-inventory-section #voucher-message").remove(),$(".add-inventory-section").append('<div id="voucher-message" class="msg-style-2 error"><div class="v-msg">'+e.statusText+"</div></div>")}}),t},cacheDOM:function(){this.swipeTitle=document.getElementById("swipeTitle"),this.swipeSection=document.getElementById("swipeSection"),this.minimize=document.getElementById("minimize"),this.addedSection=document.querySelector(".added-list-wrap"),this.proceedBtn=document.querySelector(".proceed-btn"),this.customInventory=document.getElementById("addInventoryInput")},eventListener:function(){var e=this,t=document.querySelector("body");this.swipeTitle.addEventListener("click",function(){if(e.openSwipeSection(),"product"===PAGE_TYPE&&e.swipeSection.classList.contains("open")){var t=$("#designId").val(),a=$("#customizationId").val(),i=$("#sizeSelected").val()||"";e.getAvailableInventory(t,a,i)}e.renderUI()}),this.proceedBtn.addEventListener("click",function(){var e=GLOBAL_CTX+"/store-customer-details.html";location.href=e}),t.addEventListener("click",function(t){if(t.target.classList.contains("add-inventory")){var a=t.target.getAttribute("data-inventoryid")||$(t.target).parents(".add-inventory-section").find("input").val(),i=t.target.getAttribute("data-inventorytype"),o=t.target.getAttribute("data-referncenumber"),r=e.validateInventory(a);"BLOCKED"===i?posConfirmationPopup(o,a,t):a&&r&&e.addInventory(a,t)}else if(t.target.classList.contains("remove-inventory")){a=t.target.getAttribute("data-inventoryid");e.removeInventory(a,t)}})},renderUI:function(){htmlData=this.showAddedInventoryList(),this.addedSection.innerHTML=htmlData},init:function(){this.cacheDOM(),this.eventListener()}};function showAddressErrorIfAny(){$("#addressSection").children().each(function(e){$(this).hasClass("error")&&$("#toggleSwitch").trigger("click")})}function openMTOPopup(){var e=document.getElementById("deliveryPincodeMto").innerHTML,t=getSelectedSize();void 0===t&&(t="");var a=getCustomizationCode(),i=$("#select-gold .color-val").html();i||(i=defaultCustomizationColor);var o=$('input[type="radio"][name="metalPurity-'+i+'"]:checked').val()||window.metalPurity,r=$('input[type="radio"][name="diamondQuality"]:checked').val()||$("#qualityselect").val()||window.diamondColorClarity,s="";r&&(s=r.replace(" ",""));var n=!1;1==$("#engravingApplied:checked").length&&(n=!0);var l=$("#caratselect").val()||"",d=$(".select-size.clarity-wrapper #clarityselect").val()||"",c=$(".select-size.color-wrapper #colorselect").val()||"",u=GLOBAL_CTX+"/deliverydate/design/get",p="ajax=true&customizationId="+a+"&pincode="+e+"&designId="+designId+"&size="+t+"&engravingApplied="+n;ndd=getUrlParam("ndd"),p+="&ndd="+ndd,$.ajax({type:"GET",url:u,cache:!0,data:p,dataType:"json",success:function(e){var t=getCustomizationCombinationKey(i,o,s,l,d,c),a=e.designEddDetails[t].skuCodeMap[sizeKey].deliveryDateInfo.expectedDeliveryDate,r=new Date(a);$(".fetch-edd-mto").text(DayAsString(r.getDay())+", "+monthAsShortString(r.getMonth())+" "+r.getDate())},error:function(e){}}),commonFancyBox({wrapCSS:"fancybox-style-4",href:"#mtoPopup",resetPopup:resetMTOPopup})}function handleMTOOrder(e){document.getElementById("customizationCode").value=getCustomizationCode(),"1"===isSliderProduct?document.getElementById("mto-size").value=$("#sizeSelected").val():document.getElementById("mto-size").value=getSelectedSize();var t=$("#mtoForm").serialize();if(!validateForm("mtoForm"))return!1;$(e.target).addClass("loading"),$.ajax({type:"POST",url:GLOBAL_CTX+"/mto/place/",cache:!0,data:t,dataType:"json",success:function(e){animateSuccessOrErrorMsg(e)},error:function(e){}})}function animateSuccessOrErrorMsg(e){$(".mto-content").hide(),e.hasError?($(".mto-error").fadeIn(),$(".mto-text").text(e.message)):($(".mto-success").fadeIn(),$(".mto-text").text(e.message),$(".mtoDownloadLink").attr("href",GLOBAL_CTX+"/mto/downloadPDF/"+e.referenceCode))}function resetMTOPopup(){$(".formError").remove(),$(".mto-success").fadeOut(),$(".mto-error").fadeOut(),$(".mto-content").show(),$("#placeMTOOrder").removeClass("loading"),resetForm("mtoForm")}function commonFancyBox(e){$.fancybox({width:e.width,wrapCSS:e.wrapCSS,href:e.href,afterClose:function(){"function"==typeof e.resetPopup&&e.resetPopup()},afterLoad:function(){"function"==typeof e.afterLoad&&e.afterLoad()},tpl:{closeBtn:'<a title="Close" class="fancybox-item  popup-close" href="javascript:;"><i class="icon-ion-android-close"></i></a>'},helpers:{overlay:{css:{background:"rgba(0, 0, 0, 0.5)"}}}})}function getDropdownSelectedOptionValue(e,t){var a=$(e+" option:selected").text();$(t).val(a)}function posConfirmationPopup(e,t,a){$("#posConfimationPopup #mtoReference").text(e),commonFancyBox({width:450,wrapCSS:"fancybox-style-4",href:"#posConfimationPopup",resetPopup:function(){}}
52),$("#posConfimationPopup .btn-yes").click(function(){storeInventoryUtil.addInventory(t,a),$.fancybox.close()}),$("#posConfimationPopup .btn-no").click(function(){$.fancybox.close()})}function emptyObject(e){Object.keys(e).forEach(function(t){e.hasOwnProperty(t)&&delete e[t]})}function getNotificationSuccessHtml(e){return'<div class="success-container"> <span class="icon"></span><span>'+e+"</span></div>"}function getNotificationSuccessHtmlNew(e){return'<div class="col-xs-12 msg-wrapper"><div class="success-wrap"><i class="icon-ion-ios-checkmark-outline"></i><span>'+e+'</span><i class="icon-ion-ios-close-empty close" onclick="closeNotifications()"></i></div></div>'}function getNotificationErrorHtmlNew(e){return'<div class="col-xs-12 msg-wrapper"><div class="error-wrap"> <i class="icon-not-found"></i><span>'+e+'</span><i class="icon-ion-ios-close-empty close" onclick="closeNotifications()"></i></div></div>'}function closeNotifications(){$(".notifications").html("").fadeOut(),$(".notifications-otp").html("").fadeOut()}function openCustomerEmailTooltip(e){$(e).parents("#edit-phone-wrapper").find(".jtooltip").addClass("active"),$("#edit-phone-wrapper").append("<div class='customerEmail-tooltip-overlay'></div>")}function closeCustomerEmailTooltip(){$(".jtooltip").removeClass("active"),$(".customerEmail-tooltip-overlay").remove()}function customerEmailListTooltipData(e){var t="";t+='<div class="tooltip-style-4 jtooltip">',t+="<div class='title'>You might want to use any of these emails. <span class='close icon-ion-android-close' onclick='closeStoreTooltip()'></span></div>",t+="<div class='content-wrap'>",t+="<ul>";for(var a=0;a<e.length;a++)t+="<li>"+e[a]+"</li>";return t+="</ul>",t+="</div>",t+="</div>"}function checkAndOpenGCPopupPOS(e){resetGiftCardPopup();var t=$("#inventoryIds").val(),a=e.target.value;if(""!==a){var i=giftCardUtil.getGiftCardProperties(e,a,t);i.hasError?i.hasError&&""!==i.message&&$(".notifications").html(getNotificationErrorHtmlNew(i.message)).fadeIn():i.isGiftCard&&($("#gcCode").val(a),openGiftCardPopup(i))}}function enableFirstPaymentOption(){$(".formError").remove(),$("#payment-details>div").hide().animate({top:0,opacity:0},500,"easeInOutCubic").dequeue(),$(".payment_tab").removeClass("selected"),$("#payment-details .payment_detail:first").show().animate({top:-5,opacity:1},500,"easeInOutCubic").dequeue(),$("#payment-tabs .payment_tab:first").addClass("selected"),$("#payment-details .payment_detail:first").addClass("paymentSelectedTab").siblings().removeClass("paymentSelectedTab")}function updateTAHandStoreBrowseButtons(e,t,a){var i=getLocalStorageWithExpiry("isPincodeUpdated"),o=pincodePopupData(i,e.toUpperCase());!getLocalStorageWithExpiry("isPincodeUpdated")||"browse"==e||a?openStoreAndTahPincode(e.toUpperCase(),o.description):loadFilterDesign(e.toUpperCase())}function openStoreAndTahPincode(e,t){commonFancyBox({width:450,wrapCSS:"fancybox-style-4",href:"#tahAndStoreBrowsePincodePopup",resetPopup:function(){$(".invalid-pincode").addClass("hidden"),$(".invalid-pincode #pincode-error").text("")},afterLoad:function(){$("#tahAndStoreBrowsePincodePopup").find(".btn").attr("onclick",'validateTAHandStorePincode("'+e+'")'),$(".store-tah-pincode-msg").text(t)}})}function openCheckoutPincodePopup(){pinChangeEvent(),commonFancyBox({width:450,wrapCSS:"fancybox-style-4",href:"#pincodeUpdatePopup",resetPopup:function(){$(".invalid-pincode").addClass("hidden"),$(".invalid-pincode #pincode-error").text("")}})}function validateTAHandStorePincode(e){var t=$("#userPincodeStoreTAH").val();if(!validateForm("StoreTahPincodeValidation"))return!1;""!=t&&$.ajax({type:"GET",url:GLOBAL_CTX+"/physical-store/store-and-tahhub-details",async:!1,cache:!0,dataType:"json",data:"pincode="+t,success:function(a){if(a){if(a.message)return $(".invalid-pincode").removeClass("hidden"),$("#pincode-error").text("Invalid Pincode"),!1;setLocalStorageWithExpiry("isPincodeUpdated",!0,1),setLocalStorageWithExpiry("isTAH",a.hasTAH,1),setLocalStorageWithExpiry("isStores",a.hasStores,1),setLocalStorageWithExpiry("tahHubId",a.wid,1),setLocalStorageWithExpiry("storeIds",a.sid,1),$("#browsePincodeValue").text(t),loadFilterDesign(e)}}})}function addToTAHCartProduct(){$("#tah_block_product").submit()}function addCustomizationToVideoCallCart(e,t,a){var i="customizationId="+e+"&cartType=videoCallTah";$.ajax({type:"POST",url:GLOBAL_CTX+"/checkout/cart/add-to-tah-cart",async:!1,dataType:"json",data:i,success:function(e){activeVideoCallCount=e.activeVideoCallCount,$("#snackbarwrapper").html(toastUI(e.message)),setTimeout(function(){$("#snackbar").removeClass("show")},3e3),"400"===e.status&&(t=!1),$("#tahVCCartMessage").html(e.videoCallCartMessage),document.querySelector("#tahVCCartMessage")&&(document.querySelector("#tahVCCartMessage").dataset.tahvccartcount=activeVideoCallCount),setTimeout(function(){$(".tah-vc-sticky-wrapper").removeClass("hidden")},2e3)},error:function(e){}}),tahAndVcEvents(a,e),t&&(window.location.href=GLOBAL_CTX+"/tah?cartType=videoCallTah")}function addCustomizationToTAHCart(e){var t="customizationId="+e+"&cartType=tah";$.ajax({type:"POST",url:GLOBAL_CTX+"/checkout/cart/add-to-tah-cart",async:!1,dataType:"json",data:t,success:function(e){tahCartCount=e.activeTAHCount,$("#snackbarwrapper").html(toastUI(e.message)),setTimeout(function(){$("#snackbar").removeClass("show")},3e3),$("#tahCartMessage").html(e.tahCartMessage),document.querySelector("#tahCartMessage")&&(document.querySelector("#tahCartMessage").dataset.tahcartcount=tahCartCount),setTimeout(function(){$(".tah-sticky-wrapper").removeClass("hidden")},2e3)},error:function(e){}})}function getSimilarDesigns(e){$.ajax({type:"GET",url:GLOBAL_CTX+"/similar-design/design-group/"+designId,async:!0,cache:!1,dataType:"json",success:function(t){if(!t.hasError&&Object.keys(t.similarDesigns).length>0&&t.similarDesigns.designItemList.length>0){var a=getHorizontalListDesignsHTML(t.similarDesigns.designItemList,e,"Similar Designs");$("#similarDesignsData").html(a)}},error:function(e){}})}function getMatchingSetData(e){$.ajax({type:"GET",url:GLOBAL_CTX+"/matching-set/design-group/"+designId,async:!0,cache:!1,dataType:"json",success:function(t){if(Object.keys(t.designGroup).length>0&&t.designGroup.designItemList.length>1){var a=getHorizontalListDesignsHTML(t.designGroup.designItemList,e,t.designGroup.displayTitle||"Pair it With");$("#matchingSetData").html(a)}},error:function(e){}})}function getHorizontalListDesignsHTML(e,t,a){var i="";return i+='<div class="head"><h3 class="title">'+a+"</h3></div>",i+='<div class="desing-box">',i+='<div class="design-small-box">
52',shuffle(e).forEach(function(e){e.designItem.designId!==t&&(i+='<div class="containt-box" data-designid="'+e.designItem.designId+'" data-designname="'+e.designItem.designName+'" data-category="">',i+='<a href="/'+e.designItem.productPageUrl+'">',i+='<img src="'+e.designItem.imageUrl+'" width="219" height="219">',i+="</a>",i+='<div class="text-box">',i+='<div class="price-box">',i+='<div class="price-text">'+formatPrice(e.designItem.discountedPrice)+"</div>",e.designItem.price>e.designItem.discountedPrice&&(i+='<div class="strike-price">'+formatPrice(e.designItem.price)+"</div>"),i+="</div>",e.designItem.price>e.designItem.discountedPrice&&(i+='<div class="save-price">',i+="<div>Save&nbsp;&nbsp;"+formatPrice(e.designItem.price-e.designItem.discountedPrice)+"</div>",i+="</div>"),i+="</div>",i+="</div>")}),i+="</div>",i+="</div>"}function shuffle(e){for(var t=e.length-1;t>0;t--){var a=Math.floor(Math.random()*(t+1)),i=e[t];e[t]=e[a],e[a]=i}return e}function showSendOTPButton(e){(""==$("#email").val()||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test($("#email").val()))&&""!==$("#mobile").val()&&10===$("#mobile").val().length&&/^[0-9]*$/.test($("#mobile").val())&&$("#sizer-send-otp-btn").removeClass("hidden")}function sendOTPProductSizer(e,t){if(e.preventDefault(),""===$("#mobile").val()||10!==$("#mobile").val().length||!/^[0-9]*$/.test($("#mobile").val())||""!==$("#email").val()&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test($("#email").val()))return $("#otp-message").removeClass("hidden"),$("#otp-message").text("Please enter valid email and mobile number to send OTP"),$("#otp-message").css("color","red"),void setTimeout(function(){$("#otp-message").text(""),$("#otp-message").addClass("hidden"),$("#otp-message").css("color","")},5e3);var a=$(".sizer-email").val(),i=$(".sizer-mobile").val(),o=otpUtil.sendOTP("",a,"phoneverification",i);if(o.hasError)$("#otp-message").removeClass("hidden"),$("#otp-message").text(o.errorMsg),$("#otp-message").css("color","red"),setTimeout(function(){$("#otp-message").text(""),$("#otp-message").addClass("hidden"),$("#otp-message").css("color","")},5e3);else{$("#otp-field").removeClass("hidden"),$(".otp-timer-block-sizer").removeClass("hidden"),$("#sizer-send-otp-btn").addClass("hidden"),$("#otpId").val(o.otpId),$("#mobile").attr("disabled","disabled"),$("#email").attr("disabled","disabled"),$("#otp-message").addClass("hidden");var r=$("#otp-count-down-sizer");window.countdownTimerRef=countDownTimer(r,60,function(){$(".otp-timer-block-sizer").addClass("hidden"),$("#sizer-resend-otp-btn").removeClass("hidden"),$("#otp-count-down-sizer").text(60)}),$("#otp-message").removeClass("hidden"),$("#otp-message").text("OTP sent successfully!"),$("#otp-message").css("color","green"),setTimeout(function(){$("#otp-message").text(""),$("#otp-message").addClass("hidden"),$("#otp-message").css("color","")},5e3)}}function resendOTPProductSizer(e){if(e.preventDefault(),""===$("#mobile").val()||10!==$("#mobile").val().length||!/^[0-9]*$/.test($("#mobile").val())||""!==$("#email").val()&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test($("#email").val()))return $("#otp-message").removeClass("hidden"),$("#otp-message").text("Please enter valid email and mobile number to send OTP"),$("#otp-message").css("color","red"),void setTimeout(function(){$("#otp-message").text(""),$("#otp-message").addClass("hidden"),$("#otp-message").css("color","")},5e3);var t=$("#otpId").val(),a=$(".sizer-email").val(),i=$(".sizer-mobile").val();otpUtil.sendOTP(t,a,"phoneverification",i),$("#sizer-resend-otp-btn").addClass("hidden"),$(".otp-timer-block-sizer").removeClass("hidden");var o=$("#otp-count-down-sizer");window.countdownTimerRef=countDownTimer(o,60,function(){$(".otp-timer-block-sizer").addClass("hidden"),$("#sizer-resend-otp-btn").removeClass("hidden"),$("#otp-count-down-sizer").text(60)}),$("#otp-message").removeClass("hidden"),$("#otp-message").text("OTP resent successfully!"),$("#otp-message").css("color","green"),setTimeout(function(){$("#otp-message").text(""),$("#otp-message").addClass("hidden"),$("#otp-message").css("color","")},5e3)}function verifyOTPProductSizer(e){e.preventDefault();var t=$("#otpId").val(),a=$("#otp").val();
52if($("#otp").val(""),""==a||!/^[0-9]+$/.test(a)||a.length<4)return $("#otp-message").removeClass("hidden"),$("#otp-message").text("Please enter a valid OTP"),$("#otp-message").css("color","green"),void setTimeout(function(){$("#otp-message").text(""),$("#otp-message").addClass("hidden"),$("#otp-message").css("color","")},5e3);var i=otpUtil.verifyOTP("phoneverification",t,a);i.hasError?($("#otp-message").removeClass("hidden"),$("#otp-message").text(i.errorMsg),$("#otp-message").css("color","red"),setTimeout(function(){$("#otp-message").text(""),$("#otp-message").addClass("hidden"),$("#otp-message").css("color","")},5e3)):(window.isOtpVerified=i.isOtpVerified,i.isOtpVerified?($("#otp-message").removeClass("hidden"),$("#otp-message").text(i.message),$("#otp-message").css("color","green"),$("#sizer-submit-btn").removeAttr("disabled"),$("#sizer-submit-btn").removeClass("btn-disabled"),$("#sizer-resend-otp-btn").addClass("hidden"),$(".otp-timer-block-sizer").addClass("hidden"),$("#otp-field").addClass("hidden"),$("#sizer-checkmark").removeClass("hidden"),clearTimeout(window.countdownTimerRef),setTimeout(function(){$("#otp-message").text(""),$("#otp-message").addClass("hidden"),$("#otp-message").css("color","")},5e3)):($("#otp-message").removeClass("hidden"),$("#otp-message").text("OTP not verified! Please reload the page and try again."),$("#otp-message").css("color","red"),setTimeout(function(){$("#otp-message").text(""),$("#otp-message").addClass("hidden"),$("#otp-message").css("color","")},5e3)))}function clearSizerPopupData(){$("#name").val(""),$("#email").val(""),$("#mobile").val(""),$("#otp").val(""),$("#address").val(""),$("#street").val(""),$("#locality").val(""),$("#landmark").val(""),$("#pincode").val(""),$("#city").val(""),$("#state").val(""),$("#sizer-send-otp-btn").addClass("hidden"),$("#otpId").val(""),$("#otp-message").text(""),$("#otp-message").addClass("hidden"),$("#otp-message").css("color",""),$("#otp-count-down-sizer").text(60),$("#sizer-resend-otp-btn").addClass("hidden"),$(".otp-timer-block-sizer").addClass("hidden"),$("#otp-field").addClass("hidden"),$("#sizer-submit-btn").attr("disabled","disabled"),$("#sizer-submit-btn").addClass("btn-disabled"),$("#email").removeAttr("disabled"),$("#mobile").removeAttr("disabled"),$("#sizer-checkmark").addClass("hidden"),clearTimeout(window.countdownTimerRef),window.isOtpVerified=!1}function handlePinelabsPopupClose(){$.fancybox.close(),$(".pine-labs-error").addClass("hidden"),$(".pine-labs-error #otp-error").html("")}function openOtpPopup(){commonFancyBox({width:300,wrapCSS:"fancybox-style-4",href:"#tahOtpPopup",resetPopup:function(){},afterLoad:function(){$("#tahOtpPopup").find(".btn").attr("onclick","verifyTahOTP(event)")}})}function showTAHAddress(e){$("#tahAddress").addClass("opened"),$(e.target).remove();const t={_eventId:"tah_bookslot_page_next_clicked"};t.date_selected=$("#try_date_pd").val(),t.time_selected=$("#try_time_pd").val(),processServerEvent(t)}function handleYesOrNoBsCashWarning(e){"YES"===e.target.value?($("#useBsWallet").attr("disabled",!0),$.fancybox.close(),window.payWithoutBsCash=!0):($.fancybox.close(),window.payWithoutBsCash=!1)}function handleFilterOptionChange(e,t){var a=[],i=[],o="";if($(".filterDisplayName").length>0&&$(".vert-filters .form-item.selected").each(function(){a.push($(this).find(".filter-item").data("name")),i=a.slice()}),$(e).parent().toggleClass("selected"),$(e).parent().hasClass("selected"))i.push($(e).data("name"));else{var r=i.indexOf($(e).data("name"));r>-1&&i.splice(r,1)}var s=$(e).data("url");if(s.includes("search"))var n=s.replace("search?",""),l=getSearchFilters({tags_to_sort_filters:a.join("-"),selected_tags:i.join("-").replaceAll(" ","+"),url_query_string:n},"");else if("store-catalog"===PAGE_TYPE){l=getStoreCatalogFilters({tags_to_sort_filters:a.join("-"),selected_tags:i.join("-").replaceAll(" ","+"),urlPrefix:extractStoresCatalogUrlPrefix(window.location.href)},"");s.includes("?")||(o=window.location.search)}else{l=getBrowseFilters({tags_to_sort_filters:a.join("-"),selected_tags:i.join("-").replaceAll(" ","+")},"");s.includes("?")||(o=window.location.search)}var d=getFiltersHTML(JSON.parse(l)),c=s+o;$(".vert-filters .inner").html(d),clearTimeout(window.filterClickTimeoutId),window.filterClickTimeoutId=setTimeout(function(){$(e).parent().hasClass("selected")?trackGA("BsUI","FilterClick",$(e).data("name")+" filter selected"):trackGA("BsUI","FilterClick",$(e).data("name")+" filter removed"),handleStoreQueryParamsForFilter(c)},2e3)}function getBrowseFilters(e){return $.ajax({type:"GET",url:PAGE_BASE_URL+"/page/browse-filters",async:!1,cache:!1,dataType:"json",data:e,success:function(e){e.hasError},error:function(e){}}).responseText}function getSearchFilters(e){return $.ajax({type:"GET",url:PAGE_BASE_URL+"/page/search-filters",async:!1,cache:!1,dataType:"json",data:e,success:function(e){e.hasError},error:function(e){}}).responseText}function getStoreCatalogFilters(e){return $.ajax({type:"GET",url:PAGE_BASE_URL+"/page/store-browse-filters",async:!1,cache:!1,dataType:"json",data:e,success:function(e){e.hasError},error:function(e){}}).responseText}function extractStoresCatalogUrlPrefix(e){var t=e.match(/stores\/(.*?)\/catalog/);return t?t[1]:null}function getFiltersHTML(e){var t="";return e&&e.length>0&&e.forEach(function(e,a){t+='<div class="filter-block top-filter-blocks">',t+='<section class="block" id="'+e.category+'-form" data-itemcategory="'+e.category+'">',t+='<span class="title"> <span>'+e.category+"</span> </span>",e.filterItemList&&e.filterItemList.length>0&&e.filterItemList.forEach(function(i,o){t+='<div class="form-item '+(i.selected?"selected":"")+'">',t+='<span for="filterCheckbox-'+a+'" class="filter-item prcs-dlh" data-p="'+cipherURL(i.url.substring(1))+'" data-url="'+cipherURL(i.url.substring(1))+'" data-name="'+i.name.toLowerCase()+'" data-tagcategory="'+e.category+'" data-displayname="'+i.displayName+'">',t+='<span class="icon icon-ion-ios-checkmark-empty"></span>',t+='<input class="hidden" id="filterCheckbox-'+a+'" type="checkbox" name="'+e.displayName+'" value="'+i.displayName+'"> '+i.displayName+' <span class="items-count">('+i.count+")</span> </span>",t+="</div>"}),t+="</section>",e.filterItemList&&e.filterItemList.length>6&&(t+='<a href="javascript:void(0)" class="view-more" onclick="viewMoreFilters($(this))" data-tagcat="'+e.category+'">+ '+(e.filterItemList.length-6)+" more</a>"),t+="</div>"}),t}function viewMoreFilters(e){var t=$(e).data("tagcat");t=t.replace(/\s/g,""),$("#"+t+"-form").addClass("full-view"),$(e).remove()}function cipherURL(e){return e.replace(/\/|.html/g,function(e){return"/"===e?"@":".html"==e?"!!":void 0})}function deCipherURL(e){return e.replace(/@|!!/g,function(e){return"@"===e?"/":"!!"===e?".html":void 0})}function sendOTPToCustomer(e,t){var a=$("#email").val(),i=$("#mobileNumber").val();if(i&&a){$("#sendOTPButton").attr("disabled","disabled");var o=otpUtilNew.sendOTP(e,t,"","",i,a);return $("#OTPVerificationSection").show(),$("#CustomerInfoSection").hide(),$("#email").removeAttr("disabled"),$("#mobileNumber").removeAttr("disabled"),o.hasError?($(".notifications-otp").html(getNotificationErrorHtmlNew("Error while sending OTP : "+o.errorStr+" : Please Re-send OTP to proceed")),$("#reSendOTPButton").show(),$("#verifyOTPButton").hide(),$("#inputOTP").attr("disabled","disabled")):($("#otpId").attr("value",o.otpId),$(".notifications-otp").html(getNotificationSuccessHtmlNew("OTP sent successfully. Please verify OTP."))),!0}$(".notifications-otp").html(getNotificationErrorHtmlNew("Please enter both values to proceed"))}function reSendOTPToCustomer(e){var t=$("#email").val(),a=$("#mobileNumber").val();$("#otpId").val();$("#reSendOTPButton").attr("disabled","disabled");var i=otpUtilNew.sendOTP(event,e,"","",a,t);return i.hasError?($(".notifications-otp").html(getNotificationErrorHtmlNew("Error while re-sending OTP : "+i.errorStr+" : Please attempt again")),$("#reSendOTPButton").removeAttr("disabled"),$("#reSendOTPButton").show(),$("#verifyOTPButton").hide()):($(".notifications-otp").html(getNotificationSuccessHtmlNew("OTP sent successfully. Please retry verification.")),$("#inputOTP").removeAttr("disabled"),$("#reSendOTPButton").hide(),$("#verifyOTPButton").show(),$("#otpId").val(i.otpId),$("#verifyOTPButton").removeAttr("disabled")),!0}
52function verifyCustomerWithOTP(){var e=$("#email").val(),t=$("#mobileNumber").val(),a=$("#inputOTP").val();$("#otpId").val();if(a){$("#verifyOTPButton").attr("disabled","disabled"),$("#inputOTP").attr("disabled","disabled");var i=otpUtilNew.verifyOTP(a,"");return window.isOtpVerified=i.isOtpVerified,!i.hasError&&i.isOtpVerified?($(".notifications-otp").html(getNotificationSuccessHtmlNew("OTP Verified successfully.")),$("#OTPVerificationSection").hide(),$("#storeOrderFormSection").show(),$("#soEmail").val(e),$("#soMobileNumber").val(t),$("#emailDiv").addClass("focused"),$("#contactDiv").addClass("focused"),storeCustomerDetailsUtil.populatePineLabsTransactions(window.pineLabsTransactions)):($("#reSendOTPButton").show(),$("#verifyOTPButton").hide(),$("#reSendOTPButton").removeAttr("disabled"),$("#otpId").attr("value",i.otpId),$(".notifications-otp").html(getNotificationErrorHtml(i.errorMsg))),!0}$(".notifications-otp").html(getNotificationErrorHtmlNew("No value entered !!! Please enter OTP to verify."))}function checkVerifiedOTPValidity(){var e=$("#mobileNumber").val();return $.ajax({type:"GET",url:GLOBAL_CTX+"/admin/physical-store/validate-verified-otp/"+e,dataType:"json",data:"",async:!0,success:function(e){e.hasError?$(".notifications-otp").html(getNotificationErrorHtml(e.errorMessage)):e.isVerifiedOTPValid?($(".notifications-otp").html(getNotificationSuccessHtmlNew("Customer already verified. Proceed to fill the form.")),$("#otpId").val(e.otpId),$("#loadFormButton").show()):$("#sendOTPButton").show()}}),!0}function loadFormForVerifiedCustomer(){var e=$("#email").val(),t=$("#mobileNumber").val();return window.isOtpVerified=!0,$("#CustomerInfoSection").hide(),$("#storeOrderFormSection").show(),$("#email").removeAttr("disabled"),$("#mobileNumber").removeAttr("disabled"),$("#soEmail").val(e),$("#soMobileNumber").val(t),$("#emailDiv").addClass("focused"),$("#contactDiv").addClass("focused"),storeCustomerDetailsUtil.populatePineLabsTransactions(window.pineLabsTransactions),!0}function getEDDWidgetHTML(e,t){var a="";return a+='<div id="eddWidget">',t>1&&(a+='<div class="edd-row edd-label">',a+='<div class="row">',a+='<div class="col-xs-3 col-sm-2 col-md-2 col-lg-2 text-center">',a+='<span class="cs edd-icon"></span>',a+="</div>",a+='<div class="col-xs-6 col-sm-7 col-md-7 col-lg-7">',a+='<span class="label">Estimated delivery</span>',a+="</div>",a+='<div class="col-xs-3 text-right">',a+='<div class="edd-view"> View </div>',a+="</div>",a+="</div>",a+="</div>"),t>1&&(a+='<div class="bs-tt bs-tt-tr bs-tt-blue bs-tt-sq">',a+='<div class="edd-tt-wrap">'),e.map(function(e){a+='<div class="edd-row">',a+='<div class="row">',a+='<div class="col-xs-3 col-sm-3 col-md-3 col-lg-2 text-center">',a+='<img src="'+e.imageUrl+'" width="45" height="45" alt="'+e.name+'">',a+="</div>",t>1?(a+='<div class="col-xs-9 col-sm-9 col-md-9 col-lg-10 date-wrap">',a+='<span class="label">'+e.name+"</span>",a+='<span class="date">by <strong>'+e.skuCodeMap[Object.keys(e.skuCodeMap)[0]].deliveryDateInfo.expectedDeliveryDate+"</strong></span>",a+="</div>"):(a+='<div class="col-xs-9 col-sm-9 col-md-9 col-lg-10 date-wrap">',a+='<span class="label">Estimated delivery</span>',a+='<span class="date">by <strong>'+e.skuCodeMap[Object.keys(e.skuCodeMap)[0]].deliveryDateInfo.expectedDeliveryDate+"</strong></span>",a+="</div>"),a+="</div>",a+="</div>"}),t>1&&(a+="</div>",a+="</div>"),a+="</div>",$.fancybox.close(),a}function validateGMSPersonalDetailsForm(e){panVerification.validateForm()||e.preventDefault()}function validateCheckoutAddressDetailsForm(e){return"function"==typeof triggerProceedToPaymentClicked&&triggerProceedToPaymentClicked(e),"true"===$("#isAddressDeferred").val()?($("#postcode_delivery").val()||"").trim()?void 0:($(".defer-notifications-delivery-type").html(getNotificationErrorHtml("Please enter your pincode to continue.")),e.preventDefault(),void e.stopImmediatePropagation()):$("input[type=radio][name=deliveryType]").is(":checked")?panVerification.validateForm()?void verifyCustomerEmailAndPhone(e):(e.stopImmediatePropagation(),void e.preventDefault()):($(".notifications-delivery-type").html(getNotificationErrorHtml("Please choose type of delivery.")),e.stopImmediatePropagation(),void e.preventDefault())}function handleImageSearch(){$("#image-search-error").addClass("hidden");
52var e=$("#image_search_file")[0].files[0];if(validateFileForImageSearch(e)){var t=new FormData;t.append("file",e),$.ajax({type:"POST",url:"https://www.bluestone.com/embedding/search-image",async:!1,cache:!1,data:t,contentType:!1,processData:!1,dataType:"json",success:function(e){loadImageSearchResult(e)},error:function(e){$("#image-search-error").removeClass("hidden"),$("#image-search-error").html("Something went wrong. Please try again!")}})}}function loadImageSearchResult(e){$("#image_search_design_ids").val(e.toString()),$("#image_search_form").submit()}function tahAndVcEvents(e,t,a){const i=new Object;i._eventId=e,i.buttons=a,t&&(i.id=t),processServerEvent(i)}function triggerPLinkClick(e){var t=e.currentTarget.getAttribute("data-plink");window.open(t,"_blank")}function setSCCityOptionsHtml(){var e=Object.keys(scStoreDetailsData),t=$("#selectedCityForPopup").val(),a="";e&&e.map(function(e){a+="<li class='city-store-option' onclick='handleSCCityClick(event)'>",a+="<div class='city-store-name'>"+e+"</div>",a+="<div class='city-store-selection-outer'>",a+="<div class='city-store-selected",t!==e&&(a+=" hidden"),a+="'></div>",a+="</div>",a+="</li>"}),$(".city-options").html(a)}function setSCStoreOptionsHtml(){var e=scStoreDetailsData[$("#selectedCityForPopup").val()],t="";e&&e.map(function(e,a){t+="<li class='city-store-option' data-sid='"+e.sid+"' data-cityName='"+e.cityName+"'data-storeName='"+e.storeName+"' onclick='handleSCStoreClick(event)'>",t+="<div class='city-store-name'>"+e.storeName+"</div>",t+="<div class='city-store-selection-outer'>",t+="<div class='city-store-selected",t+=" hidden' >",t+="<img src='"+GLOBAL_CTX+"/resources/themes/bluestone/images/new/static/store-catalog/sc-check-icon.png' />",t+="</div>",t+="</div>",t+="</li>"}),$(".store-options").html(t)}function handleSCCityClick(e){var t=e.target.querySelector(".city-store-selected");if(!t){var a=e.target.closest("li");a&&(t=a.querySelector(".city-store-selected"))}if(t){for(var i=[],o=e.target.closest("li"),r=o.parentElement.firstChild;r;)1===r.nodeType&&r!==o&&i.push(r),r=r.nextSibling;for(var s=0;s<i.length;s++){var n=i[s].querySelector(".city-store-selected");n&&n.classList.add("hidden")}t&&t.classList.remove("hidden");var l=e.target.closest("li").querySelector(".city-store-name"),d=l?l.textContent:"",c=document.querySelector("#selectedCityForPopup");c&&(c.value=d);var u=document.querySelector(".city-search input");u&&(u.value=d)}}function handleSCStoreClick(e){var t=e.target.querySelector(".city-store-selected");if(!t){var a=e.target.closest("li");a&&(t=a.querySelector(".city-store-selected"))}if(t){for(var i=[],o=t.closest("li"),r=o.parentElement.firstChild;r;)1===r.nodeType&&r!==o&&i.push(r),r=r.nextSibling;for(var s=0,n=0;n<i.length;n++){var l=i[n].querySelector(".city-store-selected");l&&!l.closest(".hidden")&&(s+=1)}t.closest(".hidden")?s<5?t.classList.remove("hidden"):(document.querySelector("#cityStoreSelectorPopup #snackbarwrapper").innerHTML=toastUI("Please select up to 5 stores"),setTimeout(function(){var e=document.querySelector("#cityStoreSelectorPopup #snackbarwrapper #snackbar");e.classList.remove("show"),e.innerHTML=""},3e3)):t.classList.add("hidden")}}function productTagsForExperiment(){var e={tags:{TRENDING:[64365,64344,64352,64388,64359,114510,113925,113923,113917,23495,19734,88678,89716,87670,87664,87666,113916,113921,113919,114510,114824,115527,116372,87674,19734,19734,19753,8311,87670,88678,89716,106701,8058,7324,22222,27837,71824,84131,95142,114823,90399,32158,42360,6202,81627,83399,92574,92573,94452,101614,39166,40068,45766,51536,52672,57844,65147,65125,72677,72673,80568,92552,67298,68421,69921,73790,75605,76555,80254,83308,85690,91607,92167,92166,33107,34793,64297,74713,80288,81535,55303,72694,89037,92562,93729,94129,98058,102358,82813,33094,33112,33104,79368,80388,81535,81014,81631,22195,30442,93407],"CURATED GIFT":[89714,89949,92584,92591,93960,94139,94140,94322,95652,97010,97854,98204,98198,98391,101707,102367,103960,103955,104289,105658,107584,109063,107577,9003,59243,60752,62353,62316,63777,63750,63741,63729,64268,64373,64350,64537,64521,66899,68009,71805,74707,75760,76970,77316,77307,78248,78726,78724,78883,78884,79610,79841,79824,80719,80712,81630,83309,83420,84128,84739,84736,84826,85208,86440,86436,86435,86434,86433,522,34642,60749,63720,84121,84109,688,6118,7300,8777,34677,47160,534,2246,5281,5806,9188,15646,63525,63748,64536,64522,5244],"BLUESTONE PICKS":[84853,84855,84849,85217,86424,87666,87661,87660,87624,87353,86179,87352,87631,103372,103470,103449,104285,104875,105958,105951,106713,107966,108803,103923,104228,106440,106431,106698,107867,108213,108211,109517,111629,111697,111697,111696,111695,111694,111786,112077,112077,112487,113617,96329,96328,95549,95560,95561,95559,95558,95552,95547,95546,95972,96330,96327,96326,96325,96662,69921,53654,53655,53650,53644,53642,53641,53634,53630,68087,68084,69938,70106,71256,106405,74794,74789,74786,75026,33197,69908,76983,95957,98432,102533,103057,105198,76262,76268,76256,77649,73702,8
520285,80273,80587,80999,84125,92591,92585,92587,93405]}};if(Object.keys(e).length>0)for(const[t,a]of Object.entries(e.tags))a.forEach(e=>{$("#pid_"+e).append('<div class="p-tag">'+t+"</div>")})}function submitBankDetails(e,t,a){var i=$(t).attr("id"),o=$(t).data("name");$(".payment-method-selected").attr("id",i),$(".payment-method-selected").val("net-bank"),$(".page-loader").removeClass("hidden"),triggerBankSelectEvent(a,o),initiateTransaction(e)}function resetAllSelectedOptions(e){$(".payment-row").removeClass("method-selected"),$(".upi-option").removeClass("selected"),$(".upi-method").prop("checked",!1),$(".saved-method").prop("checked",!1),$(".proceed-button").addClass("disabled"),$(".vpa-input").val(""),$(".upi-verify").removeClass("hidden"),$(".valid-upi").addClass("hidden"),$(".invalid-upi").addClass("hidden"),$(".upi-consent").addClass("hidden"),$(".upi-error-info").addClass("hidden"),$(".upi-input-box").removeClass("invalid"),$(".upi-input-box").addClass("hidden"),$("#vpa-verify-button").attr("disabled",!0),"new-card"==e&&validateNewCardForm()}function getPOSCartWishListHTML(e){const t=wishlistDesignIds.includes(Number(e.designId));return`\n     <a\n       class="wishlist ${t?"wishlist-added fill":"guest-user no-wishlist outline"}"\n       title="${t?"Added to wishlist":"Add to wishlist"}"\n       data-auth="${customerCode?"true":"false"}"\n       data-id="${e.designId}"\n       data-customizationid="${e.customizationId}"\n       data-sku="${e.skuCode}"\n       data-price="${e.price}"\n       data-discountedprice="${e.discountedPrice}"\n       data-designname="${e.designName}"\n       data-sourcetype="${e.sourceType}"\n       onclick="togglePOSWishlist(event, this); posCartAddToWishlistWEEvent(this);"\n     >\n       <i></i>\n     </a>\n  `}function togglePOSWishlist(e,t){e.preventDefault(),e.stopPropagation();const a=t.classList.contains("wishlist-added");$.ajax({type:a?"DELETE":"POST",url:a?GLOBAL_CTX+"/wishlist/removeItem?designId="+encodeURIComponent(t.dataset.id):GLOBAL_CTX+"/wishlist/addProduct",data:a?null:{designId:t.dataset.id,customizationId:t.dataset.customizationid},success:function(){a?(t.classList.remove("wishlist-added","fill"),t.classList.add("no-wishlist","outline"),t.title="Add to wishlist"):(t.classList.remove("no-wishlist","outline"),t.classList.add("wishlist-added","fill"),t.title="Added to wishlist")}})}storeCustomerDetailsUtil=function(){var e=0,t=0,a={},i={};a.voucherDiscount=0,a.appliedBsCredit=0,a.appliedBsCash=0;var o="",r="",s="",n=0,l=0,d="",c="",u=0,p=!1,m=!1,h=!0,v="";window.voucherAppliedCount=0;function useVoucher(e,t){$.ajax({type:"GET",async:!1,url:GLOBAL_CTX+"/admin/physical-store/voucher/apply-voucher",dataType:"json",data:e,success:function(e){if($(t.target).removeClass("loading"),e.hasError)$(".notifications").html(getNotificationErrorHtmlNew(e.errorMessage||e.discountValidationResponse)).fadeIn();else{window.voucherAppliedCount=e.discountAfterVoucherApplications.length,window.isFreeGiftVoucherApplied=!0,a.voucherDiscount>0&&removeVoucher(),$(".notifications").html(getNotificationSuccessHtmlNew("Voucher Applied Successfully!")).fadeIn();var i=e.voucherDiscount;h=e.isStackable,a.voucherDiscount=i,h||($(".product-pricing .price-info-block .new-price.stackable").addClass("hidden"),$(".product-pricing .price-info-block .old-price").addClass("hidden"),$(".product-pricing .price-info-block .new-price.unstackable").removeClass("hidden"),u=0,$(".you-pay").html(formatPrice(a.total.mrp)),updateTotalAmount(a.total.mrp));var o=localStorage.getItem("freeGiftDiscountVoucherName");isFreeGiftInventoryAdded=""!=o,updateStoreCartValues(a.total.srp,0,0,a.voucherDiscount,e.voucherNameValue,isFreeGiftInventoryAdded),updateAmountLeftToPay(),function displayMultipleDiscountPOS(e){var t="";e.forEach(function(e){t+='<div class="voucher-row"><div class="vouche-detail product-price-left col-xs-7" style="border: 1px dashed; width: auto; padding: 2px 5px;"> <span class="single_voucher_name">'+e.voucherName+'</span><span class="price-width single_voucher_amount" style="color: #007236;"> ( '+formatPrice(e.totalPriceDiscount)+" ) </span></div></div>"}),$(".multi-voucher-details").html(t)}(e.discountAfterVoucherApplications)}},error:function(e){$(t.target).removeClass("loading"),$(".notifications").html(getNotificationErrorHtmlNew(e.statusText)).fadeIn()}})}function removeVoucher(){0===window.voucherAppliedCount&&emptyObject(i);var e=getTotalPriceAndItems(v);h=!0,e.mrp>e.srp&&(u=e.mrp-e.srp),$(".you-pay").html(formatPrice(e.srp)),$(".product-pricing .price-info-block .new-price.stackable").removeClass("hidden"),$(".product-pricing .price-info-block .old-price").removeClass("hidden"),$(".product-pricing .price-info-block .new-price.unstackable").addClass("hidden"),updateTotalAmount(e.srp),a.voucherDiscount=0,updateStoreOrderSummaryAfterDiscount("#display_cart_vouchers","",0,a.total.srp,a.total.mrp),updateAmountLeftToPay(),(p||m)&&(removeBlueCashAndCredit(),updateBlueCashAndCredit(!1))}function updateStoreOrderSummaryAfterDiscount(e,t,i,o,r){if(i>0?($(e).removeClass("hidden"),"Blue Credit"===t&&$(e).data("usedbscredit",i),"Blue Cash"===t&&$(e).data("usedbscash",i),$(e+" .voucher_name").html(t),$(e+" .voucher-discount").html("- "+formatPrice(i))):($(e).addClass("hidden"),$(".voucher-success-msg").addClass("hidden")),$(".item-price .new-price").html(formatPrice(o)),$(".item-price").attr("data-price",o),a.voucherDiscount>0||u>0){var s=null==a.voucherDiscount?0:a.voucherDiscount;$(".total-saving").removeClass("hidden"),$(".total-saving").html("You Save "+formatPrice(s+u))}else $(".total-saving").addClass("hidden")}function updateStoreCartValues(e,t,i,o,r,s){if(a.appliedBsCredit=i,a.appliedBsCash=t,null==o&&(o=0),m){var d=i||(null==$("#blueCreditSummary").data("usedbscredit")?0:$("#blueCreditSummary").data("usedbscredit"));updateTotalAmount(e-=h?i:d);var c="Blue Credit";updateBlueCredit(i),updateStoreOrderSummaryAfterDiscount("#blueCreditSummary",c,d,a.total.srp,a.total.mrp)}if(p){var u=t||(null==$("#blueCashSummary").data("usedbscash")?0:$("#blueCashSummary").data("usedbscash"));t>e?(t=e,updateTotalAmount(0),u=t):updateTotalAmount(e-=h?t:u);c="Blue Cash";updateBluecash(t),updateStoreOrderSummaryAfterDiscount("#blueCashSummary",c,u,a.total.srp,a.total.mrp)}if(o>0){if(e>=o){if(updateTotalAmount(e-=o),p&&m){u=$("#blueCashSummary").data("usedbscash"),d=$("#blueCreditSummary").data("usedbscredit");n>0&&(n>=e?(updateBluecash(e),u+=e,updateTotalAmount(0)):(updateTotalAmount(e-=n),u+=n,updateBluecash(n))),updateStoreOrderSummaryAfterDiscount("#blueCashSummary","Blue Cash",u,a.total.srp,a.total.mrp),updateStoreOrderSummaryAfterDiscount("#blueCreditSummary","Blue Credit",d,a.total.srp,a.total.mrp)}else if(p){u=$("#blueCashSummary").data("usedbscash");n>0&&(n>=e?(updateBluecash(e),u+=e,updateTotalAmount(0)):(updateTotalAmount(e-=n),u+=n,updateBluecash(n))),updateStoreOrderSummaryAfterDiscount("#blueCashSummary","Blue Cash",u,a.total.srp,a.total.mrp)}else if(m){d=$("#blueCreditSummary").data("usedbscredit");l>0&&(l>=e?(updateBlueCredit(e),d+=e,updateTotalAmount(0)):(updateTotalAmount(e-=l),d+=l,updateBlueCredit(l))),updateStoreOrderSummaryAfterDiscount("#blueCreditSummary","Blue Credit",d,a.total.srp,a.total.mrp)}}else if(p&&m){u=$("#blueCashSummary").data("usedbscash"),d=$("#blueCreditSummary").data("usedbscredit");n>0&&(n>=e?(updateBluecash(e),u+=e,updateTotalAmount(0)):(updateTotalAmount(e-=n),u+=n,updateBluecash(n))),updateBluecash(-o),updateStoreOrderSummaryAfterDiscount("#blueCashSummary","Blue Cash",u-=o,a.total.srp,a.total.mrp),updateStoreOrderSummaryAfterDiscount("#blueCreditSummary","Blue Credit",d,a.total.srp,a.total.mrp)}else if(p){u=$("#blueCashSummary").data("usedbscash");n>0&&(n>=e?(updateBluecash(e),u+=e,updateTotalAmount(0)):(updateTotalAmount(e-=n),u+=n,updateBluecash(n))),updateBluecash(-o),updateStoreOrderSummaryAfterDiscount("#blueCashSummary","Blue Cash",u-=o,a.total.srp,a.total.mrp)}else if(m){d=$("#blueCreditSummary").data("usedbscredit");l>0&&(l>=e?(updateBlueCredit(e),d+=e,updateTotalAmount(0)):(updateTotalAmount(e-=l),d+=l,updateBlueCredit(l))),updateBlueCredit(-o),updateStoreOrderSummaryAfterDiscount("#blueCreditSummary","Blue Credit",d-=o,a.total.srp,a.total.mrp)}c="";updateStoreOrderSummaryAfterDiscount("#display_cart_vouchers",c=""!=r?'Promo Code <span class="voucher-wrap">('+r+'<span id="deleteDiscount" class="delete-discount floatr"><i class="icon-ion-ios-close-empty"></i></span>)</span>':s?'Voucher Discount <span id="deleteDiscount" class="delete-discount floatr"></span>':'Voucher Discount <span id="deleteDiscount" class="delete-discount floatr"><i class="icon-ion-ios-close-empty"></i></span>',o||a.voucherDiscount,a.total.srp,a.total.mrp)}}function updateBluecash(e){n-=e,$("#blueCash").html(formatPrice(n))}function updateBlueCredit(e){l-=e,$("#blueCredit").html(formatPrice(l))}function updateTotalAmount(e){a.total.srp=e}function resettingFields(e){e.find(".amount").addClass("hidden"),e.find("#amount").removeClass("gray-bg").removeAttr("readonly"),e.find(".card-number").addClass("hidden"),e.find(".card-type").addClass("hidden"),e.find(".ref-number").addClass("hidden"),e.find(".approval-code").addClass("hidden"),e.find(".cheque-number").addClass("hidden"),e.find(".cheque-date").addClass("hidden"),e.find(".
52issuing-bank").addClass("hidden"),e.find(".payment-method").addClass("hidden"),e.find(".remarks").addClass("hidden"),e.find(".cash-entries").addClass("hidden"),e.find(".cash-paymentmode").addClass("hidden"),e.find(".cash-paymentmode input").val("")}function calculateTotalCash(e){var t=0;return $(e).parents(".order-details-section").find(".itemTotal").each(function(){t+=parseInt($(this).text())}),t}function updateSwipeOptions(e,t){var a=getAllowedPaymentModes(e);$(t).html(a)}function getAllowedPaymentModes(e){var t='<option value=""></option>';return e.forEach(function(e){t+='<option value="'+e+'">'+e+"</option>"}),t}function handlePanNumberField(e){var t=parseInt($(".mto-content #amount").val());t&&t>=panLimit?$(".pos-pan-wrapper").removeClass("hidden"):$(".pos-pan-wrapper").addClass("hidden"),(t=parseInt($(".you-pay").attr("total-amount")))&&t>=panLimit?($("#isPANVerificationRequired").val("true"),storeCustomerDetailsUtil.checkIfIDVerificationRequiredAndIsComplete()||($(".notifications-pan").html(getNotificationErrorHtml("Customer PAN Verification or Form 60 with Alternate ID Proof required.")),$("#customerIDProofForm").show())):($("#isPANVerificationRequired").val("false"),$("#customerIDProofForm").hide())}
52function handleCreateVoucher(){var e=$("#selectVoucher").val();"Percentage Discount"===e?($(".percentage-discount").removeClass("hidden"),$(".voucher-calculation-section").removeClass("hidden"),$(".voucher-create-btn").removeClass("hidden"),$(".flat-discount").addClass("hidden")):"Flat Discount"===e&&($(".percentage-discount").addClass("hidden"),$(".voucher-calculation-section").addClass("hidden"),$(".voucher-create-btn").removeClass("hidden"),$(".flat-discount").removeClass("hidden"))}function getTotalPriceAndItems(e){var t=0,a=0,i=0,o=0,r=0,s=!1,n=!1;return e.forEach(function(e){t+=e.price.sp,a+=e.price.mrp,o+=e.makingChargesAfterDiscount,r+=e.diaCostAfterDiscount,i++,"Gold Coins"!==e.productCategory&&"Silver Coins"!==e.productCategory||(s=!0),0===e.diaCostAfterDiscount&&0===e.preSetSolitaireCost&&(n=!0)}),{srp:t,mrp:a,srpBeforeDiscount:t,makingCharge:o,diamondCost:r,items:i,isCoinProduct:s,isPlainGoldProduct:n}}function addMorePaymentRow(){var t=function getPaymentRowHTML(e){var t="";t+='<div class="form-group v3 row order-details-section order-details-section-'+e+'">',t+='<div class="col-xs-6 fl-wrap">',t+='<label class="control-label" for="paymentMode">Payment Mode</label>',t+='<select class="form-control payment-mode" name="storeOrderPaymentList['+e+'].parentPaymentMode" id="paymentMode" onchange="storeCustomerDetailsUtil.showPaymentOptions(event)" data-paymentrow="'+e+'">',t+='<option value=""></option>',t+='<option value="SWIPE">Swipe</option>',t+='<option value="BANKTRANSFER">Bank Transfer</option>',t+="</select>",t+="</div>",t+='<div class="col-xs-6 fl-wrap swipe hidden">',t+='<label class="control-label" for="swipePaymentMode">Select Swipe</label>',isPineLabsEnabled?(t+='<select class="form-control swipe-payment-mode" name="storeOrderPaymentList['+e+'].swipePaymentMode" id="swipePaymentMode">',t+="</select>",t+='<input type="hidden" name="storeOrderPaymentList['+e+'].swipePaymentType" value="" />'):(t+='<select class="form-control swipe-payment-mode" name="storeOrderPaymentList['+e+'].swipePaymentMode" id="swipePaymentMode" onchange="storeCustomerDetailsUtil.showSwipePaymentOptions(event)">',t+='<option value=""></option>',t+='<option value="CARD">Card</option>',t+='<option value="QRCODE">QR Code/UPI</option>',t+="</select>");t+="</div>",t+='<div class="col-xs-6 fl-wrap banktransfer hidden">',t+='<label class="control-label" for="bankTransferPaymentMode">Select Bank Transfer</label>',t+='<select class="form-control banktransfer-payment-mode" name="storeOrderPaymentList['+e+'].bankPaymentMode" id="bankTransferPaymentMode" onchange="storeCustomerDetailsUtil.showBankTransferPaymentOptions(event)">',t+='<option value=""></option>',t+='<option value="RTGS">RTGS</option>',t+='<option value="NEFT">NEFT</option>',t+='<option value="CHEQUE">Cheque</option>',t+='<option value="EMI">EMI</option>',t+="</select>",t+="</div>",t+='<div class="col-xs-6 fl-wrap amount hidden" id="amountField'+e+'">',t+='<label class="control-label" for="amount">Amount</label>',t+='<input name="storeOrderPaymentList['+e+'].amount" type="text" id="amount" required pattern="[0-9]+" class="required form-control numeric amount-input" title="Enter amount" onblur="storeCustomerDetailsUtil.handlePanNumberField(event)" />',t+="</div>",t+='<div class="col-xs-6 fl-wrap cash-paymentmode hidden">',t+='<input name="storeOrderPaymentList['+e+'].cashPaymentMode" type="hidden"/>',t+="</div>",t+='<div class="col-xs-12 cash-entries hidden">',t+='<strong class="title">Enter Note/Coin Quantities</strong>',t+='<ul class="row">',t+='<li class="col-xs-6">',t+='<label class="control-label" for="entry2000">2000&nbsp;x&nbsp;</label>',t+='<input name="storeOrderPaymentList['+e+'].entry2000" type="number" min="0" id="entry2000" class="required numeric" value="0" title="Enter Quantity" data-entry="2000" onblur="storeCustomerDetailsUtil.calculateCashPerItem(event)" data-entry="2000" onblur="storeCustomerDetailsUtil.calculateCashPerItem(event)" />',t+='<strong class="item-total"></strong>',t+="</li>",t+='<li class="col-xs-6">',t+='<label class="control-label" for="entry500">500&nbsp;x&nbsp;</label>',t+='<input name="storeOrderPaymentList['+e+'].entry500" type="number" min="0" id="entry500" class="required numeric" value="
520"  title="Enter Quantity" data-entry="500" onblur="storeCustomerDetailsUtil.calculateCashPerItem(event)" />',t+='<strong class="item-total"></strong>',t+="</li>",t+='<li class="col-xs-6">',t+='<label class="control-label" for="entry200">200&nbsp;x&nbsp;</label>',t+='<input name="storeOrderPaymentList['+e+'].entry200" type="number" min="0" id="entry200" class="required numeric" value="0"  title="Enter Quantity" data-entry="200" onblur="storeCustomerDetailsUtil.calculateCashPerItem(event)" />',t+='<strong class="item-total"></strong>',t+="</li>",t+='<li class="col-xs-6">',t+='<label class="control-label" for="entry100">100&nbsp;x&nbsp;</label>',t+='<input name="storeOrderPaymentList['+e+'].entry100" type="number" min="0" id="entry100" class="required numeric" value="0"  title="Enter Quantity" data-entry="100" onblur="storeCustomerDetailsUtil.calculateCashPerItem(event)" />',t+='<strong class="item-total"></strong>',t+="</li>",t+='<li class="col-xs-6">',t+='<label class="control-label" for="entry50">50&nbsp;x&nbsp;</label>',t+='<input name="storeOrderPaymentList['+e+'].entry50" type="number" min="0" id="entry50" class="required numeric" value="0"  title="Enter Quantity" data-entry="50" onblur="storeCustomerDetailsUtil.calculateCashPerItem(event)" />',t+='<strong class="item-total"></strong>',t+="</li>",t+='<li class="col-xs-6">',t+='<label class="control-label" for="entry20">20&nbsp;x&nbsp;</label>',t+='<input name="storeOrderPaymentList['+e+'].entry20" type="number" min="0" id="entry20" class="required numeric" value="0"  title="Enter Quantity" data-entry="20" onblur="storeCustomerDetailsUtil.calculateCashPerItem(event)" />',t+='<strong class="item-total"></strong>',t+="</li>",t+='<li class="col-xs-6">',t+='<label class="control-label" for="entry10">10&nbsp;x&nbsp;</label>',t+='<input name="storeOrderPaymentList['+e+'].entry10" type="number" min="0" id="entry10" class="required numeric" value="0"  title="Enter Quantity" data-entry="10" onblur="storeCustomerDetailsUtil.calculateCashPerItem(event)" />',t+='<strong class="item-total"></strong>',t+="</li>",t+='<li class="col-xs-6">',t+='<label class="control-label" for="entry5">5&nbsp;x&nbsp;</label>',t+='<input name="storeOrderPaymentList['+e+'].entry5" type="number" min="0" id="entry5" class="required numeric" value="0"  title="Enter Quantity" data-entry="5" onblur="storeCustomerDetailsUtil.calculateCashPerItem(event)" />',t+='<strong class="item-total"></strong>',t+="</li>",t+='<li class="col-xs-6">',t+='<label class="control-label" for="entry2">2&nbsp;x&nbsp;</label>',t+='<input name="storeOrderPaymentList['+e+'].entry2" type="number" min="0" id="entry2" class="required numeric" value="0"  title="Enter Quantity" data-entry="2" onblur="storeCustomerDetailsUtil.calculateCashPerItem(event)" />',t+='<strong class="item-total"></strong>',t+="</li>",t+='<li class="col-xs-6">',t+='<label class="control-label" for="entry1">1&nbsp;x&nbsp;</label>',t+='<input name="storeOrderPaymentList['+e+'].entry1" type="number" min="0" id="entry1" class="required numeric" value="0"  title="Enter Quantity" data-entry="1" onblur="storeCustomerDetailsUtil.calculateCashPerItem(event)" />',t+='<strong class="item-total"></strong>',t+="</li>",t+="</ul>",t+="</div>",t+='<div class="col-xs-6 fl-wrap card-number hidden" id="cardNumberField'+e+'">',t+='<label class="control-label" for="cardNumber">Card Number (Last 4 digit)</label>',t+='<input name="storeOrderPaymentList['+e+'].cardNumber" type="text" id="cardNumber" class="required form-control numeric min-length_3" maxlength="4" title="Enter last 4 digit" />',t+="</div>",t+='<div class="col-xs-6 fl-wrap card-type hidden" id="cardTypeField">',t+='<label class="control-label" for="cardType">Card Type</label>',isPineLabsEnabled?t+='<input type="text" name="storeOrderPaymentList['+e+'].cardType" id="cardType" class="form-control" value="" />':(t+='<select name="storeOrderPaymentList['+e+'].cardType" id="cardType" class="form-control">',t+='<option value=""></option>',t+='<option value="VISA">VISA</option>',t+='<option value="MASTERCARD">MASTERCARD</option>',t+='<option value="MAESTRO">MAESTRO</option>',t+='<option value="RUPAY">RUPAY</option>',t+='<option value="AMEX">AMEX</option>',t+='<option value="OTHERS">OTHERS (Specify details in remarks)</option>',t+="</select>");t+="</div>",t+='<div class="col-xs-6 fl-wrap ref-number hidden" id="RRNumberField'+e+'">',t+='<label class="control-label" for="RRNumber">Transaction Id</label>',t+='<input name="storeOrderPaymentList['+e+'].rrNo" type="text" id="RRNumber" class="required form-control alphanum" title="Enter Transaction Id" />',t+="</div>",t+='<div class="col-xs-6 fl-wrap approval-code hidden" id="approvalCodeField'+e+'">',t+='<label class="control-label" for="approvalCode">Approval Code</label>',t+='<input name="storeOrderPaymentList['+e+'].approvalCode" type="text" id="approvalCode" class="required form-control alphanum" title="Enter Approval Code" />',t+="</div>",t+='<div class="col-xs-6 fl-wrap cheque-number hidden">',t+='<label class="control-label" for="chequeNumber">Cheque Number</label>',t+='<input name="storeOrderPaymentList['+e+'].chequeNumber" type="text" id="chequeNumber" class="form-control required alphanum" title="Enter cheque number" />',t+="</div>",t+='<div class="col-xs-6 fl-wrap cheque-date hidden auto-filled">',t+='<label class="control-label" for="chequeDate">Cheque Date</label>',t+='<input name="storeOrderPaymentList['+e+'].chequeDate" type="date" id="chequeDate" class="form-control required" title="Enter cheque date" />',t+="</div>",t+='<div class="col-xs-6 fl-wrap issuing-bank hidden">',t+='<label class="control-label" for="issuingBank">Issuing Bank</label>',t+='<input name="storeOrderPaymentList['+e+'].issuingBank" type="text" id="issuingBank" class="form-control required" title="Enter Issuing Bank" />',t+="</div>",t+='<div class="col-xs-12 fl-wrap payment-method hidden">',t+='<label class="control-label" for="paymentMethod">Payment Method</label>',t+='<select name="storeOrderPaymentList['+e+'].paymentMethod" id="paymentMethod" class="form-control">',t+='<option value=""></option>',t+='<option value="NEFT">NEFT / IMPS (Specify Transaction ID in Remarks)</option>',t+='<option value="PAYU">PAYMENT CAPTURED ON PAYU(Specify Transaction ID in Remarks</option>',t+='<option value="OTHER">OTHERS (Specify Details in Remarks)</option>',t+="</select>",t+="</div>",t+='<div class="col-xs-12 remarks hidden">',t+='<div class="fl-wrap">',t+='<label class="control-label" for="storeRemarks">Remarks</label>',t+='<input name="storeOrderPaymentList['+e+'].remarks" type="text" id="storeRemarks" row="3" class="form-control required" maxlength="150" title="Enter Remarks" />',t+="</div>",t+="</div>",isPineLabsEnabled&&(t+='<input type="hidden" name="storeOrderPaymentList['+e+'].plutusTransactionReferenceID" id="plutusTransactionReferenceID" value="" />');return t+="</div>"}(++e);$(".payment-options-wrap").append(t),isPineLabsEnabled&&updateSwipeOptions(window.pineLabsAllowedPaymentModes,'select[name="storeOrderPaymentList['+e+'].swipePaymentMode"]')}function handlePinelabsPopup(e){$("#pinelabs-popup-close").removeClass("hidden");var t={width:450,wrapCSS:"fancybox-style-4",closeClick:!1,keys:{close:[0]},resetPopup:function(){resetPineLabsPaymentOptions()},href:"#pinelabsPayment",afterLoad:function(){$("#getPineLabsStatus").attr("data-paymentrow",e),$("#pineLabsCancel").attr("data-paymentrow",e),$("input#payUsingPineLabs").attr("data-paymentrow",e)},helpers:{overlay:{closeClick:!1}},closeBtn:!1};$.fancybox(t)}function getPineLabsTransactionStatus(e,t){var a=e.target.getAttribute("data-paymentrow");$.ajax({type:"GET",url:GLOBAL_CTX+"/pine-labs/status",async:!1,dataType:"json",data:"PlutusTransactionReferenceID="+t,success:function(e){if(e.PlutusTransactionReferenceID&&!1,e.hasError){if(e.cancelled)return $(".pine-labs-error").removeClass("hidden"),$(".pine-labs-error #otp-error").html("This transaction has been cancelled, Please re-initiate it."),resetPineLabsPaymentOptions(),$.fancybox.close(),$(".pine-labs-error").addClass("hidden"),$(".pine-labs-error #otp-error").html(""),$("#paymentNotifications").html(getNotificationErrorHtml("This transaction has been cancelled, Please re-initiate it.")),!1;$(".pine-labs-error").removeClass("hidden"),$(".pine-labs-error #otp-error").html(e.errorMessage)}else resetPineLabsPaymentOptions(),updatePineLabsPaymentOptions(e.TransactionData,a,e.PlutusTransactionReferenceID),$.fancybox.close(),$(".pine-labs-error").addClass("hidden"),$(".pine-labs-error #otp-error").html(""),updateAmountLeftToPay(),$("#email").attr("readonly",!0)},error:function(e){$(".pine-labs-error").removeClass("hidden"),$(".pine-labs-error #otp-error").html(res.errorMessage),alert(e.errorMessage)}})}function cancelPineLabsTransaction(e,t){$.ajax({type:"POST",url:GLOBAL_CTX+"/pine-labs/cancel",dataType:"json",data:"PlutusTransactionReferenceID="+t,success:function(e){e.hasError?alert(e.errorMessage):(resetPineLabsPaymentOptions(),$.fancybox.close(),$(".pine-labs-error").addClass("hidden"),$(".pine-labs-error #otp-error").html(""),$("#pinelabs-popup-close").removeClass("hidden"))},error:function(e){alert(e.errorMessage)}})}function resetPineLabsPaymentOptions(){$("#IMEIId").val("").parents(".fl-wrap").removeClass("focused success error"),$("#pineLabsSwipePaymentMode").val("").parents(".fl-wrap").removeClass("focused success error"),$("#pineLabsAmount").val("").parents(".fl-wrap").removeClass("focused success error"),$(".pinelabs-screen.screen-1").removeClass("hidden").parents(".fl-wrap").removeClass("focused success error"),$(".pinelabs-screen.screen-2").addClass("hidden").parents(".fl-wrap").removeClass("focused success error")}function updatePineLabsPaymentOptions(e,t,a){var i,o=e.TransactionLogId;if("prod"!==buildMode&&(o=(new Date).getTime()),"CARD"===e.PaymentMode){$(".order-details-section-"+t+" .card-number").removeClass("hidden").addClass("auto-filled").css("opacity","0.5"),$(".order-details-section-"+t+" .card-type").removeClass("hidden").addClass("auto-filled").css("opacity","0.5"),$(".order-details-section-"+t+" .approval-code").removeClass("hidden").addClass("auto-filled").css("opacity","0.5");var r=e["Card Number"].replace(/[^\d.-]+/g,"");$(".order-details-section-"+t+' input[name="storeOrderPaymentList['+t+'].cardNumber"]').val(r).attr("readonly",!0),$(".order-details-section-"+t+' [name="storeOrderPaymentList['+t+'].cardType"]').val(e["Card Type"]).attr("readonly",!0),$(".order-details-section-"+t+' input[name="storeOrderPaymentList['+t+'].approvalCode"]').val(e.ApprovalCode).attr("readonly",!0)}$(".order-details-section-"+t+" .swipe").removeClass("hidden").addClass("auto-filled").css("opacity","0.5"),$(".order-details-section-"+t+" .amount").removeClass("hidden").addClass("auto-filled").css("opacity","0.5"),$(".order-details-section-"+t+" .ref-number").removeClass("hidden").addClass("auto-filled").css("opacity","0.5"),$(".order-details-section-"+t+" .remarks").removeClass("hidden"),""===$('input[name="storeOrderPaymentList['+t+'].swipePaymentType"]').val()?window.pineLabsAllowedPaymentModes&&window.pineLabsAllowedPaymentModes.length>
520&&window.pineLabsAllowedPaymentModes.forEach(function(t){e.PaymentMode.includes(t)&&(i=t)}):i=$('input[name="storeOrderPaymentList['+t+'].swipePaymentType"]').val(),$(".order-details-section-"+t+' select[name="storeOrderPaymentList['+t+'].swipePaymentMode"]').val(i).attr("readonly",!0),$(".order-details-section-"+t+' input[name="storeOrderPaymentList['+t+'].amount"]').val(e.Amount).attr("readonly",!0),$(".order-details-section-"+t+' input[name="storeOrderPaymentList['+t+'].rrNo"]').val(o).attr("readonly",!0),$(".order-details-section-"+t+' input[name="storeOrderPaymentList['+t+'].remarks"]').attr("required",!0),$(".order-details-section-"+t+' select[name="storeOrderPaymentList['+t+'].parentPaymentMode"]').val("SWIPE").attr("readonly",!0).parents(".fl-wrap").addClass("auto-filled").css("opacity","0.5"),$(".order-details-section-"+t+' input[name="storeOrderPaymentList['+t+'].plutusTransactionReferenceID"]').val(a)}function updateBlueCashAndCredit(e){var t=0,i=0;(!e||"true"===$("#isBlueCreditApplicable").val())&&l>0&&a.total.srp>0&&(m=!0,t=l<=a.total.srp?l:a.total.srp),n>0&&a.total.srp>
520&&(p=!0,i=n<=a.total.srp?n:a.total.srp),updateStoreCartValues(a.total.srp,i,t,0,""),updateAmountLeftToPay()}function removeBlueCashAndCredit(){var e=$("#blueCreditSummary").data("usedbscredit"),t=$("#blueCashSummary").data("usedbscash"),i=getTotalPriceAndItems(v);if(updateTotalAmount(h?i.srp-a.voucherDiscount:i.mrp-a.voucherDiscount),e>0){m=!1;var o="";l+=e,$("#blueCreditSummary").data("usedbscredit",0),$("#blueCredit").html(formatPrice(l)),updateStoreOrderSummaryAfterDiscount("#blueCreditSummary",o,0,a.total.srp,a.total.mrp)}if(t>0){p=!1;o="";$("#blueCashSummary").data("usedbscash",0),updateBluecash(-t),updateStoreOrderSummaryAfterDiscount("#blueCashSummary",o,0,a.total.srp,a.total.mrp)}updateAmountLeftToPay()}function updateAmountLeftToPay(){var e=storeCustomerDetailsUtil.inventoryData.total.srp,t=getTotalAppliedAmount();t<e?($("#remainingAmount").html(formatPrice(e-t)),$(".remaining-amount-wrapper").removeClass("hidden")):$(".remaining-amount-wrapper").addClass("hidden")}function getTotalAppliedAmount(){var e=0;return $(".amount-input").each(function(){var t=$(this).val()||0;e+=parseInt(t)}),e}return window.payWithoutBsCash=!1,window.isOtpVerified=!1,{toggleAddress:function toggleAddress(e){var t=e.target.checked?"open":"";$("#addressSection").removeClass("open").addClass(t),"open"===t?$("#addressSection .make-require").attr("required",!0):$("#addressSection .make-require").removeAttr("required")},showPaymentOptions:function showPaymentOptions(e){var t=$("#blueCash").data("bluecash"),a=$("#blueCredit").data("bluecredit"),i=$("#useBsWallet").is(":checked"),o=$("#useBsWallet").is(":disabled"),r="true"===$("#isBlueCreditApplicable").val();if(!1!==window.payWithoutBsCash||!(t||r&&a)||""===t&&""===a||o||i){var s=$(e.target).parents(".order-details-section");if(resettingFields(s),s.find(".swipe").addClass("hidden"),s.find(".banktransfer").addClass("hidden"),"CASH"===e.target.value)s.find(".amount").removeClass("hidden"),s.find(".cash-paymentmode").removeClass("hidden"),s.find(".cash-paymentmode input").val("CASH"),s.find("#amount").addClass("gray-bg").attr("readonly","readonly"),s.find(".cash-entries").removeClass("hidden"),s.find(".remarks").removeClass("hidden");else if("SWIPE"===e.target.value){if(isPineLabsEnabled)handlePinelabsPopup($(e.target).data("paymentrow"));else s.find(".swipe").removeClass("hidden")}else"BANKTRANSFER"===e.target.value&&s.find(".banktransfer").removeClass("hidden")}else!function handlePayWithoutBsCashPopup(){$.fancybox({width:450,wrapCSS:"fancybox-style-4",href:"#blueCashPaymentWarning",helpers:{overlay:{closeClick:!1}},closeBtn:!1})}()},handlePanNumberField:handlePanNumberField,showSubOptions:function showSubOptions(e){var t=$(e.target).parents(".mto-form-wrapper"),a=t.find("#mtoEmail").val();$.ajax({type:"POST",url:GLOBAL_CTX+"/physical-store/customer-data",dataType:"json",data:"email="+a,success:function(e){e.hasError||null==e.customer?(t.find("#mtoFullname").val(""),t.find("#mtoContactNumber").val("")):(t.find("#mtoFullname").val(e.customer.userName),t.find("#mtoContactNumber").val(e.customer.customerPhone))},error:function(e){}})},handleVoucher:function handleVoucher(e){"useVoucher"===e.target.getAttribute("id")?($(".voucher-code").removeClass("hidden"),$(".add-more-voucher").removeClass("hidden"),$(".select-voucher").addClass("hidden"),$(".percentage-discount").addClass("hidden"),$(".voucher-calculation-section").addClass("hidden"),$(".flat-discount").addClass("hidden"),$(".voucher-create-btn").addClass("hidden"),$(".voucher-details-wrap .remarks").removeClass("hidden")):"createVoucher"===e.target.getAttribute("id")&&($(".voucher-code").addClass("hidden"),$(".add-more-voucher").addClass("hidden"),$(".select-voucher").removeClass("hidden"),$(".voucher-details-wrap .remarks").removeClass("hidden"),handleCreateV
52oucher())},handleCreateVoucher:handleCreateVoucher,addMorePaymentOptions:addMorePaymentRow,addMoreVoucherOptions:function addMoreVouchers(){var e=function getVoucherRowHTML(e){var t="";return t+='<div class="col-xs-10 voucher-code-row">',t+='<div class="row">',t+='<div class="col-xs-6 fl-wrap voucher-code">',t+='<input type="text" name="voucherDiscountList['+e+']" id="voucherCode-'+e+'" class="form-control voucherCode" />',t+='<label class="label" for="voucherCode-'+e+'">Voucher Code / Gift Card</label>',t+='<div id="voucher-message" class="msg-style-2 error hidden"><div class="v-msg"></div></div>',t+='<div class="voucher-success-msg hidden">Voucher applied successfully!</div>',t+="</div>",t+='<div class="col-xs-2 voucher-code"><div id="verifyVoucher" class="btn btn-flat verify-voucher">Verify Voucher</div></div>',t+="</div>",t+="</div>"}(++t);$(".multiple-vouchers-wrap .additional-vouchers").append(e),$("#applyVoucherBtn").addClass("btn-disabled")},getCustomerData:function getCustomerData(e){(p||m)&&($("#useBsWallet").prop("checked",!1),removeBlueCashAndCredit()),n=0,l=0,$('input[type="email"]').hasClass("disabled")||$.ajax({type:"POST",url:GLOBAL_CTX+"/physical-store/customer-data",dataType:"json",data:"email="+e.target.value,success:function(e){e.hasError?($("#api-message").removeClass("hidden"),$("#api-message .v-msg").html(e.errorMsg)):($("#api-message").addClass("hidden"),function triggerGSTfield(e){e.gstNo&&15===e.gstNo.length?($("#toggleSwitch").is(":not(:checked)")&&$("#toggleSwitch").trigger("click"),$("#toggleSwitch").attr("disabled","disabled")):$("#toggleSwitch").attr("disabled",!1)}(e),function updateCustomerDetails(e){var t,a,i,o,r,s,n="";e.birthDay&&(t=new Date(e.birthDay),o=getDateInDefaultBrowserFormat(t));e.spouseBirthDay&&(r=(a=new Date(e.spouseBirthDay))?getDateInDefaultBrowserFormat(a):"");e.anniversary&&(s=(i=new Date(e.anniversary))?getDateInDefaultBrowserFormat(i):"");e.gstNo&&(n=e.gstNo);$("#blueCash").html(formatPrice(0)),$("#blueCredit").html(formatPrice(0)),$(".bs-cash").addClass("hidden"),$(".bs-credit").addClass("hidden");var l="true"===$("#isBlueCreditApplicable").val();e.blueCash||e.blueCredit?($(".bs-wallet-section").removeClass("hidden"),e.blueCash&&($(".bs-cash").removeClass("hidden"),$("#blueCash").html(formatPrice(e.blueCash))),e.blueCredit&&($(".bs-credit").removeClass("hidden"),$("#blueCredit").html(formatPrice(e.blueCredit)),l||$("#blueCreditContainerDiv").addClass("bs-credit-disabled"),e.blueCash||l||$("#useBsWallet").attr("disabled",!0))):($(".bs-wallet-section").addClass("hidden"),$("#useBsWallet").prop("checked",!1));e.customer&&(d=e.customer.customerPhone,$("#fullName").val(e.customer.userName).parent().addClass("auto-filled"),$("#mobileNumber").val(e.customer.customerPhone).parent().addClass("auto-filled"),$("#birthDay").val(o),o&&$("#birthDay").prop("disabled",!0),$("#spouseBirthDay").val(r),r&&$("#spouseBirthDay").prop("disabled",!0),$("#anniversary").val(s),s&&$("#anniversary").prop("disabled",!0),$("#gstNo").val(n).parent().addClass("auto-filled"));e.billingAddress&&($("#postCode").val(e.billingAddress.postCode).parent().addClass("auto-filled"),$("#cityName").val(e.billingAddress.cityName).parent().addClass("auto-filled"),e.billingAddress.state&&$("#state").val(e.billingAddress.state.id).parent().addClass("auto-filled"),$("#address").val(e.billingAddress.address).parent().addClass("auto-filled"),$("#street").val(e.billingAddress.street).parent().addClass("auto-filled"),$("#locality").val(e.billingAddress.locality).parent().addClass("auto-filled"),$("#landmark").val(e.billingAddress.landmark).parent().addClass("auto-filled"))}(e),e.otpId,n=e.blueCash,l=e.blueCredit,$("#otpId").val(e.otpId),$("#blueCredit").data("bluecredit",e.blueCash),$("#blueCash").data("bluecash",e.blueCash),e.customer&&e.customer.customerPhone?($("#mobileNumber").attr("readonly",!0),$("#mobileNumber").parent().addClass("disabled success").removeClass("error"),$("#mobileNumber").attr("disabled","disabled"),$("#mobileNumber_error").remove()):($("#mobileNumber").attr("readonly",!1),$("#mobileNumber").parent().removeClass("disabled"),$("#mobileNumber").removeAttr("disabled")),window.pineLabsTransactions=e.pineLabsTransactions,checkVerifiedOTPValidity(),e.hasVerifiedPAN?($("#isPANVerified").val("true"),$("#idType").val("PAN_CARD"),$("#idNumber").val(e.panNumber)):$("#isPANVerified").val("false"))},error:function(e){}})},posCartInventories:function posCartInventories(e){$.ajax({type:"POST",async:!1,url:GLOBAL_CTX+"/physical-store/inventory-data",dataType:"json",data:"inventoryIds="+e,success:function(t){if($(".store-order-page .error-container").remove(),t.hasError){var i=getNotificationErrorHtml(t.errorMsg);$(".store-order-page .left").prepend(i)}else{var o=function getStateListHTML(e){var t='<option value=""></option>';return e.forEach(function(e){t+='<option value="'+e.id+'">'+e.stateName+"</option>"}),t}(t.stateList);$(".autofill-state").html(o),$("#inventoryIds").val(e);var r=function getProductDetailsHTML(e,t){var a="";return e.forEach(function(e){e.inventoryId==t?a+='<div class="product product-item inventory-id_'+e.inventoryId+' free-gift">':a+='<div class="product product-item inventory-id_'+e.inventoryId+'">',a+='<div class="p-image">',a+='<img class="img-responsive" src="'+e.imageUrl+'" alt="'+e.title+'" width="120"/>',a+="</div>
52",a+='<div class="p-details">',a+='<div class="p-header row clearfix">',a+='<div class="product-title col-xs-6">',e.inventoryId==t?a+=e.title:a+='<a target="_blank" href="'+e.designUrl+'" title="'+e.title+'">'+e.title+"</a>",a+="</div>",a+='<div class="col-xs-6">',a+='<div class="product-pricing">',a+='<div class="price-info-block">',a+='<div class="new-price stackable">',a+="<span>"+formatPrice(e.price.sp)+"</span>",e.inventoryId==t&&(a+=' <span class="free-gift-label">(Free Gift)</span>'),a+="</div>",e.price.mrp>e.price.sp&&(a+='<div class="old-price">',a+="<span>"+formatPrice(e.price.mrp)+"</span>",a+="</div>"),a+='<div class="new-price unstackable hidden">'+formatPrice(e.price.mrp)+"</div>",a+="</div>",a+="</div>",a+="</div>",a+="</div>",a+='<div class="p-customization">',null!=e.size&""!==e.size&"00"!==e.size&&(a+='<div class="size-row">',a+='<div class="label col-xs-3">'+e.productCategory+" Size</div>",a+='<div class="value col-xs-9">'+e.size+"</div>",a+="</div>"),e.metalWt>0&&(a+='<div class="metal-row">',a+='<div class="label col-xs-3">Metal</div>',a+='<div class="value col-xs-9">'+e.metalPurity+" "+e.metalColor+" Gold, "+e.metalWt+" gram</div>",a+="</div>"),(e.diaWt>0||e.stoneWt>0||e.preSetSolitaireWt)&&(e.diaWt>0&&(a+='<div class="stone-row">',a+='<div class="label col-xs-3">Diamond</div>',a+='<div class="value col-xs-9">'+e.diaCount+" Diamond, "+e.diaCarat+" Carat, "+e.diaQuality+"</div>",a+="</div>"),e.stoneWt>0&&(a+='<div class="stone-row">',a+='<div class="label col-xs-3">Stone</div>',a+='<div class="value col-xs-9">'+e.stoneCount+" Stone, "+e.stoneCarat+" Carat</div>",a+="</div>"),e.preSetSolitaireWt>0&&(a+='<div class="stone-row">',a+='<div class="label col-xs-3">Solitaire</div>',a+='<div class="value col-xs-9">'+e.preSetSolitaireCount+" Solitaire, "+e.preSetSolitaireCarat+" Carat, "+e.preSetSolitaireQuality+"</div>",a+="</div>")),a+="</div>",a+='<div class="btn btn-gray remove-inventory-item" data-inventoryid="'+e.inventoryId+'" data-itemsrp="'+e.price.sp+'" data-itemmrp="'+e.price.mrp+'">Remove</div>',a+="</div>",a+="</div>"}),a}(t.inventoryDetails,t.freeGiftInventory)||"No Inventory Available";$("#productDetails").html(r),function updateStoreOrderSummary(e){var t=getTotalPriceAndItems(e),i="Total ("+t.items+" Item)";a.total=t,t.items>1&&(i="Total ("+t.items+" Items)");t.mrp>t.srp&&(u=t.mrp-t.srp);$(".you-pay").html(formatPrice(t.srp)),$(".you-pay").attr("total-amount",t.srp),$(".item-price .new-price").html(formatPrice(t.srp)),$(".item-price").attr("data-price",t.srp),$(".total-items").text(i),u>0&&$(".total-saving").html("You Save "+formatPrice(u))}(t.inventoryDetails),v=t.inventoryDetails,function updateStoreList(e){var t=function getListOptions(e){var t='<option value=""></option>';return e.forEach(function(e){t+='<option value="'+e[0]+'" data-name="'+e[1]+'">'+e[1]+"</option>"}),t}(e);$("#storeUsers").html(t)}(t.storeUsers),$("#isBlueCreditApplicable").val(t.isBlueCreditApplicable),isPineLabsEnabled&&(!function addIMEIList(e){var t=function getIMEIList(e){var t='<option value=""></option>';return e.forEach(function(e){t+='<option value="'+e+'">'+e+"</option>"}),t}(e);$("#IMEIId").html(t)}(t.IMEIList),function addAllowedPaymentModesForSwipe(e){var t=getAllowedPaymentModes(e);$("#pineLabsSwipePaymentMode").html(t)}(t.pineLabsAllowedPaymentModes),window.pineLabsAllowedPaymentModes=t.pineLabsAllowedPaymentModes,updateSwipeOptions(t.pineLabsAllowedPaymentModes,"#pineLabsSwipePaymentMode"),updateSwipeOptions(t.pineLabsAllowedPaymentModes,"#swipePaymentMode")),$("#freeGiftInventory").val(t.freeGiftInventory),function applyFreeGiftVoucher(e){if(e.freeGiftMessage){var t=function getFreeGiftMessageHTML(e){return'<div class="gift-message free-gift-eligible-info"> <div class="gift-message-inner light-green-bg">'+e+"</div> </div>"}(e.freeGiftMessage);$(".place-order-wrap").prepend(t),localStorage.setItem("freeGiftDiscountVoucherName","")}else if(e.freeGiftDiscountVoucherName){var a=storeInventoryUtil.getCurrentList().join(","),i="voucherCodes="+e.freeGiftDiscountVoucherName+"&inventoryIdsList="+a;localStorage.setItem("freeGiftDiscountVoucherName",e.freeGiftDiscountVoucherName),useVoucher(i,""),$("#voucherCode-0").val(e.freeGiftDiscountVoucherName),setTimeout(function(){$("#useVoucher").trigger("click")},0)}}(t)}},error:function(e){}})},applyVoucher:function applyVoucher(e){$(e.target).addClass("loading");for(var t=$(".voucherCode"),a="voucherCodes=",o=0;o<t.length;o++)a+=t[o].value,o!=t.length-1&&(a+=",");var r=storeInventoryUtil.getCurrentList().join(",");a+="&",$("#storeUserEmail").val(),useVoucher(a+"inventoryIdsList="+r+"&customerEmail="+$("#email").val()+($.isEmptyObject(i)?"":"&"+$.param(i)),e)},removeVoucher:removeVoucher,createVoucher:function createVoucher(){var e=$
52("#selectVoucher").val(),t=$("#calculatedOn").val(),o=a.total.srpBeforeDiscount;$("#percent-voucher-message").addClass("hidden"),"Percentage Discount"===e&&("DIAMOND_PRICE"===t?o=a.total.diamondCost:"MAKING_CHARGE"===t&&(o=a.total.makingCharge));var r=0,s="";if($(".flat-discount #voucher-message").addClass("hidden"),"Percentage Discount"===e){var n=$("#percentageDiscount").val();if(i.percentValue=n,(r=parseInt(Math.ceil(o*n/100)))>o&&""!==t)return!1;s="Are you sure to give a discount of "+n+"% ?",$(".percentage-discount .voucher-success-msg")}else if("Flat Discount"===e){if((r=parseInt($("#flatDiscount").val()))>o)return $(".flat-discount .v-msg").text("Discount should not be greater than total payable amount."),$(".flat-discount #voucher-message").removeClass("hidden"),!1;$(".flat-discount .voucher-success-msg"),s="Are you sure to give a discount of Rs. "+r+" ?"}a.voucherDiscount=r,i.voucherType=e,i.calculatedOn=t,i.discountAmount=r,r>0&&confirm(s)&&$("#applyVoucherBtn").trigger("click")},removeInventoryItem:function removeInventoryItem(e){var t=$(e.target).data("inventoryid")+"";storeInventoryUtil.removeInventory(t),$(e.target).parents(".inventory-id_"+t).remove(),a.total.items>1?location.reload():location.href=GLOBAL_CTX+"/"},handleBsWallet:function handleBsWallet(e){e.target.checked?($("#useBlueCashBool").val("true"),updateBlueCashAndCredit(!0),updateAmountLeftToPay(),isOtpVerified=!0):($("#useBlueCashBool").val("false"),removeBlueCashAndCredit(),updateAmountLeftToPay(),isOtpVerified=!1)},resendOTP:function resendOTP(e){var t=$("#email").val(),a=$("#otpId").val(),i=$("#mobileNumber").val();t?$.ajax({type:"POST",url:GLOBAL_CTX+"/physical-store/bs-wallet/send-otp",dataType:"json",data:"otpId="+a+"&email="+t+"&customerphone="+i,success:function(t){t.hasError||($("#otpId").val(t.otpId),$(e).hasClass("resend-otp")&&($(e).addClass("hidden"),$(".otp-resent").removeClass("hidden"),setTimeout(function(){$(e).removeClass("hidden"),$(".otp-resent").addClass("hidden")},6e3)))},error:function(e){}}):($(e).parents(".OTPPopup").find("#otp-error").text("Email is required"),$(e).parents(".OTPPopup").find(".invalid-otp-code").removeClass("hidden"))},submitBsWalletOTP:function submitBsWalletOTP(e,t){$.ajax({type:"POST",url:GLOBAL_CTX+"/physical-store/bs-wallet/verify-otp",dataType:"json",data:"otpId="+e+"&otpString="+t,success:function(e){e.hasError?($(".invalid-otp-code").removeClass("hidden"),$("#bsWalletErrorMsg #otp-error").text(e.errorMsg)):(window.isOtpVerified=e.isOtpVerified,e.isOtpVerified?($("#useBlueCashBool").val("true"),$(".invalid-otp-code").addClass("hidden"),updateBlueCashAndCredit(!0),updateAmountLeftToPay(),$.fancybox.close()):($(".invalid-otp-code").removeClass("hidden"),$("#bsWalletErrorMsg #otp-error").text(e.errorMsg)))},error:function(e){}})},inventoryData:a,updateAmountLeftToPay:updateAmountLeftToPay,removePaymentOption:function removePaymentOption(e){$(e.target).parents(".order-details-section").remove()},getTotalAppliedAmount:getTotalAppliedAmount,resetVoucherFields:function resetVoucherFields(){$(".voucher-details-wrap .form-control").val("").parent().removeClass("success focused error"),$(".voucher-details-wrap .messages").remove(),$(".voucher-details-wrap .notifications").html("").fadeOut()},showSwipePaymentOptions:function showSwipePaymentOptions(e){var t=$(e.target).parents(".order-details-section");resettingFields(t),"CARD"===e.target.value?(t.find(".amount").removeClass("hidden"),t.find(".card-number").removeClass("hidden"),t.find(".card-type").removeClass("hidden"),t.find(".ref-number").removeClass("hidden"),t.find(".approval-code").removeClass("hidden"),t.find(".remarks").removeClass("hidden")):"QRCODE"===e.target.value&&(t.find(".amount").removeClass("hidden"),t.find(".ref-number").removeClass("hidden"),t.find(".remarks").removeClass("hidden"))},showBankTransferPaymentOptions:function showBankTransferPaymentOptions(e){var t=$(e.target).parents(".order-details-section");resettingFields(t),"UPI"===e.target.value||"RTGS"===e.target.value||"NEFT"===e.target.value?(t.find(".amount").removeClass("hidden"),t.find(".ref-number").removeClass("hidden"),t.find(".remarks").removeClass("hidden")):"CHEQUE"===e.target.value?(t.find(".amount").removeClass("hidden"),t.find(".cheque-number").removeClass("hidden"),t.find(".cheque-date").removeClass("hidden"),t.find(".
52issuing-bank").removeClass("hidden"),t.find(".remarks").removeClass("hidden")):"EMI"===e.target.value&&(t.find(".amount").removeClass("hidden"),t.find(".ref-number").removeClass("hidden"),t.find(".remarks").removeClass("hidden"))},calculateCashPerItem:function calculateCashPerItem(e){var t=parseInt($(e.target).data("entry"))*parseInt($(e.target).val());if(t>-1&&$(e.target).parent().find(".item-total").html(" = <span class='itemTotal'>"+t+"</span>"),calculateTotalCash(e.target)>=panLimit)return alert("The maximum cash limit is Rs. "+(panLimit-1)),!1;$(e.target).parents(".order-details-section").find("#amount").val(calculateTotalCash(e.target)).parent().addClass("focused"),handlePanNumberField(e),updateAmountLeftToPay()},useVoucher:useVoucher,sendVoucherOTP:function sendVoucherOTP(e){var t=e.target;r=$(t).parents(".voucher-code-row").find(".voucherCode").val(),$.ajax({type:"POST",url:GLOBAL_CTX+"/physical-store/voucher/send-otp",dataType:"json",data:"voucherCode="+r,success:function(e){e.hasError?alert(e.errorMsg):e.isOtpRequired?(o=e.otpId,s=t,c=e.customerPhone,function handleVoucherOTPPopup(e){commonFancyBox({width:450,wrapCSS:"fancybox-style-4",href:"#POSVoucherOTPPopup",resetPopup:function(){}});var t=maskNumber(c,2,6);$("#maskedVoucherMobileNumber").html(t)}()):($(t).addClass("btn-green").html("Voucher Verified"),$("#applyVoucherBtn").removeClass("btn-disabled"))},error:function(e){}})},resendVoucherOTP:function resendVoucherOTP(e){$.ajax({type:"POST",url:GLOBAL_CTX+"/physical-store/voucher/send-otp",dataType:"json",data:"otpId="+o+"&voucherCode="+r,success:function(e){e.hasError?alert(e.errorMsg):e.isOtpRequired&&(o=e.otpId)},error:function(e){}})},verifyVoucherOTP:function verifyVoucherOTP(e){$.ajax({type:"POST",url:GLOBAL_CTX+"/physical-store/voucher/verify-otp",dataType:"json",data:"otpId="+o+"&otpString="+e,success:function(e){e.hasError?($(".invalid-voucher-otp-code").removeClass("hidden"),$("#voucher-otp-error").text(e.errorMsg)):($(s).addClass("btn-green").html("Voucher Verified"),$("#applyVoucherBtn").removeClass("btn-disabled"),$.fancybox.close())},error:function(e){$(".invalid-voucher-otp-code").removeClass("hidden"),$("#voucher-otp-error").text(res.errorMsg)}})},payUsingPineLabs:function payUsingPineLabs(e){var t=$("#pineLabsAmount").val(),a=$("#pineLabsSwipePaymentMode").val(),i=$("#IMEIId").val(),o=$("#postCode").val(),r=$("#email").val(),s=$("#mobileNumber").val(),n=$("#fullName").val(),l=$("input#payUsingPineLabs")[0].getAttribute("data-paymentrow");return $('input[name="storeOrderPaymentList['+l+'].swipePaymentType"]').val(a),s&&""!==s&&10==s.length?r&&""!==r&&/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(r)?t&&""!==t&&a&&""!==a&&i&&""!==i&&n&&""!==n?void $.ajax({type:"POST",url:GLOBAL_CTX+"/pine-labs/upload-transaction",dataType:"json",data:"Amount="+t+"&AllowedPaymentMode="+a+"&IMEI="+i+"&postCode="+o+"&customerEmail="+r+"&customerMobile="+s+"&customerFullName="+n,success:function(e){e.hasError?alert(e.errorMessage):($(".pinelabs-screen.screen-1").addClass("hidden"),$(".pinelabs-screen.screen-2").removeClass("hidden"),$("#pinelabsScreen2Email").html(r),$("#pinelabsScreen2Phone").html(s),$("#pinelabsScreen2IMEIId").html(i),$("#pinelabsScreen2Amount").html('<span class="WebRupee">Rs. </span>'+t),$("#getPineLabsStatus").attr("onclick","storeCustomerDetailsUtil.getPineLabsTransactionStatus(event,"+e.PlutusTransactionReferenceID+")"),$("#pineLabsCancel").attr("onclick","storeCustomerDetailsUtil.checkStatusAndCancelPineLabsTransaction(event,"+e.PlutusTransactionReferenceID+")"),$("#pinelabs-popup-close").addClass("hidden"))},error:function(e){}}):($(".pine-labs-error").removeClass("hidden"),$(".pine-labs-error #otp-error").html("Please enter valid customer details"),!1):($(".pine-labs-error").removeClass("hidden"),$(".pine-labs-error #otp-error").html("Please enter a valid email id"),!1):($(".pine-labs-error").removeClass("hidden"),$(".pine-labs-error #otp-error").html("Please enter a valid mobile number"),!1)},getPineLabsTransactionStatus:getPineLabsTransactionStatus,cancelPineLabsTransaction:cancelPineLabsTransaction,otpPopupForPlaceOrder:function otpPopupForPlaceOrder(e){commonFancyBox({width:450,wrapCSS:"fancybox-style-4",href:"#placeOrderOTPPopup",resetPopup:function(){},afterLoad:function(){}}),d=$("#mobileNumber").val();var t=maskNumber(d,2,6);$(".place-order-otp-form-wrapper #maskedMobileNumber").html(t);var a=$("#email").val();otpUtilNew.sendOTP(e,"storepayment",null,null,d,a)},verifyPlaceOrderOTP:function verifyPlaceOrderOTP(e,t){var a=otpUtilNew.verifyOTP(e,"",t);
52a.hasError?($(".invalid-otp-code").removeClass("hidden"),$("#placeOrderOTPErrorMsg #otp-error").text(a.errorMsg)):$("#storeCustomerDetails").submit()},checkStatusAndCancelPineLabsTransaction:function checkStatusAndCancelPineLabsTransaction(e,t){var a=window.confirm("Are you sure you want to cancel this transaction ?");getPineLabsTransactionStatus(e,t),a&&cancelPineLabsTransaction(0,t)},populatePineLabsTransactions:function populatePineLabsTransactions(t){if(isPineLabsEnabled&&t&&t.length>0){var a=[];t.forEach(function(t,i){"PROCESSED"===t.status?(i>0&&addMorePaymentRow(),updatePineLabsPaymentOptions(t.transactionDataMap,e,t.plutusTransactionReferenceID),updateAmountLeftToPay()):"INITIATED"===t.status&&a.push(t)}),$("#deliveryAtStore").trigger("click"),a.forEach(function(a,i){addMorePaymentRow(),$("#getPineLabsStatus").attr("onclick","storeCustomerDetailsUtil.getPineLabsTransactionStatus(event,"+a.plutusTransactionReferenceID+")"),$("#pineLabsCancel").attr("onclick","storeCustomerDetailsUtil.checkStatusAndCancelPineLabsTransaction(event,"+a.plutusTransactionReferenceID+")"),handlePinelabsPopup(e);var o=$("#email").val(),r=$("#mobileNumber").val();$("#pinelabsScreen2Email").html(o),$("#pinelabsScreen2Phone").html(r),$("#pinelabsScreen2IMEIId").html(t[0].physicalStorePineLabsDeviceMapping.IMEIId),$("#pinelabsScreen2Amount").html('<span class="WebRupee">Rs. </span>'+a.amount),$(".pinelabs-screen.screen-1").addClass("hidden"),$(".pinelabs-screen.screen-2").removeClass("hidden")})}$("#pinelabs-popup-close").addClass("hidden")},displayCustomerIDProofForm:function displayCustomerIDProofForm(e){switch(e.target.value){case"PAN_CARD":$("#form60andAlternateIDProofSection").hide(),$("#panVerificationSection").show(),$("#idType").val("PAN_CARD");break;case"FORM_60":$("#panVerificationSection").hide(),$("#form60andAlternateIDProofSection").show(),$("#idType").val("");break;default:$("#form60andAlternateIDProofSection").hide(),$("#panVerificationSection").hide(),$("#idType").val("")}!function clearCustomerIDProofFormNotifications(){$(".notifications-form60AndAlternateIDProof").empty(),$(".notifications-pan").empty()}()},checkIfIDVerificationRequiredAndIsComplete:function checkIfIDVerificationRequiredAndIsComplete(){if("true"===$("#isPANVerificationRequired").val()){var e=$("#isPANVerified").val(),t=$("#isForm60AndAlternateIDProofUploaded").val();if("false"===e&&"false"===t)return!1}return!0},loadPANVerificationForm:function loadPANVerificationForm(){var e=$("#email").val()||$("#customerEmail").val();if(e=e.trim()){var t=$("#panNumber").val().trim();if(t)if(t.match(/^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/)){$("#panNumber").prop("readonly",!0),$("#getStatusBtn").prop("disabled",!0);var a="email="+e+"&panNumber="+t,i=panVerification.getPANStatus(a);if(i.hasError)return $("#panNumber").prop("readonly",!1),$("#getStatusBtn").prop("disabled",!1),void $(".notifications-pan").html(getNotificationErrorHtml(i.errorMessage));if($("#getStatusBtnSection").hide(),i.isPANVerified)return $(".notifications-pan").html(getNotificationSuccessHtml("PAN verification already done.")),void $("#verificationTypeSelect").prop("disabled",!0);$("#nameOnPANSection").show(),i.isPANUploaded?$(".notifications-pan").html(getNotificationSuccessHtml("PAN already uploaded, proceed for verification.")):($(".notifications-pan").html(getNotificationSuccessHtml("Please upload PAN and proceed for verification.")),$("#uploadPANSection").show(),$("#uploadPANSection .customfile-input").remove(),$("#panFile").removeClass("customfile-input-hidden")),$("#verifyPANBtnSection").show(),$("#resetFormSection").show()}else $(".notifications-pan").html(getNotificationErrorHtml("Enter valid PAN number to proceed."));else $(".notifications-pan").html(getNotificationErrorHtml("Please enter PAN number."))}else $(".notifications-pan").html(getNotificationErrorHtml("Please enter email."))},submitPANVerificationForm:function submitPANVerificationForm(e){e.preventDefault();var t=$("#mobileNumber").val()||$("#contactNumber").val()||$("#customerPhone").val()||$("#mobileNo").val();if(t){var a=$("#email").val();if(a){var i=$("#panNumber").val().trim(),o=$("#nameOnPAN").val().trim();if(o)if($("#panFile").is(":visible")&&0===$("#panFile")[0].files.length)$(".notifications-pan").html(getNotificationErrorHtml("Please upload PAN."));else{$("#verifyPANBtn").prop("disabled",!0);var r=new FormData;r.append("email",a),r.append("customerPhone",t),r.append("idType","PAN_CARD"),r.append("idNumber",i),r.append("username",o),$("#panFile")[0].files.length>0&&r.append("fileData",$("#panFile")[0].files[0]);var s=panVerification.verifyPAN(r);if(s.hasError)return $(".notifications-pan").html(getNotificationErrorHtml(s.errorMessage+" Please try again later.")),void $("#verifyPANBtn").removeAttr("disabled");$(".notifications-pan").html(getNotificationSuccessHtml("PAN verified successfully")),$("#verificationTypeSelect").prop("disabled",!0),$("#nameOnPAN").prop("readonly",!0),$("#panFile").prop("disabled",!0),$("#resetFormSection").hide(),$("#isPANVerified").val("true"),$("#idNumber").val($("#panNumber").val())}else $(".notifications-pan").html(getNotificationErrorHtml("Please enter name as on PAN."))}else $(".notifications-pan").html(getNotificationErrorHtml("Please enter email."))}else $(".notifications-pan").html(getNotificationErrorHtml("Please enter phone number."))},resetPANVerificationForm:function resetPANVerificationForm(){$("#panNumber").prop("readonly",!1),$("#panNumber").val(""),$("#getStatusBtn").prop("disabled",!1),$("#nameOnPAN").val(""),$("#panFile").val(""),$("#panOTP").val(""),$("#panOTP").prop("readonly",!1),$("#panOTPId").val(""),$("#panSendOTPBtn").prop("disabled",!1),$("#panResendOTPBtn").prop("disabled",!1),$("#panVerifyOTPBtn").prop("disabled",!1),$("#verifyPANBtn").prop("disabled",!1),$(".notifications-pan").empty(),$("#getStatusBtnSection").show(),$("#nameOnPANSection").hide(),$("#uploadPANSection").hide(),$("#panOTPSection").hide(),$("#panSendOTPBtnSection").hide(),$("#panResendOTPBtnSection").hide(),$("#panVerifyOTPBtnSection").hide(),$("#verifyPANBtnSection").hide(),$("#resetFormSection").hide()}}}(),$(document).ready(function(){if("store-customer-details"===PAGE_TYPE){var e=storeInventoryUtil.getCurrentList().join(",");storeCustomerDetailsUtil.posCartInventories(e),setTimeout(function(){$("#paymentType").trigger("change"),$("#toggleSwitch").is(":checked")&&$("#toggleSwitch").trigger("change")},0),clearRadio($(".clear-radio")),$("#verifyBsWalletOTP").on("submit",function(e){e.preventDefault();var t=$(this).find("#otp").val(),a=$("#otpId").val();otpEnteredOnPayment(),storeCustomerDetailsUtil.submitBsWalletOTP(a,t)}),$("#verifyPlaceOrderOTP").on("submit",function(e){e.preventDefault();var t=$(this).find("#otp").val(),a=$("#otpId").val();storeCustomerDetailsUtil.verifyPlaceOrderOTP(t,a)}),$("#verifyPOSVoucherOTP").on("submit",function(e){e.preventDefault();var t=$(this).find("#otp").val();storeCustomerDetailsUtil.verifyVoucherOTP(t)}),$("#verifyOTPOrPinForGC").on("submit",function(e){if(e.preventDefault(),!validateForm("verifyOTPOrPinForGC"))return!1;var t=$("#pin").val(),a=parseInt($(".you-pay").attr("total-amount")),i=$("input#gcCode").val(),o=$("#phoneNumber").val(),r="TRUE"===isCaptchaEnabled?mtcaptcha.getVerifiedToken():"",s=giftCardUtil.validateAndRedeemGC(r,a,i,t,o,"");s.hasError?utilityFuncForOTP.showOtpErrorMessage("#giftCardPopup",s.message):($("#applyVoucherBtn").trigger("click"),$.fancybox.close())}),$("body").on("click",".verify-voucher",function(e){storeCustomerDetailsUtil.sendVoucherOTP(e)})}$("#toggleSwitch").on("change",storeCustomerDetailsUtil.toggleAddress),$(".voucher").on("change",storeCustomerDetailsUtil.handleVoucher),$("#selectVoucher").on("change",storeCustomerDetailsUtil.handleCreateV
52oucher),$("#addMorePaymentOptions").on("click",storeCustomerDetailsUtil.addMorePaymentOptions),$("#addMoreVoucher").on("click",storeCustomerDetailsUtil.addMoreVoucherOptions),$("#storeCustomerDetails #email").on("blur",debounce(storeCustomerDetailsUtil.getCustomerData,1e3)),$("#mtoSubDetails #mtoEmail").on("blur",debounce(storeCustomerDetailsUtil.showSubOptions,0)),$("body").on("click",".remove-inventory-item",storeCustomerDetailsUtil.removeInventoryItem),$("#useBsWallet").on("change",storeCustomerDetailsUtil.handleBsWallet),$(document).on("blur","#storeCustomerDetails .voucherCode",function(e){debounce(checkAndOpenGCPopupPOS(e),2e3),$("#applyVoucherBtn").addClass("btn-disabled")}),$(".clear-radio").on("click",function(){window.voucherAppliedCount=0,clearRadio($(this)),storeCustomerDetailsUtil.resetVoucherFields(),storeCustomerDetailsUtil.removeVoucher(),$(".select-voucher").addClass("hidden"),$(".voucher-code").addClass("hidden"),$(".add-more-voucher").addClass("hidden"),$(".percentage-discount").addClass("hidden"),$(".voucher-calculation-section").addClass("hidden"),$(".flat-discount").addClass("hidden"),$(".voucher-create-btn").addClass("hidden"),$(".voucher-details-wrap .remarks").addClass("hidden"),$(".multiple-vouchers-wrap .additional-vouchers").html(""),$("#verifyVoucher").removeClass("btn-green").html("Verify Voucher"),$("#applyVoucherBtn").addClass("btn-disabled")}),"store-customer-details"===PAGE_TYPE&&($("body").on("blur",".amount-input",storeCustomerDetailsUtil.handlePanNumberField),$("body").on("blur",".amount-input",storeCustomerDetailsUtil.updateAmountLeftToPay)),$("#placeStoreOrder").on("click",function(){if(!validateForm("storeCustomerDetails"))return showAddressErrorIfAny(),!1;var e=storeCustomerDetailsUtil.inventoryData.total.srp,t=storeCustomerDetailsUtil.getTotalAppliedAmount(),a=$("#isCustomerDeliveryBool").val(),i=$("#gstNo").val(),o=$("#postCode").val(),r=$("#cityName").val(),s=$("#state").val(),n=$("#cityName").offset().top,l=!1;return $(".address-section .fl-wrap").each(function(){if($(this).hasClass("error"))return l=!0,!1}),""==i&&$("#toggleSwitch").is(":checked")?($("#toggleSwitch").trigger("click"),$("html,body").animate({scrollTop:n-200},1e3),alert("Please add GST Number"),!1):""!=o&&(""==r||""==s)||""!=r&&(""==o||""==s)||""!=s&&(""==o||""==r)?($("#toggleSwitch").trigger("click"),$("html,body").animate({scrollTop:n-200},1e3),alert("Please add pincode/city/state in billing address"),!1):l?(setTimeout(function(){$("#toggleSwitch").is(":checked")||($("#toggleSwitch").trigger("click"),$("html,body").animate({scrollTop:n-100},1e3))},0),!1):"false"==a&&t>-1&&t!==e?(alert("Amount should be equal to payable amount."),storeCustomerDetailsUtil.updateAmountLeftToPay(),!1):(0===window.voucherAppliedCount&&(storeCustomerDetailsUtil.removeVoucher(),storeCustomerDetailsUtil.resetVoucherFields(),$(".clear-radio").trigger("click")),storeCustomerDetailsUtil.handlePanNumberField(),storeCustomerDetailsUtil.checkIfIDVerificationRequiredAndIsComplete()?(getDropdownSelectedOptionValue("#addressSection","#stateName"),getDropdownSelectedOptionValue("#shippingAddressSection","#stateName"),isOtpVerified?void $("#storeCustomerDetailsSubmit").trigger("click"):(storeCustomerDetailsUtil.otpPopupForPlaceOrder($(this)),!1)):($(".notifications-pan").html(getNotificationErrorHtml("Customer PAN Verification or Form 60 with Alternate ID Proof required.")),!1))}),$("#placeStoreOrder").on("dblclick",function(e){e.preventDefault()}),$(".customerDelivery").on("change",function(e){0!==$(".customerDelivery:checked").length?($("#placeStoreOrder").removeClass("hidden"),1==$(".customerDelivery:checked").val()?($("#shippingAddressSection .make-require").attr("required",!0),$("#isCustomerDeliveryBool").val("true"),$("#placeStoreOrder").html("Generate Invoice"),$("#storePaymentsDiv").addClass("hidden"),$("#shippingAddressDiv").removeClass("hidden")):($("#shippingAddressSection .make-require").removeAttr("required"),$("#isCustomerDeliveryBool").val("false"),$("#placeStoreOrder").html("Place Order"),$("#storePaymentsDiv").removeClass("hidden"),$("#shippingAddressDiv").addClass("hidden"))):window.alert("You need to choose an option!")}),$("#storeCustomerDetails").on("submit",function(){if(!validateForm("storeCustomerDetails"))return!1;$("#placeStoreOrder").addClass("loading")}
52),$("#applyVoucherBtn").on("click",storeCustomerDetailsUtil.applyVoucher),$("#createVoucherBtn").on("click",storeCustomerDetailsUtil.createVoucher),$("body").on("click","#deleteDiscount",function(){window.voucherAppliedCount=0,storeCustomerDetailsUtil.removeVoucher(),storeCustomerDetailsUtil.resetVoucherFields(),$(".clear-radio").trigger("click")}),$("body").on("click",".bs-wallet-otp",storeCustomerDetailsUtil.resendOTP),$("body").on("click",".pos-voucher-otp",storeCustomerDetailsUtil.resendVoucherOTP),$("body").on("click",".place-order-otp",function(){var e=$("#mobileNumber").val(),t=$("#email").val();otpUtilNew.sendOTP($(this),"storepayment",null,null,e,t)})}),$(document).ready(function(){"product"===PAGE_TYPE&&storeUser&&($("#placeMTOOrder").on("click",function(e){handleMTOOrder(e)}),$("#placeMTOOrder").on("dblclick",function(e){e.preventDefault()})),$("#cod_availability_submit").on("click",function(){$("#cashondelivery-content .payment_module.new-style").removeClass("pulse animated"),setTimeout(function(){$("#cashondelivery-content .payment_module.new-style").addClass("pulse animated")},200)}),$("#franchiseInquiryForm").on("submit",function(e){e.preventDefault();var t=$(this).serialize();validateForm("franchiseInquiryForm")&&createFranchiseLeads(t)}),tahCartCount>0?($("#tahCartMessage").html(tahCartCount+"/"+tahMaxDesigns+" design(s) in trial cart"),document.querySelector("#tahCartMessage")&&(document.querySelector("#tahCartMessage").dataset.tahcartcount=tahCartCount),$(".tah-sticky-wrapper").removeClass("hidden")):($("#tahCartMessage").html(""),document.querySelector("#tahCartMessage")&&(document.querySelector("#tahCartMessage").dataset.tahcartcount=0),$(".tah-sticky-wrapper").addClass("hidden")),$(".tah-sticky-wrapper .icon-close").on("click",function(){$(".tah-sticky-wrapper").addClass("hidden")}),activeVideoCallCount>0?($("#tahVCCartMessage").html(activeVideoCallCount+"/"+videoCallTahMaxDesigns+" design(s) in trial cart"),document.querySelector("#tahVCCartMessage")&&(document.querySelector("#tahVCCartMessage").dataset.tahvccartcount=activeVideoCallCount),$(".tah-vc-sticky-wrapper").removeClass("hidden")):($("#tahVCCartMessage").html(""),document.querySelector("#tahVCCartMessage")&&(document.querySelector("#tahVCCartMessage").dataset.tahvccartcount=0),$(".tah-vc-sticky-wrapper").addClass("hidden")),$(".tah-vc-sticky-wrapper .icon-close").on("click",function(){$(".tah-vc-sticky-wrapper").addClass("hidden")})}),$(document).ready(function(){$("body").on("click",".customerEmail-tooltip-overlay",function(){$("#edit-phone-wrapper .jtooltip").removeClass("active"),$(this).remove()})}),$(".gold-filter .filter span").on("click",function(e){var t=$(this).parent().data("weight"),a=$(this).parent().data("purity");$(this).parents("#top-filter").find(".filter").removeClass("active"),$(this).parent().addClass("active"),$("#mainContent .ajax-loading").removeClass("hidden"),0==t||0==a?$("#grid-view-result .three-column-browse").removeClass("hidden"):$("#grid-view-result .three-column-browse").addClass("hidden"),setTimeout(function(){$("#mainContent .ajax-loading").addClass("hidden")},300),$("#grid-view-result .weight-"+t).removeClass("hidden"),$("#grid-view-result .purity-"+a).removeClass("hidden")}),otpUtil={sendOTP:function sendOtpAPI(e,t,a,i){var o=null;return $.ajax({type:"POST",async:!1,url:GLOBAL_CTX+"/otp/send-otp",dataType:"json",data:"email="+t+"&otpType="+a+"&customerphone="+i+"&otpId="+e,success:function(e){o=e},error:function(e){o=e}}),o},verifyOTP:function verifyOtpAPI(e,t,a){var i=null;return $.ajax({type:"POST",async:!1,url:GLOBAL_CTX+"/otp/verify-otp",dataType:"json",data:"otpType="+e+"&otpId="+t+"&otpString="+a,success:function(e){i=e},error:function(e){i=res}}),i}},window.countdownTimerRef,window.isOtpVerified=!1,$(document).ready(function(){"store-customer-details"==PAGE_TYPE&&(setTimeout(function(){v2.Form.prototype.scrollToFirstWhenFail=!1},3e3),$("#payUsingPineLabs").on("submit",function(){validateForm("payUsingPineLabs")&&storeCustomerDetailsUtil.payUsingPineLabs()}))}),$(document).ready(function(){"browse"!==PAGE_TYPE&&"store-catalog"!==PAGE_TYPE||(selectedFiltersTags=[],urlQueryString="",$("body").on("click",".vert-filters .filter-item",function(){handleFilterOptionChange($(this))}),window.filterClickTimeoutId=0)}
52),panVerification=function(){function checkIfPANRequiredAndIsVerified(){if("true"===$("#isPANVerificationRequired").val()&&"false"===$("#isPANVerified").val())return!1;return!0}return{verifyPAN:function verifyPAN(e){var t=null;return $.ajax({async:!1,cache:!1,type:"POST",url:GLOBAL_CTX+"/account/verify-pan",data:e,processData:!1,contentType:!1,dataType:"json",success:function(e){t=e},error:function(e){t=e}}),t},getPANStatus:function getPANStatus(e){var t=null;return $.ajax({async:!1,cache:!1,type:"GET",url:GLOBAL_CTX+"/account/pan-status",data:e,dataType:"json",success:function(e){t=e},error:function(e){t=e}}),t},checkIfPANRequiredAndIsVerified:checkIfPANRequiredAndIsVerified,validateForm:function validateForm(){if(!checkIfPANRequiredAndIsVerified()){if(0===$("#panFile").length)return!0;if(0===$("#panFile")[0].files.length)return $(".notifications-pan").html(getNotificationErrorHtml("Please upload PAN.")),!1;if(0!==$("#consentCheckbox").length&&!$("#consentCheckbox").prop("checked"))return $(".notifications-pan").html(getNotificationErrorHtml("Please provide consent by ticking the checkbox.")),!1;if(0!==$("#panOTPVerified").length&&"false"===$("#panOTPVerified").val())return $(".notifications-pan").html(getNotificationErrorHtml("Please get OTP verified.")),!1}return!0}}}(),form60AndAlternateIDProof={loadForm:function loadForm(e){var t=$("#email").val()||$("#customerEmail").val();if(t=t.trim()){var a=$("#idType").val().trim();if(a){var i=$("#idNumber").val().trim();if(i){$("#idTypeSelect").prop("disabled",!0),$("#idNumber").prop("readonly",!0),$("#getDetailsBtn").prop("disabled",!0);var o=function getDetails(e){var t=null;return $.ajax({async:!1,cache:!1,type:"GET",url:GLOBAL_CTX+"/account/form60-and-proof-details",data:e,processData:!1,contentType:!1,dataType:"json",success:function(e){t=e},error:function(e){t=e}}),t}("email="+t+"&idType="+a+"&idNumber="+i);if(o.hasError)return $(".notifications-pan").html(getNotificationErrorHtml(o.errorMessage)),$("#idTypeSelect").prop("disabled",!1),$("#idNumber").prop("readonly",!1),void $("#getDetailsBtn").prop("disabled",!1);$("#getDetailsBtnSection").hide(),o.isIDProofUploaded||o.isForm60Uploaded?o.isIDProofUploaded&&!o.isForm60Uploaded?($("#uploadForm60Section").show(),$("#uploadForm60AndIDProofBtnSection").show(),$("#resetForm60AndIDProofFormSection").show(),$(".notifications-pan").html(getNotificationInfoHtml("Please upload Form 60. ID Proof already uploaded."))):!o.isIDProofUploaded&&o.isForm60Uploaded?($("#uploadIDProofSection").show(),$("#uploadForm60AndIDProofBtnSection").show(),$("#resetForm60AndIDProofFormSection").show(),$(".notifications-pan").html(getNotificationInfoHtml("Please upload ID Proof. Form 60 already uploaded."))):($(".notifications-pan").html(getNotificationSuccessHtml("ID Proof and Form 60 were already uploaded.")),$("#isForm60AndAlternateIDProofUploaded").val("true"),$("#verificationTypeSelect").prop("disabled",!0)):($("#uploadIDProofSection").show(),$("#uploadForm60Section").show(),$("#uploadForm60AndIDProofBtnSection").show(),$("#resetForm60AndIDProofFormSection").show(),$(".notifications-pan").html(getNotificationInfoHtml("Please upload ID Proof and Form 60.")))}else $(".notifications-pan").html(getNotificationErrorHtml("Please enter ID Number."))}else $(".notifications-pan").html(getNotificationErrorHtml("Please Select ID Proof Type."))}else $(".notifications").html(getNotificationErrorHtml("Please enter email."))},submitForm:function submitForm(){var e=$("#idType").val().trim();if(e){var t=$("#idNumber").val().trim();if(t)if($("#idProofFile").is(":visible")&&0===$("#idProofFile")[0].files.length)$(".notifications-pan").html(getNotificationErrorHtml("Please upload ID Proof."));else if($("#form60File").is(":visible")&&0===$("#form60File")[0].files.length)$(".notifications-pan").html(getNotificationErrorHtml("Please upload Form 60."));else{var a=$("#mobileNumber").val();if(a=a.trim()){var i=$("#email").val()||$("#customerEmail").val();if(i=i.trim()){var o=$("#userName").val()||$("#fullName").val()||$("#customerName").val()||$("#customerName").text();if(o=o.trim(),i){$("#uploadForm60AndIDProofBtn").prop("disabled",!0);var r=new FormData;r.append("email",i),r.append("customerPhone",a),r.append("username",o),r.append("idType",e),r.append("idNumber",t),$("#idProofFile")[0].files.length>0&&r.append("idProofFile",$("#idProofFile")[0].files[0]),$("#form60File")[0].files.length>0&&r.append("form60File",$("#form60File")[0].files[0]);var s=function upload(e){var t=null;return $.ajax({async:!1,cache:!1,type:"POST",url:GLOBAL_CTX+"/account/form60-and-proof",data:e,processData:!1,contentType:!1,dataType:"json",success:function(e){t=e},error:function(e){t=e}}),t}(r);if(s.hasError)return $(".notifications-pan").html(getNotificationErrorHtml(s.errorMessage)),void $("#uploadForm60AndIDProofBtn").prop("disabled",!1);$(".notifications-pan").html(getNotificationSuccessHtml("Uplaod Successful.")),$("#verificationTypeSelect").prop("disabled",!0),$("#idTypeSelect").prop("disabled",!0),$("#idNumber").prop("readonly",!0),$("#idProofFile").prop("disabled",!0),$("#form60File").prop("disabled",!0),$("#resetForm60AndIDProofFormBtn").prop("disabled",!0),$("#resetForm60AndIDProofFormBtn").hide(),$("#isForm60AndAlternateIDProofUploaded").val("true")}else $(".notifications-form60AndAlternateIDProof").html(getNotificationErrorHtml("Please enter customer name."))}else $(".notifications-pan").html(getNotificationErrorHtml("Please enter email."))}else $(".notifications-pan").html(getNotificationErrorHtml("Please enter phone number."))}else $(".notifications-pan").html(getNotificationErrorHtml("Please enter ID Number."))}else $(".notifications-pan").html(getNotificationErrorHtml("Please Select ID Proof Type."))},resetForm:function resetForm(){$("#idTypeSelect").prop("disabled",!1),$("#idTypeSelect").val(""),$("#idNumber").prop("readonly",!1),$("#idNumber").val(""),$("#getDetailsBtn").prop("disabled",!1),$("#idProofFile").val(""),$("#form60File").val(""),$("#uploadForm60AndIDProofBtn").prop("disabled",!1),$(".notifications-pan").empty(),$("#getDetailsBtnSection").show(),$("#uploadIDProofSection").hide(),$("#uploadForm60Section").hide(),$("#uploadForm60AndIDProofBtnSection").hide(),$("#resetForm60AndIDProofFormSection").hide()}},window.addEventListener("pageshow",function(e){($("input[type=radio][name=deliveryType]").change(function(){($(".notifications-delivery-type").html(""),$(".defer-notifications-delivery-type").html(""),$("#isAddressDeferred").val("false"),"function"==typeof toggleV
52alidationState&&toggleValidationState(!1),$(".defer-skip-address-fields").show(),"none"===$(".address-details-block").css("display")&&$(".address-details-block").slideDown("slow"),"homeDelivery"===this.value)?($("#pickupStore").length>0&&""!==$("#pickupStore").val()&&null!==$("#pickupStore").val()&&"-"!==$("#pickupStore").val()&&($("#postcode_delivery").val(""),$("#edit-pin-wrapper").removeClass("auto-filled success focused")),$(".pickup-from-store-city-delivery-details").slideUp("slow"),$("#pickupCity").prop("disabled",!0),$("#pickupStore").prop("disabled",!0),$("#pickupStoreAddress").prop("disabled",!0),$("#pickupCity").val(""),$("#pickupStore").length>0&&($("#pickupStore").html(""),$("#pickupStore").append(new Option("-","")),$("#pickupStore").addClass("gray-bg")),$("#pickupStoreAddress").val("-"),$(".customer-shipping-address-block").slideDown("slow"),$("#postcode_delivery").prop("disabled",!1),$("#postcode_delivery").removeClass("gray-bg")):($("#postcode_delivery").val(""),$("#edit-pin-wrapper").removeClass("auto-filled success focused"),$(".pickup-from-store-city-delivery-details").slideDown("slow"),$(".customer-shipping-address-block").slideUp("slow"),$("#pickupCity").prop("disabled",!1),$("#postcode_delivery").prop("disabled",!0),$("#postcode_delivery").addClass("gray-bg"))}),$(".proceed-to-addr").is(":visible"))||("false"===$("#isAddressDeferred").val()?($("#address-accordion-trigger").addClass("expanded"),$("#addressAccordionRadio").prop("checked",!0),$(".delivery-arrow").hide(),$("#deferAddressBtn").show(),$("#address-accordion-trigger").find(".delivery-dropdown").css("border-bottom","1px solid #d4d4d4"),"function"==typeof toggleValidationState&&toggleValidationState(!1),0===$("#pickupAtStore").length?($(".delivery-type-details-block").hide(),0===$("input[name=deliveryType]:checked").length&&$("#homeDelivery").prop("checked",!0).trigger("change")):$(".delivery-type-details-block").show(),$("input[type=radio][name=deliveryType]:checked").length>0&&($(".defer-skip-address-fields").show(),$(".address-details-block").show(),$("input[type=radio][name=deliveryType]:checked").trigger("change"))):($("#isAddressDeferred").val("true"),"function"==typeof toggleValidationState&&toggleValidationState(!0),$(".delivery-type-details-block").hide(),$(".defer-skip-address-fields").hide(),$(".address-details-block").hide()));$("#pickupStore").change(function(e){var t=e.target.value;if("undefined"!=typeof pickupAtStoreDelivery&&pickupAtStoreDelivery.storesInCity){var a=pickupAtStoreDelivery.storesInCity;if(!t)return void $("#pickupStoreAddress").val("");$("#pickupStoreAddress").val(a[t].address),$("#postcode_delivery").val(a[t].postcode),$("#postcode_delivery").trigger("change")}selectedStoreOnShipping($(this))}),$(".home-delivery-container").on("click",function(){$("#homeDelivery").prop("checked",!0),$("input[type=radio][name=deliveryType]").val("homeDelivery"),$("input[type=radio][name=deliveryType]").trigger("change"),homeDeliverySelected($(this).find("input"))}),$(".pickup-from-store-select-area").on("click",function(){$("#pickupAtStore").prop("checked",!0),$("input[type=radio][name=deliveryType]").val("pickupAtStore"),$("input[type=radio][name=deliveryType]").trigger("change"),storeDeliverySelected($(this).find("input"))})}),homeHTML=function(){if("home"!==PAGE_TYPE)return;let e=!1;var t={bgBannerSection:function bgBannerSection(e,t,i,o,r){for(var s="",n=0;n<r.length;n++){var l=r[n];if(l.key===a)return s+='<section class="h-section bg-banner-section">',l.isVideo?(s+='<div class="video-container">',s+='<video poster="'+l.posterUrl+'" class="vid-responsive lazy-video" title="'+l.title[0]+'" width="100%" height="auto" '+l.autoplay+" "+l.playsinline+" "+(l.controls||"")+" "+l.loop+" "+l.muted+">",s+='<source src="'+GLOBAL_CTX+l.bgUrl+'" type="video/mp4"> Your browser does not support the video tag.',s+="</video>",s+='<div class="gradient-overlay"></div>',s+="</div>"):s+='<img src="'+GLOBAL_CTX+e.bgUrl+'" alt="'+l.title[0]+'" width="100vw" height="50vh" class="img-responsive-c"/>',s+='<a href="'+l.link+'" class="ab-exp-event-trigger fw-image-wrap '+(l.isGradient?"gradient":"")+' ga-event-trigger" style="--g-color:'+l.rgbColor+";--g-img:url("+l.fwImageBgUrl+')" data-eventname="'+t+" - "+l.title[0]+'" data-pos="'+o+'" data-sectionname="'+i+'" data-bannername="'+l.title[0]+'" data-abeventname="Homepage Hero Video" data-abversion="'+a+'" >',l.fwImageUrl&&(s+='<img style="--max-width:'+l.width+'px;" src="'+GLOBAL_CTX+l.fwImageUrl+'" alt="'+l.title[0]+'" class="ab-exp-event-trigger '+l.fwImagePosition+' " data-bannername="'+l.title[0]+'" data-abeventname="Homepage Hero Video Text" data-abversion="'+a+'" style="width:'+l.fwImageWidth+'" />'),s+="</a>",s+="</section>"}},squareMenuSection:function squareMenuSection(e,t,a,i){var o="";return o+='<section class="h-section square-menu-section animate-trigger">',o+='<div class="menu-wrap" style="--itemsinonerow:'+e.items.length/e.layoutRows+'">',e.items.map(function(e,r){o+='<div class="menu-item">',o+='<a href="'+GLOBAL_CTX+e.link+'" class="ga-event-trigger" data-eventname="'+t+"_"+e.title.replaceAll(" ","")+'" data-pos="'+i+"-"+(r+1)+'" data-sectionname="'+a+'" data-bannername="'+e.title+'"><div class="image-wrap"><img class="img-responsive-c" src="'+e.imageUrl+'" alt="'+e.title+'" width="212" height="212" /></div><h2 class="title">'+e.title+"</h2></a>",o+="</div>"}),o+="</div>",o+="</section>"},stripSection:function stripSection(e,t,a,i){var o="";return o+='<section class="h-section strip-section">',o+='<div class="strip-container" >',o+='<div class="strip-wrap">',o+='<span class="strip-title">'+e.title[0]+" <strong>"+e.title[1]+"</strong> "+e.title[2]+"</span>",o+='&nbsp;<span class="strip-desc">'+e.description+"</span>",o+='<span class="strip-btn"><a href="'+GLOBAL_CTX+e.link+'">'+e.btn+"</a></span>",o+="</div>",o+='<a href="'+GLOBAL_CTX+e.link+'" class="strip-link ga-event-trigger" data-eventname="'+t+"_"+e.title[0]+'" title="'+e.title[0]+'" data-pos="'+i+'" data-sectionname="'+a+'" data-bannername="'+e.title[0]+'"></a>',o+="</div>",o+="</section>"},carouselSection:function carouselSection(e,t,a,i){var o="";return o+='<section class="h-section carousel-section">',o+='<div class="carousel-swiper swiper">',o+='<div class="swiper-wrapper">',e.items.map(function(r,s){o+='<div class="swiper-slide">',o+='<a href="'+r.link+'" class="ga-event-trigger" data-eventname="'+t+"_"+r.title.replaceAll(" ","")+'"  data-pos="'+i+"-"+(s+1)+'" data-sectionname="'+a+'" data-bannername="'+r.title+'">',r.isVideo?(o+='<video poster="'+(r.desktopImageUrl||r.imageUrl)+'" class="vid-responsive lazy-video" title="'+r.title+'" width="100%" height="auto" '+r.autoplay+" "+r.playsinline+" "+r.controls+" "+r.loop+" "+r.muted+">",o+='<source src="'+r.videoUrl+'" type="video/mp4"> Your browser does not support the video tag.',o+="</video>"):r.lazyload?o+='<img class="'+r.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+(r.desktopImageUrl||r.imgUrl)+'" alt="'+r.title+'"/>':o+='<img src="'+(r.desktopImageUrl||r.imgUrl)+'" alt="'+r.title+'"/>',o+="</a>",o+="</div>"}),o+="</div>",o+='<div class="swiper-pagination" style="--swiper-theme-color:#fff;"></div>',o+='<div class="swiper-button-prev icon icon-chevron-thin-left" style="--swiper-navigation-size:20px;--swiper-theme-color:#fff;"></div>',o+='<div class="swiper-button-next icon icon-chevron-thin-right" style="--swiper-navigation-size:20px;--swiper-theme-color:#fff;"></div>',o+="</div>",o+="</section>"},collectionSection:function collectionSection(e,t,a,i){var o="",r=(e.groupingDesktop?function getDesktopItems(e,t,a){return t.map(t=>e.find(e=>
52e[a]===t)).filter(Boolean)}(e.items,e.groupingDesktop,"priority"):void 0)||e.items;return o+='<section class="h-section collection-section animate-trigger">',o+='<div class="collection-wrapper">',r.map(function(r,s){o+='<div class="collection" style="">',o+='<a href="'+r.link+'" class="ga-event-trigger" data-eventname="'+t+"_"+r.title.replace(" ","")+'" data-sectionname="'+a+'" data-bannername="'+r.title+'" data-pos="'+i+"-"+(s+1)+'">',r.isVideo?(o+='<video poster="'+r.imageUrl+'" class="vid-responsive lazy-video" title="'+r.title+'" width="100%" height="auto" '+r.autoplay+" "+r.playsinline+" "+r.controls+" "+r.loop+" "+r.muted+">",o+='<source src="'+r.videoUrl+'" type="video/mp4"> Your browser does not support the video tag.',o+="</video>"):o+='<img class="img-responsive-c '+r.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+r.imageUrl+'" alt="'+r.title+'" width="" height="" />',o+="</a>",o+="</div>"}),o+="</div>",o+='<div class="bttn-wrap"><a class="bttn" href="'+e.link+'">'+e.btn+"</a></div>",o+="</section>"},multiColSection:function multiColSection(e,a,i,o){var r="";return r+='<section class="h-section multi-col-section">',r+='<div class="multi-col-container">',e.map(function(e,a){"function"==typeof t[e.key]&&(r+=t[e.key](e.value,e.key))}),r+="</div>",r+="</section>"},trendingSection:function trendingSection(e,t,a,i){var o="";return o+='<div class="trending-section">',o+='<div class="trending-wrapper animate-trigger">',e.items.map(function(r,s){o+='<div class="trending-item">',o+='<a class="card-wrap ga-event-trigger" data-eventname="'+t+"_"+r.title.replace(" ","")+'" href="'+r.link+'" style="--bg-color:'+r.bgColor+'" data-pos="'+i+"-"+(s+1)+'" data-sectionname="'+a+'" data-bannername="'+r.title+'">',o+='<div class="img-wrapper">',o+='<img class="card-image img-responsive-c '+r.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+r.imageUrl+'" alt="'+r.title+'" width="" height="" style="--img-bg-color:'+r.imgBgColor+'" />',o+="</div>",o+='<div class="content-wrapper">',o+='<h3 class="card-title"><span>'+r.title+"</span></h3>",o+='<p class="card-desc">'+r.description+"</p>",o+="</div>",o+="</a>",o+="</div>"}),o+="</div>",o+="</div>"},giftCardSection:function giftCardSection(e,t,a,i){var o="";return o+='<div class="giftcard-section">',o+='<div class="giftcard-wrap">',o+='<div class="bg-img-wrap">',o+='<img class="bg-img img-responsive-c '+e.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+e.bgImageUrl+'" alt="'+e.alt+'" width="'+e.width+'" />',o+='<img class="left-h-img img-responsive-c '+e.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+e.leftImageUrl+'" alt="'+e.alt+'" width="'+e.width+'" />',o+='<img class="right-h-img img-responsive-c '+e.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+e.rightImageUrl+'" alt="'+e.alt+'" width="'+e.width+'" />',o+='<div class="gift-wrap">',e.items.map(function(r,s){o+='<a class="gift-item ga-event-trigger" data-eventname="'+t+"_"+r.title.replace(" ","")+'" href="'+r.link+'" data-pos="'+i+"-"+(s+1)+'" data-sectionname="'+a+'" data-bannername="'+r.title+'"><img class="img-responsive-c '+r.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+r.imageUrl+'" alt="'+r.title+'" width="204" height="249" /></a>'}),o+="</div>",o+="</div>",o+="</div>",o+="</div>"},spotlightSection:function spotlightSection(e,t,a,i){var o="";return o+='<section class="h-section spotlight-section">',o+='<div class="collection-spotlight-banner"><a href="'+e.link+'" class="ga-event-trigger" data-eventname="'+t+"_"+e.title[0].replaceAll(" ","")+'" data-pos="'+i+'" data-sectionname="'+a+'" data-bannername="'+e.title[0]+'"><img class="img-responsive-c '+e.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+e.bgImageUrl+'" alt="'+e.title+'" /></a></div>',o+='<div class="collection-spotlight-wrapper animate-trigger2">',o+='<a href="'+e.link+'">',o+='<img class="img-responsive-c title-img '+e.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+e.titleImageUrl+'" alt="'+e.title+'" width="" height="" />',o+='<img class="img-responsive-c scissor-img '+e.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+e.scissorImageUrl+'" alt="'+e.title+'" width="" height="" />',o+='<img class="img-responsive-c ribbon-img '+e.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+e.ribbonImageUrl+'" alt="'+e.title+'" width="" height="" />',o+="</a>",o+="</div>",o+="</section>"},roundMenuImageSection:function roundMenuImageSection(e,t,a,i){var o="";o+='<section class="h-section round-menu-image-section">',e.title&&(o+='<h2 class="h-title">'+e.title+"</h2>");return o+='<div class="menu-wrap">',e.items.map(function(r,s){o+='<a class="menu-item animate-trigger ga-event-trigger" data-eventname="'+t+"_"+r.title.replaceAll(" ","")+'" href="'+r.link+'" data-pos="'+i+"-"+(s+1)+'" data-sectionname="'+a+'" data-bannername="'+r.title+'">',o+='<div class="hero-section">',o+='<img src="'+e.blankImageUrl+'" data-src="'+r.heroImageUrl+'" class="model-img '+r.lazyload+'" alt="'+r.title+'" width="" height="">',o+="</div>",o+='<div class="product-details-section">',o+='<div class="product-img-wrap">',o+='<img src="'+e.blankImageUrl+'" data-src="'+r.imageUrl+'" alt="'+r.title+'" class="product-img '+r.lazyload+'" width="" height="">',o+="</div>",o+='<h3 class="menu-title">'+r.title+"</h3>",o+="</div>",o+="</a>"}),o+="</div>",o+="</section>"},videoSection:function videoSection(e,t,a,i){var o="";return o+='<section class="h-section video-section">',o+='<video title="'+e.videoTitle+'" poster="'+e.posterUrl+'" class="lazy-video no-autoplay" preload="none" width="100%" height="auto" '+e.autoplay+" "+e.playsinline+" "+e.controls+" "+e.loop+" "+e.muted+">",o+='<source src="'+GLOBAL_CTX+e.videoUrl+'" type="video/mp4"> Your browser does not support the video tag.',o+="</video>",o+='<div class="text-img-container" >',o+='<div class="text-img-wrap" >',o+='<img src="'+e.blankImageUrl+'" data-src="'+e.textImgUrl+'" class="model-img '+e.lazyload+'" alt="'+e.title+'" width="" height="">',o+="</div>",o+="</div>",o+="</section>"},reelsSection:function reelsSection(e,t,a,i){var o="";return o+='<section class="h-section reels-section">',o+='<div class="reels-swiper hide-scrollbar" style="--itemsinonerow:'+e.items.length/e.layoutRows+'">',o+='<div class="swiper-wrapper">',e.items.map(function(e,r){o+='<div class="swiper-slide collection-item">',o+='<div class="caption">'+e.title+"</div>",o+='<a href="'+e.link+'" class="ga-event-trigger" data-eventname="'+t+"_"+e.title.replaceAll(" ","")+'"  data-pos="'+i+"-"+(r+1)+'" data-sectionname="'+a+'" data-bannername="'+e.title+'">',o+='<video class="lazy-video" preload="none" width="100%" height="auto" poster="'+e.posterUrl+'" '+e.autoplay+" "+e.playsinline+" "+e.loop+" "+e.muted+">",o+='<source src="'+GLOBAL_CTX+e.url+'" type="video/mp4"> Your browser does not support the video tag.',o+="</video>",o+="</a>",o+="</div>"}),o+="</div>",o+="</div>",o+="</section>"},clipCardsSection:function clipCardsSection(e,t,a,i){var o="";return o+='<section class="h-section clip-cards-section animate-trigger">',o+='<h2 class="h-title" style="--title-font-size:15px;--title-color:#9D7792;"><span>'+e.title+"</span></h2>",o+='<div class="clipcards-swiper clip-cards-wrap hide-scrollbar" style="--itemsinonerow:'+e.items.length/e.layoutRows+'">',o+='<div class="clip-card-inner">',e.items.map(function(r,s){o+='<div class="clip-card-line">',o+='<div class="border-line"></div>',o+='<div class="collection-item clip-card" style="--bg-color:'+r.hexBgColor+";transform: rotate("+r.rotation+')">',o+='<a href="'+r.link+'" class="ga-event-trigger" data-eventname="'+t+"_"+r.title.replaceAll(" ","")+'"  data-pos="'+i+"-"+(s+1)+'" data-sectionname="'+a+'" data-bannername="'+r.title+'">',o+='<div class="clip"><img style="--clip-rotation:'+r.clipRotation+";--clip-position:"+r.clipPosition+'" class="'+r.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+r.clipImageUrl+'" width="28" height="30" /></div>',o+='<div class="clip-card-image"><img class="'+r.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+r.imageUrl+'" alt="'+r.alt+'" width="277" height="242" /></div>',o+='<div class="clip-card-title">'+r.title+"</div>",o+='<div class="clip-card-desc">'+r.description+"</div>",o+="</a>",o+="</div>",o+="</div>"}),o+="</div>",o+="</div>",o+="</section>"},editorialSection:function editorialSection(e,t,a,i){var o="",r=e.desktopItems||e.items;o+='<section class="h-section editorial-section">',e.title&&(o+='<h2 class="h-title">'+e.title+"</h2>");return o+='<div class="editorial-wrap" style="--grid-layout:'+(e.dGri
52dLayout||e.gridLayout)+'">',r.map(function(r,s){o+='<div class="editorial-item animate-trigger" style="grid-area: '+r.gridArea+'">',r.link?(o+='<a href="'+r.link+'" class="ga-event-trigger" data-eventname="'+t+"_"+r.title.replaceAll(" ","")+'"  data-pos="'+i+"-"+(s+1)+'" data-sectionname="'+a+'" data-bannername="'+r.title+'">',o+='<img class="img-responsive-c '+r.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+r.imageUrl+'" alt="'+r.alt+'" width="" height="" />',r.btn&&(o+='<div class="shop-now-btn-wrap"><span>'+r.btn+"</span></div>"),o+="</a>"):o+='<img class="img-responsive-c '+r.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+r.imageUrl+'" alt="'+r.alt+'" width="" height="" />',o+="</div>"}),o+="</div>",o+="</section>"},staticBannerSection:function staticBannerSection(e,t,a,i){var o="";return o+='<section class="h-section static-banner-section">',o+='<a href="'+e.link+'" class="ga-event-trigger" data-eventname="'+t+"_"+e.title[0].replaceAll(" ","")+'" data-pos="'+i+'" data-sectionname="'+a+'" data-bannername="'+e.title[0]+'"><img src="'+e.blankImageUrl+'" data-src="'+(e.desktopImageUrl||e.imageUrl)+'" alt="'+e.title+'" width="" height="" class="img-responsive-c '+e.lazyload+'" /></a>',o+="</section>"},roundIconSection:function roundIconSection(e,t,a,i){var o="";return o+='<section class="h-section round-icon-section animate-trigger">',o+='<div class="section-inner">',o+='<div class="title-image-wrap">',o+='<img src="'+e.blankImageUrl+'" data-src="'+(e.dTitleImageUrl||e.titleImageUrl)+'" alt="'+e.title+'" class="title-image '+e.lazyload+'" >',o+="</div>",o+='<div class="bp-container">',o+='<div class="bp-wrap">',e.items.map(function(r,s){o+='<div class="bp-item ga-event-trigger" data-eventname="'+t+"_"+r.title.replaceAll(" ","")+'" data-pos="'+i+"-"+(s+1)+'" data-sectionname="'+a+'" data-bannername="'+r.title+'">',o+='<img class="'+r.lazyload+'" src="'+e.blankImageUrl+'" data-src="'+r.imageUrl+'" alt="'+r.title+'" width="" height="" />',o+="<h2>"+r.title+"</h2>",o+="</div>"}),o+="</div>",o+="</div>",o+="</div>",o+="</section>"},infoCardSection:function infoCardSection(e,t,a,i){var o="";return o+='<section class="h-section info-card-section">',o+='<h3 class="h-title info-card-title">'+e.title[0]+"</h3>",o+='<div class="info-card-wrap">',e.items.map(function(r,s){o+='<div class="info-card-back-image-wrap">',o+='<div class="info-card">',o+='<div class="info-card-image-wrap">',o+='<img src="'+e.blankImageUrl+'" data-src="'+r.imageUrl+'" alt="'+r.title+'" class="info-card-image '+r.lazyload+'" width="200">',o+="</div>",o+='<div class="info-card-content-wrap">',o+='<div class="info-card-inner">',o+='<div class="info-card-text">'+r.description+"</div>",o+="</div>",o+="</div>",o+='<a rel="noopener nofollow" class="info-card-btn ga-event-trigger" data-eventname="'+t+"_"+r.title.replaceAll(" ","")+'" href="'+r.link+'" target="_blank" data-pos="'+i+"-"+(s+1)+'" data-sectionname="'+a+'" data-bannername="'+r.title+'">'+r.btn+"</a>",o+="</div>",o+='<div class="back-image-wrap">',o+='<img src="'+e.blankImageUrl+'" data-src="'+r.backImageUrl+'" alt="'+r.title+'" class="back-image '+r.lazyload+'" height="344">',o+="</div>",o+="</div>"}),o+="</div>",o+='<div class="view-all-news" ><a href="'+e.link+'">'+e.btn+"</a></div>",o+="</section>"}};let a="VARIANT_1";function handleIntersection(e,t){e.forEach(function(e){e.isIntersecting&&e.intersectionRatio<=1&&e.target.classList.add("animate")})}a=function getABExperimentValue(e){if("null"==visitorId)return"VARIANT_1";var t=String(visitorId),a=Math.abs(parseInt(t.slice(-2),10)),i=0;if(e.forEach(function(e){i+=e}),100!==i)throw new Error("Percentages must sum to 100. Current sum: "+i);for(var o=0,r=0;r<e.length;r++)if(a<(o+=e[r]))return"VARIANT_"+(r+1);return"VARIANT_1"}([50,50]),function paintHomeHtml(){let e="";var a="";if(!sessionStorage.getItem("dhData")||"null"==sessionStorage.getItem("dhData")){var i=function getHomeData(){var e=null,t=$("#hAT").val()||"";return $.ajax({type:"POST",url:GLOBAL_CTX+"/homePageData?accessToken="+t+"&version=&deviceType=desktop",async:!1,cache:!1,dataType:"json",success:function(t){e=JSON.parse(t.data)},error:function(e){}}),e}();i&&i.length>0?sessionStorage.setItem("dhData",JSON.stringify(i)):sessionStorage.setItem("dhData",null)}(a=JSON.parse(sessionStorage.getItem("dhData")))&&a.length>0&&(a.map(function(a,i){"showInOldHome"in a&&!a.showInOldHome||"function"==typeof t[a.key]&&(e+=t[a.key](a.value,a.key,a.eventLabel,a.priority,a.items||[]))}),$("#homePage").html(e))}(),setTimeout(function(){new Swiper(".carousel-swiper",{spaceBetween:0,speed:800,autoplay:!0,loop:!0,pauseOnMouseEnter:!0,pagination:{el:".swiper-pagination",clickable:!1},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},on:{touchStart:function(){e=!0},slideChangeTransitionEnd:function(){e&&(triggerSwipeLeftRightEvent(this),e=!1)}}}),new Swiper(".collection-swiper",{speed:400,spaceBetween:10,autoplay:!1,loop:!0,slidesPerView:"auto",delay:1e3}),new Swiper(".reels-swiperrr",{spaceBetween:10,loop:!1,autoplay:!0,centeredSlides:!0,centeredSlidesB
52ounds:!0,centerInsufficientSlides:!0,slidesPerView:6.5,initialSlide:6.5,freeMode:!0,mousewheel:!1,breakpoints:{767:{slidesPerView:5.5},961:{slidesPerView:6.5}}});var t=new IntersectionObserver(handleIntersection,{threshold:.7});document.querySelectorAll(".animate-trigger").forEach(function(e){t.observe(e)});var a=new IntersectionObserver(handleIntersection,{threshold:1});document.querySelectorAll(".animate-trigger2").forEach(function(e){a.observe(e)})},500)}(),$(document).ready(function(){if("store-catalog"===PAGE_TYPE){var e=location.hash.split("_"),t=!1,a=document.querySelector("ul.product-grid"),i=document.querySelector("li.banner-ab-bp");"#s"!=e[0]||t||(a.removeChild(i),t=!0),showHideSortBy();new Swiper(".sc-carousel-swiper",{spaceBetween:0,speed:800,autoplay:!0,loop:!0,pagination:{el:".swiper-pagination",clickable:!1},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}});$.ajax({type:"GET",url:GLOBAL_CTX+"/physical-store/stores-details/",async:!0,cache:!1,dataType:"json",success:function(e){e.hasError||(scStoreDetailsData=e&&e.cityToStoresMap,$(".store-catalog-banner .sc-widget-btn").on("click",function(e){commonFancyBox({width:450,wrapCSS:"fancybox-style-4",href:"#cityStoreSelectorPopup",resetPopup:function(){}}),setSCCityOptionsHtml()}),$("#cityStoreSelectorPopup .seach-bar .city-search").on("click",function(e){$(".store-options").addClass("hidden"),$(".select-store-info-text").addClass("hidden"),$(".city-options").removeClass("hidden"),$(this).find("input").val($("#selectedCityForPopup").val()),$(".city-options li").each(function(){$(this).removeClass("hidden")})}
52),$(".city-search input").on("input",function(){var e=$(this).val().toLowerCase();$(".city-options li").each(function(){-1!==$(this).closest(".city-store-option").text().toLowerCase().indexOf(e)?$(this).removeClass("hidden"):$(this).addClass("hidden")})}),$(".city-search .sc-search-icon").on("click",function(){$(".city-search input").focus()}),$("#cityStoreSelectorPopup .seach-bar .store-search").on("click",function(e){$(".city-options").addClass("hidden"),$(".store-options").removeClass("hidden"),$(".select-store-info-text").removeClass("hidden"),$(this).find("input").val(""),setSCStoreOptionsHtml(),$(".store-options li").each(function(){$(this).removeClass("hidden")})}),$(".store-search input").on("input",function(){var e=$(this).val().toLowerCase();$(".store-options li").each(function(){-1!==$(this).closest(".city-store-option").text().toLowerCase().indexOf(e)?$(this).removeClass("hidden"):$(this).addClass("hidden")})}),$(".store-search .sc-search-icon").on("click",function(){$(".store-search input").focus()}),$("#cityStoreSelectorPopup .city-store-apply").on("click",function(){var e=[];if($(".store-options li").each(function(){if(0===$(this).find(".city-store-selected").closest(".hidden").length){var t={};t.sid=$(this).data("sid"),t.processedCityName=scProcessCityNameForURL($(this).data("cityname")),t.processedStoreName=scProcessStoreNameForURL($(this).data("storename")),e.push(t)}}),0===e.length)document.querySelector("#cityStoreSelectorPopup #snackbarwrapper").innerHTML=toastUI("Please select atleast one store"),setTimeout(function(){var e=document.querySelector("#cityStoreSelectorPopup #snackbarwrapper #snackbar");e.classList.remove("show"),e.innerHTML=""},3e3);else if(1===e.length)window.location.href=GLOBAL_CTX+"/stores/"+e[0].processedStoreName+"-"+e[0].processedCityName+"-reslnk-"+encodeURIComponent(btoa(e[0].sid))+"/catalog.html";else{var t="";e.forEach(function(e,a){0===a||(t+=","),t+=e.sid}),window.location.href=GLOBAL_CTX+"/stores/"+e[0].processedCityName+"-reslnk-"+encodeURIComponent(btoa(t))+"/catalog.html"}}))},error:function(e){}})}}),$(document).ready(function(){$(".payment-method-tab .tab").click(function(){$(this).toggleClass("active").siblings().removeClass("active");const e=$(this).attr("id");$(".method-content").addClass("hidden"),$(".proceed-button").removeClass("hidden"),"saved-payments"==e?$("#saved-payments-section").removeClass("hidden"):"upi"==e?$("#upi-options").removeClass("hidden"):"new-card"==e?($("#card-addition-form")[0].reset(),$(".card-error").addClass("hidden"),$(".card-number").removeClass("error"),$(".card-title").removeClass("hidden"),$(".card-type").addClass("hidden"),$("#card-addition-form div").removeClass("focused"),$("#add-newcard-form").removeClass("hidden")):"net-banking"==e&&($("#net-banking-section").removeClass("hidden"),$(".payment-method-selected").val("net-bank"),$(".proceed-button").addClass("hidden")),resetAllSelectedOptions(e)}
52),$(".clickable-row").on("click",function(){var e=$(this).closest(".payment-row");e.toggleClass("method-selected").siblings().removeClass("method-selected"),e.hasClass("method-selected")?($(".saved-method").prop("checked",!1),$(this).find(".saved-method").prop("checked",!0),$(".payment-method-selected").val($(this).find(".saved-method").val()),$(".proceed-button").removeClass("disabled")):($(this).find(".saved-method").prop("checked",!1),$(".proceed-button").addClass("disabled"))}),$(".cvv-input").on("input",function(){const e=$(this).val();var t=$(this).closest(".payment-row");"3"==e.length?t.find(".proceed-button").attr("disabled",!1):t.find(".proceed-button").attr("disabled",!0)}),$(".upi-option").click(function(e){const t=$(this).attr("id");triggerUPIAppSelectedEvent(e,t),$(".upi-option").removeClass("selected"),$(this).addClass("selected"),"qr-code"==t?($(".upi-input-box").addClass("hidden"),$(".upi-method").prop("checked",!1),$(this).find(".upi-method").prop("checked",!0),$(".upi-consent").addClass("hidden"),$(".upi-input-box").removeClass("invalid"),$(".vpa-input").val(""),$(".upi-verify").removeClass("hidden"),$(".upi-error-info").addClass("hidden"),$(".valid-upi").addClass("hidden"),$(".invalid-upi").addClass("hidden"),$(".payment-method-selected").val("qr"),$(".proceed-button").removeClass("disabled"),$("#vpa-verify-button").attr("disabled",!0)):"new-upi"==t&&($(".upi-method").prop("checked",!1),$(".payment-method-selected").val("new-upi"),$(this).find(".upi-method").prop("checked",!0),$(".upi-input-box").removeClass("hidden"),$(".valid-upi").hasClass("hidden")?$(".proceed-button").addClass("disabled"):($(".proceed-button").removeClass("disabled"),$(".upi-consent").removeClass("hidden")))}),$(".bank-list").on("click",".bank",function(e){submitBankDetails(e,this,"Other")}),$(".popular-bank").click(function(e){submitBankDetails(e,this,"Popular")}),$("#cancel-payment").click(function(){$(".cancel-payment-section").addClass("show-info-popup")})});
53function fixedHeader(){$("body").hasClass("with-ticker")?$(window).scrollTop()>74?$("body").addClass("fixed-header"):$("body").removeClass("fixed-header"):$(window).scrollTop()>42?$("body").addClass("fixed-header"):$("body").removeClass("fixed-header")}function fixedWhiteHeader(){$(window).scrollTop()>=88?$("body.with-white-header").addClass("fixed-white-header"):"browse"!=PAGE_TYPE&&"store-catalog"!=PAGE_TYPE?$(window).scrollTop()<1&&$("body.with-white-header").removeClass("fixed-white-header"):$("body.with-white-header").removeClass("fixed-white-header")}$(document).ready(function(){fixedHeader(),fixedWhiteHeader(),$(window).scroll(function(){fixedHeader(),fixedWhiteHeader()}),$(".header-top .with-car div, .header-top .dynamic-ticker div.t-offer, .multi-item-carousel .inner, .oops-product .item").click(function(){window.location=$("a",this).attr("href")}),$(".header-top .close-ticker").click(function(e){e.stopPropagation(),$(this).parents(".header-top").slideUp(500),$(this).parents("body").removeClass("with-ticker"),$(".header").animate({"padding-top":0},500),$("header").animate({height:88},500),$.cookie("ticker",1,{expires:1}),trackGA("BsUI","HeaderTickerClosed","HeaderTickerClosedDesktop")}),hoverInit(),$(".banner-carousel").owlCarousel({items:1,autoPlay:!0,autoPlayTimeout:5e3,autoPlayHoverPause:!0,slideSpeed:800,loop:!0,lazyLoad:!0,responsive:!1,responsiveBaseWidth:".banner-carousel",pagination:!0,navigation:!0}),$(".banner-inner").owlCarousel({items:1,autoPlay:!0,autoPlayTimeout:4e3,autoPlayHoverPause:!0,slideSpeed:800,loop:!0,pagination:!1,navigation:!0}),$(".testimonial").owlCarousel({items:2,responsive:!1,slideSpeed:800,loop:!0,dots:!1,responsive:!1,lazyLoad:!0,margin:10,pagination:!1,navigation:!0,navigationText:["<i class='icon-ion-chevron-left'></i>","<i class='icon-ion-chevron-right'></i>"]}),$(".testimonial-single, #bcc #featured").owlCarousel({items:1,slideSpeed:800,loop:!0,dots:!1,nav:!0,lazyLoad:!0,pagination:!1,navigation:!0,responsive:!1,navigationText:["<i class='icon-ion-android-arrow-dropleft'></i>","<i class='icon-ion-android-arrow-dropright'></i>"]}),$(".owl-single-item").owlCarousel({items:1,slideSpeed:800,loop:!0,dots:!1,nav:!0,pagination:!1,navigation:!0,navigationText:["<i class='icon-ion-chevron-left'></i>","<i class='icon-ion-chevron-right'></i>"]}),$(".owl-single-item-2").owlCarousel({items:1,slideSpeed:800,nav:!1,autoPlay:!0,pagination:!0,responsive:!1}),$(".single-fade-carousel").owlCarousel({items:1,autoPlay:!1,autoPlayTimeout:5e3,autoPlayHoverPause:!0,transitionStyle:"fade",slideSpeed:800,loop:!0,lazyLoad:!0,mouseDrag:!1,responsive:!1,responsiveBaseWidth:".ziba-carousel",pagination:!1,navigation:!0,navigationText:["<i class='icon-ion-ios-arrow-right left-arrow'></i>","<i class='icon-ion-ios-arrow-right'></i>"]}),$(".single-swipe-carousel").owlCarousel({items:1,autoPlay:!1,autoPlayTimeout:5e3,autoPlayHoverPause:!0,slideSpeed:800,loop:!0,lazyLoad:!0,mouseDrag:!1,responsive:!1,pagination:!0,navigation:!0,navigationText:["<i class='icon-ion-ios-arrow-right left-arrow'></i>","<i class='icon-ion-ios-arrow-right'></i>"]}),$(".sui-carousel").owlCarousel({items:3,slideSpeed:800,loop:!0,dots:!1,pagination:!1,navigation:!0,navigationText:["<i class='icon-ion-android-arrow-dropleft'></i>","<i class='icon-ion-android-arrow-dropright'></i>"]}),$(".multi-item-carousel .owl-carousel").owlCarousel({items:3,scrollPerPage:!0,margin:10,slideSpeed:1200,paginationSpeed:1200,lazyLoad:!0,loop:!1,dots:!1,responsive:!1,responsiveBaseWidth:".multi-item-carousel",pagination:!1,navigation:!0,navigationText:["<i class='icon-ion-chevron-left'></i>","<i class='icon-ion-chevron-right'></i>"]}),$(".multi-gms-carousel").owlCarousel({items:4,margin:25,slideSpeed:1200,paginationSpeed:1200,lazyLoad:!0,loop:!1,rewindNav:!1,scrollPerPage:!1,dots:!1,pagination:!1,navigation:!0,navigationText:["<span class='icon-wrapper'><i class='icon-ion-chevron-left'></i></span>","<span class='icon-wrapper'><i class='icon-ion-chevron-right'></i></span>"]}),$(".sui-carousel").owlCarousel({items:4,slideSpeed:600,lazyLoad:!1,loop:!1,dots:!1,slideBy:1,pagination:!1,navigation:!0,navigationText:["<i class='icon-ion-chevron-left'></i>","<i class='icon-ion-chevron-right'></i>"]}),$(".carousel-active-thumbs").owlCarousel({items:5,lazyLoad:!1,loop:!1,dots:!1,slideSpeed:1200,paginationSpeed:1200,slideBy:1,nav:!0,pagination:!1,navigation:!0,navigationText:["<i class='icon-ion-arrow-left-b'></i>","<i class='icon-ion-arrow-right-b'></i>"]}),$("body").on("click",".formError",function(){$(this).remove()}),$(".link").click(function(){window.location=$(this).find("a").attr("href")}),$(".link-n").click(function(e){e.stopPropagation(),e.preventDefault(),window.open($(this).find("a").attr("href"))}
53),$(".accordion ul li .title").click(function(){var e=$(this).parent().find("input").attr("id");$(".formError")&&$("."+e+"formError").remove(),$(this).parent("li").children(".content").slideToggle("medium, easeInOutCirc"),$(this).parent("li").toggleClass("open");var i=$(this).parent("li");i.find("span").removeAttr("class"),i.hasClass("open")?i.find(".title span").addClass("icon-ion-ios-minus-empty"):i.find(".title span").addClass("icon-ion-ios-plus-empty")}),$(window).scroll(function(){$(window).scrollTop()>485?$(".aboutus-wrapper").addClass("fixed"):$(".aboutus-wrapper").removeClass("fixed"),$(".aboutus-wrapper h1").each(function(){if(isScrolledIntoView(this)){$(".aboutus-wrapper .sub-nav li").siblings().removeClass("active");var e=$(this).data("step");$(".aboutus-wrapper .sub-nav li").eq(e).addClass("active")}}),$(".product-grid .pd-tags").each(function(){$(this).hasClass("effect")&&$(this).is(":in-viewport")&&$(this).delay(500).queue(function(){$(this).addClass("slide-up").clearQueue()})})}),$(".aboutus-wrapper .sub-nav li").click(function(){$(this).scrollPage()}),$.fn.scrollPage=function(){var e=this.data("id");return $("body,html").animate({scrollTop:e},650,"easeInOutQuad"),!1},window.location.hash&&($(".sub-nav li").removeClass("active"),$('.sub-nav li[data-id="4950"]').addClass("active"),$("#main > div").hasClass(".aboutus-wrapper")&&setTimeout(function(){$("html, body").animate({scrollTop:$("#mgmt").offset().top},1e3,"easeInOutQuad")},1e3));var e=[["who",510],["design",852],["advantage",1357],["milestone",2288],["investors",3814],["management",4927]];if(pg_about_param)for(var i=0;i<e.length;i++)if(pg_about_param==e[i][0])return $("body,html").animate({scrollTop:e[i][1]},650,"easeInOutQuad"),!1;if(headerHoverItemInt(),$("#solitaire-options li").click(function(){$(this).addClass("selected"),$(this).siblings().removeClass("selected")}),$(document).delegate(".v-m-f-toggle, .top-filter-overlay","click",function(e){$("#top-filter-hover").fadeToggle(0),function triggerViewMoreFilterEvent(){var e={_eventId:"viewMoreFilters"};e.existingFilters=getFilterparams.filterUniqueCategory.join(", "),e.existingFilterTags=getFilterparams.filterUniqueTags.join(", "),e.pageType=getCurrentPageType()}(),$(this).closest(".filters").toggleClass("p-f-open"),$(this).closest(".new-filters").toggleClass("p-f-open"),$("#top-filter-hover").css({top:"0"}),$(".sticky-filter-wrapper.active #top-filter-hover").css({top:"50%"}),$(".b-new-filter #livechat-compact-container").css({display:"none"}),$("#top-filter-hover .v-m-f-toggle span").text("Less Filters"),$("#top-filter-hover .v-m-f-toggle i").addClass("icon-ion-chevron-up").removeClass("icon-ion-android-close")}),$(document).delegate(".open-filters","click",function(e){var i=$(window).scrollTop();$("#top-filter-hover").css({top:i,display:"block"}),$(".filters").addClass("p-f-open"),$(".new-filters").addClass("p-f-open"),$("#top-filter-hover .v-m-f-toggle span").text("Close Filters"),$("#top-filter-hover .v-m-f-toggle i").removeClass("icon-ion-chevron-up").addClass("icon-ion-android-close")}),$(document).delegate("p-f-open","click",function(e){$(this).close()}),$(".free-gift.voucher label").click(function(){$("#voucher-wrapper").show(),$(".free-gift.voucher label span.checkbox span").removeClass("icon-ion-ios-circle-outline").addClass("icon-ion-ios-checkmark"),$(".free-gift.gift label span.checkbox span").addClass("icon-ion-ios-circle-outline").removeClass("icon-ion-ios-checkmark"),$(".formError").remove(),$("#voucher-message").hide()}),$("#has-voucher label").click(function(){$(this).find("#have-discount").is(":not(:checked)")?($("#voucher-wrapper").hide(),$("#has-voucher label span.checkbox span").addClass("icon-ion-ios-circle-outline").removeClass("icon-ion-ios-checkmark")):($("#voucher-wrapper").show(),$("#has-voucher label span.checkbox span").addClass("icon-ion-ios-checkmark").removeClass("icon-ion-ios-circle-outline"),trackGA("Checkout","Expanded Voucher Code Field"),$("#newOffer-input").attr("checked",!1),$("#use-newOffer label span.checkbox span").addClass("icon-ion-ios-circle-outline").removeClass("icon-ion-ios-checkmark"),$("#newOffer-wrapper").hide()),$(".formError").remove(),$("#voucher-message").hide()}),$("#use-newOffer label").click(function(){$(this).find("#newOffer-input").is(":not(:checked)")?($("#newOffer-wrapper").hide(),$("#use-newOffer label span.checkbox span").addClass("icon-ion-ios-circle-outline").removeClass("icon-ion-ios-checkmark")):($("#newOffer-wrapper").show(),$("#use-newOffer label span.checkbox span").addClass("icon-ion-ios-checkmark").removeClass("icon-ion-ios-circle-outline"),$("#has-voucher label span.checkbox span").addClass("icon-ion-ios-circle-outline").removeClass("icon-ion-ios-checkmark"),$("#have-discount").attr("checked",!1),$("#voucher-wrapper").hide())}),$("#freegift").click(function(){$(this).find("input[type=radio]").is(":not(:checked)")&&$(this).find(".freegift-loading").removeClass("hideit")}
53),$(".apply-now").click(function(){var e=$(this).closest(".list-item").find("#job-title").html();$("#positionName").val(e)}),$(".offer-container#voucher-code").on("click","label.voucher-applied",function(e){return e.stopPropagation(),!1}),$(".offer-container#jp-miles").on("click","label.jpm-applied",function(e){return e.stopPropagation(),!1}),$(".offer-container#voucher-code").on("click","label",function(){var e=$(".offer-container#jp-miles label");e.hasClass("jpm-applied")||$(this).hasClass("voucher-applied")||($(".offer-container#jp-miles").removeClass("show-content"),e.find("input[type=checkbox]").prop("checked",!1),$(".offer-container#jp-miles label").find("i").switchClass("icon-ion-ios-checkmark","icon-ion-ios-circle-outline")),$(".formError").remove(),$(this).find("input[type=checkbox]").is(":checked")?($(this).parents(".offer-container").addClass("show-content"),$(this).find("i").switchClass("icon-ion-ios-circle-outline","icon-ion-ios-checkmark")):($(this).parents(".offer-container").removeClass("show-content"),$(this).find("i").switchClass("icon-ion-ios-checkmark","icon-ion-ios-circle-outline"))}),$(".offer-container#jp-miles").on("click","label",function(){var e=$
53(".offer-container#voucher-code label");e.hasClass("voucher-applied")||$(this).hasClass("jpm-applied")||($(".offer-container#voucher-code").removeClass("show-content"),e.find("input[type=checkbox]").prop("checked",!1),$(".offer-container#voucher-code label").find("i").switchClass("icon-ion-ios-checkmark","icon-ion-ios-circle-outline")),$(".formError").remove(),$(this).find("input[type=checkbox]").is(":checked")?($(this).parents(".offer-container").addClass("show-content"),$(this).find("i").switchClass("icon-ion-ios-circle-outline","icon-ion-ios-checkmark")):($(this).parents(".offer-container").removeClass("show-content"),$(this).find("i").switchClass("icon-ion-ios-checkmark","icon-ion-ios-circle-outline"))}),$(".spc-wrapper #show-email-1").on("click",function(){$("#updateUserData").find("input, textarea, select").val(""),$(this).parents("form").find(".login-email").slideUp(),$("#passwordForm #enter-password-block").slideUp(),$(this).parents("section").find("#updateUserData").slideUp(),$(this).parents("form").find("#change-email").slideDown()}),$(".spc-wrapper #show-email-2").on("click",function(){$("#updateUserData").find("input, textarea, select").val(""),$(this).parents("section").find("#updateUserData").slideUp(),$(this).parents(".your-details").find("#change-email").slideDown(),$(this).parents(".your-details").find("#userLoginForm").slideDown(),$(this).parents(".your-details").find(".login-email").addClass("hide")}),$("#enter-password-block .show-pwd").on("click",function(){$(this).hasClass("hide-pwd")?($("#enter-password-block #password").attr("type","password"),$(this).removeClass("hide-pwd")):($("#enter-password-block #password").attr("type","text"),$(this).addClass("hide-pwd"))}),$(".payment-option-wrapper .payment-option-title ul li").click(function(){$(this).addClass("selected").siblings().removeClass("selected"),$(".payment-option-wrapper .payment-option-form > div").eq($(this).index()).addClass("selected").siblings().removeClass("selected"),$(".formError").remove()}),$(".payment-option-form form label").click(function(){$(this).find("input[type=radio]").is(":checked")&&($(this).parents(".payment-option-form").find("label").removeClass("active"),$(this).addClass("active")),$(this).parents(".payment-option-form").find("label input[type=radio]").prop("checked",!1),$(this).find("input[type=radio]").prop("checked",!0)}),$(".spc-wrapper").on("click","section.completed .heading",function(e){var i=$(this).parents("section");i.siblings().find(" .spc-content-inner > .content").slideUp(),i.find(".spc-content-inner > .content").slideDown(),i.find("form#updateUserData").slideDown(),$(".formError").remove(),i.removeClass("completed").addClass("active-tab"),i.siblings().removeClass("active-tab"),i.next().removeClass("completed")}),$(".spc-wrapper section.focused").on("click",".heading",function(e){e.stopImmediatePropagation()}),$(".tooltip-p i, .tooltip-p span.icon").mouseover(function(){$(this).parents(".tooltip-p").addClass("active")}).mouseout(function(){$(this).parents(".tooltip-p").removeClass("active")}),$(".shopping-bag-popup").click(function(e){e.stopPropagation()}),$("body").on("click",function(){$("#quick_cart .shopping-bag-popup").slideUp()}),$(".search-form").click(function(){let e={_eventId:"bs_homepage_seach_bar_clicked"};processServerEvent(e),$("#search_query_top_elastic_search").jautocomplete({minLength:0,valueKey:"title",appendMethod:"replace",source:[function(e,i){var o=GLOBAL_CTX+"/search/enhanced-suggest?q=%QUERY%";jQuery.getJSON(o+"&format=json&search_text="+encodeURIComponent(e),function(o){var t=[];if(o&&(jQuery.each(o.suggestions,function(e,i){t.push(i)}),i(t),o.search_text&&"undefined"!=o.search_text&&facebookSearchEvent({...o,search_query_str:e||""}),o.products&&o.products.list&&o.products.list.length>0||o.trending&&o.trending.list&&o.trending.list.length>0)){$(".searched-products").remove();var s=getEnhancedSearchHTML(o.products,o.trending,!0);$(".xdsoft_autocomplete_dropdown").append('<div class="searched-products" data-value="">'+s+"</div>"),$(".xdsoft_autocomplete_dropdown").css("display","block"),""===e&&$(".xdsoft_autocomplete_dropdown > div").css("display","none"),$(".xdsoft_autocomplete_dropdown > div.searched-products").css("display","block")}})}]}).on("selected.xdsoft",function(e,i){$("#searchbox_elastic_search").submit()}).on("focus",function(){$(".xdsoft_autocomplete_dropdown").css("display","block")}),$("#search_query_top_elastic_search").focus()}),$(document).on("click",function(e){0===$(e.target).closest(".xdsoft_autocomplete").length&&$(".xdsoft_autocomplete_dropdown").css("display","none")}),$("#searchbox").submit(function(e){var o=$("input#search_query_top").val(),t=$(".xdsoft_autocomplete_dropdown > div").first().text().trim();if(""==t)return!0;var s=t.split(" ");s.sort();var a=o.split(" ");a.sort();var n=!0;if(a.length!=s.length)n=!1;else for(i=0;i<a.length;
53i++)if(a[i].toLowerCase()!=s[i].toLowerCase()){n=!1;break}if(!n)return!0;var r=$(".xdsoft_autocomplete_dropdown > div").first().find("a").attr("href");e.preventDefault(),window.open(r,"_self")}),$(".slide-thumbs .item img").click(function(){var e=$(".slide-thumbs .item img").size();$(".slide-thumbs .item").removeClass("active"),$(this).parents(".item").addClass("active"),logViewedProductCarouselEvent($(this),e)}),"product"==PAGE_TYPE&&$(".image-placeholder").hasClass("has-video")){var o=$("#p-video"),t=0;if($("body").hasClass("p-auto-play")){videoTimeUpdate(o.get(0),Date.now(),!0)}$(".slide-thumbs .item img").click(function(){var e=$(this).data("videocount");if(1==(t+=1)&&(bStartTime=Date.now()),$(".slide-thumbs .item").removeClass("active"),$(this).parents(".item").addClass("active"),$(".image-placeholder #wrap, .image-placeholder a.cloud-zoom").removeClass("hidden"),$(".video-wrap").addClass("hidden"),o.get(0).pause(),$(this).parents(".item").hasClass("video-thumb")){$(".image-placeholder #wrap").addClass("hidden"),$("#video-"+e).removeClass("hidden"),o.get(0).play(),trackGA("BsUI","Product_Page_Click","Video_Clicked_Desktop");var i=sessionStorage.getItem("trackedVideo1"),s=sessionStorage.getItem("trackedVideo2"),a="Click Thumbnail";2!=e||i||(a+=" video 1",sessionStorage.setItem("trackedVideo1",!0)),3!=e||s||(a+=" video 2",sessionStorage.setItem("trackedVideo2",!0)),trackGA("BsUI","Product_Page_Click",a),1==t&&videoTimeUpdate(o.get(0),bStartTime)}})}$(".block-element i.close").click(function(){$(this).parent().slideUp()});var s,a=0;
53$(window).scroll(function(){var e=$(window).scrollTop(),i=$(".sticky-filter-wrapper").height(),o=($("header").height(),$("#breadcrumb").height(),$(".browse-title").height(),400);if($(".block-element.dark-blue").is(":visible")&&(o+=$(".block-element.dark-blue").height()),e>o){if($(".sticky-filter-wrapper").addClass("active"),$(".sticky-filter-wrapper .sticky-filter-inner").addClass("container"),$(".b-new-filter .refine-search-page").css("paddingTop",i),$(".b-new-filter #top-filter-hover").css("top","0"),!$("#top-filter-hover").is(":visible")){var t=$(window).scrollTop();t<a?$("body").addClass("scrollTop"):$("body").removeClass("scrollTop"),a=t}}else $("body").removeClass("scrollTop"),$(".sticky-filter-wrapper").removeClass("active"),$(".sticky-filter-wrapper .sticky-filter-inner").removeClass("container"),$(".b-new-filter .refine-search-page").removeAttr("style")}),$(".sticky-filter-wrapper .form-item span.prcs-dlh, .sticky-filter-wrapper .form-item a").click(function(){var e=$(this).data("tagcategory"),i=$(this).data("displayname");$(this).closest(".sticky-filter-wrapper").hasClass("active")?trackGA("Browse-Page-Filters-Sticky",e,i):trackGA("Browse-Page-Filters",e,i)}),$(".sticky-filter-wrapper .form-item span.prcs-dlh, .sticky-filter-wrapper .form-item a").hover(function(){var e=$
53(this).data("tagcategory");s=setTimeout(function(){trackGA("Browse-Page-Filters","Hovered Over Filter",e)},500)},function(){clearTimeout(s)}),$("select.ve-fix").on("change",function(){var e="."+$(this).attr("id")+"formError";" "!==$(this).val()&&$(e)&&$(e).remove()});var n=0;$(".page-home .floating-nav span").click(function(){var e=$(this).parents(".month-block").data("month"),i=$(this).index()+1,o=$(".section-by-month[data-month='"+e+"']"),t=$(o.selector+" .section-content .row:nth-child("+i+")"),s=($("body"),$("html, body"));scroll_position=$(t.selector).offset().top,scroll_position-=61,1==i&&(scroll_position-=52),n>=scroll_position&&(scroll_position-=113),$(this).hasClass("selected")||s.animate({scrollTop:scroll_position},500,"swing",function(){}),n=scroll_position})});var pageScrolled=0;function headerHoverItemInt(){$(".top-level-dd").hover(function(){var e=$(this).data("timer");e&&clearTimeout(e),$(this).addClass("top-level-dd-hover"),$(this).find(".top-level-dd-inner i").removeClass("icon-ion-android-arrow-dropdown").addClass("icon-ion-android-arrow-dropup")}
53,function(){var e=$(this);e.data("timer",setTimeout(function(){e.removeClass("top-level-dd-hover"),e.find(".top-level-dd-inner i").removeClass("icon-ion-android-arrow-dropup").addClass("icon-ion-android-arrow-dropdown")},500))}),$(".ctry-list-small li").click(function(){$(this).siblings().removeClass("active"),radio=$(this).find("input[type=radio]"),radio.is(":checked")&&$(this).addClass("active")})}function hoverInit(){$(".grid-view ul.product-grid li .p-image, .grid-view ul.product-grid li .pr-d, .grid-view .pr-i .wishlist, .list-view .pr-i .wishlist, .grid-view ul.product-grid .pgi .p-image, .grid-view ul.product-grid .pr-d, .product-grid .pgi .p-image, .product-grid .pgi .pr-d, .list-view ul.product-grid li .p-image, list-view ul.product-grid li .pr-d, .grid-view .pr-i .bvideo-icon img, .list-view .pr-i .bvideo-icon img, .bvideo-icon2, .browse-page-var2 .grid-view ul.product-grid li .inner, .browse-page-var2 .pr-i .p-wrap").hoverIntent({sensitivity:200,interval:0,over:function showDetail(){var e=$(this).parents("li, .pgi").find(".lazyload-bg").data("bg");if($(this).parents("li, .pgi").find(".lazyload-bg").css("background-image",'url("'+e+'")'),$(this).parents("li, .pgi").find(".p-image img").addClass("hu").addClass("hi"),$(this).parents("li, .pgi").addClass("with-detail").delay(500).find(".pr-d, .pr-d-var2").css({display:"block"}),"browse"==PAGE_TYPE||"store-catalog"==PAGE_TYPE)$(this).parents("li").data("pid").toString()},timeout:0,out:function hideDetail(){$(this).parents("li, .pgi").find(".p-image img").load(function(){$(this).stop(!0,!0).removeClass("hu").removeClass("hi")}),$(this).parents("li, .pgi").find(".p-image img").stop(!0,!0).removeClass("hu").removeClass("hi"),$(this).parents("li, .pgi").removeClass("with-detail").find(".pr-d, .pr-d-var2").css({display:"none"})}})}function videoTimeUpdate(e,i,o){var t=0;e.addEventListener("timeupdate",function(){0==t&&(t=1,1);var i=e.duration;e.currentTime})}function showHideFilter(){$("#top-filter .block").hoverIntent({sensitivity:200,interval:25,over:showFilter,timeout:25,out:hideFilter})}function isScrolledIntoView(e){var i=$(e),o=$(window),t=o.scrollTop(),s=t+o.height()/3,a=i.offset().top;return a+i.height()<=s&&a>=t}"browse"!=PAGE_TYPE&&"store-catalog"!=PAGE_TYPE&&$(window).scroll(function(){var e=$
53(window).scrollTop();e<pageScrolled?($("body").addClass("wh-scrollTop"),$("body").removeClass("wh-scrollDown")):e>143?($("body").addClass("wh-scrollDown"),$("body").removeClass("wh-scrollTop")):($("body").removeClass("wh-scrollTop"),$("body").removeClass("wh-scrollDown")),$("body").hasClass("tah-landing-page")&&($("body").removeClass("wh-scrollTop"),e<143&&$("body.with-white-header").removeClass("fixed-white-header")),pageScrolled=e,$(".section-by-month .row .items").each(function(){if(isScrolledIntoView(this)){var e=$(this).parents(".section-by-month").data("month"),i=($(this).parent().data("index"),$(this).parent().index()+1);$(".floating-nav span").removeClass("selected"),$(".floating-nav .month-block").removeClass("active"),$(".floating-nav .month-block[data-month='"+e+"'] .nav-content span:nth-child("+i+")").addClass("selected"),$(".floating-nav .month-block[data-month='"+e+"']").addClass("active")}}),e>$(".page-home .hp-top-v1").height()-$(".floating-nav").height()?$(".floating-nav").addClass("fadeout"):$(".floating-nav").removeClass("fadeout")}),$(document).keyup(function(e){27==e.keyCode&&$(".search-instance-wrapper").removeClass("show-instance")}),$(document).ready(function(){});
54var footer_links=[["about",GLOBAL_CTX+"/about.html",!1],["about-management",GLOBAL_CTX+"/about.html#mgmt",!1],["career",GLOBAL_CTX+"/career",!1],["certifications",GLOBAL_CTX+"/certifications.html",!1],["press-room",GLOBAL_CTX+"/press-room.html",!1],["testimonials",GLOBAL_CTX+"/testimonials.html",!1],["shipping-return",GLOBAL_CTX+"/shipping-return.html",!1],["lifetime-exchange",GLOBAL_CTX+"/shipping-return.html#lifetime-exchange",!1],["privacy-policy",GLOBAL_CTX+"/privacy.html",!1],["terms-conditions",GLOBAL_CTX+"/tnc.html",!1],["fraud-warning-disclaimer",GLOBAL_CTX+"/fraud-warning-disclaimer.html",!1],["contact-us",GLOBAL_CTX+"/contact.html",!1],["faq",GLOBAL_CTX+"/faq.html",!1],["all-about-jewellery",GLOBAL_CTX+"/all-information-about-jewellery-cat-3.html",!1],["articles-on-jewellery",GLOBAL_CTX+"/how-to-articles-on-jewelry-cat-18.html",!1],["care-tips-and-advice",GLOBAL_CTX+"/jewellery-care-tips-and-advice-cat-19.html",!1],["jewellery-guides",GLOBAL_CTX+"/jewellery-guides-cat-17.html",!1],["shopping-assistant",GLOBAL_CTX+"/shopping-assistant.html?ref=ShoppingAssistant",!1,["_trackEvent","BsUI","shopping-assistant","clicked"]],["wedding-bespoke",GLOBAL_CTX+"/wedding.html",!1],["ndd",GLOBAL_CTX+"/jewellery/next+day+delivery.html",!1],["play-store","https://play.google.com/store/apps/details?id=com.bluestone.android&referrer=website&utm_source%3Dwebsite_footer%26utm_medium%3Dwebsite%26utm_campaign%3Dwebsite",!0],["app-store","https://itunes.apple.com/in/app/bluestone-jewellery-online/id1107631430?mt=8",!0],["fb","http://www.facebook.com/bluestonejewels",!0],["tw","http://twitter.com/bluestone_com",!0],["yt","http://www.youtube.com/user/Bluestonedotcom",!0],["pin","http://in.pinterest.com/bluestonedotcom/",!0],["ins","https://www.instagram.com/bluestone_jewellery/",!0],["cg","mailto:[email protected]",!0],["cs","mailto:[email protected]",!0],["sis",GLOBAL_CTX+"/shop-in-shop.html",!1],["why-buy-from-us",GLOBAL_CTX+"/whybuyfromus.html",!1]],header_links=[["store-link",GLOBAL_CTX+"/store.html",!1],["wishlist-view",GLOBAL_CTX+"/wishlist/view",!1],["signout",GLOBAL_CTX+"/signout",!1],["gift-card",GLOBAL_CTX+"/giftcard.html",!1,["_trackEvent","UITest-E-GiftCard","e-gift-card-icon-nav-pane",""]],["order",GLOBAL_CTX+"/order"],["collections",GLOBAL_CTX+"/collections.html",!1,["_trackEvent","BsUI","MainMenu","Collections"]],["ndd",GLOBAL_CTX+"/jewellery/next+day+delivery.html",!1,["_trackEvent","BsUI","MainMenu","Next_day_delivery"]],["valentine-browse",GLOBAL_CTX+"/jewellery/valentine+day+delivery.html",!1,["_trackEvent","BsUI","MainMenu","Valentine_day_delivery"]],["offers",GLOBAL_CTX+"/offers.html",!1,["_trackEvent","BsUI","MainMenu","Offers"]],["history-link",GLOBAL_CTX+"/recently-viewed",!1]],testimonials_block_links=[["tb01","http://www.mouthshut.com/review/Bluestone-com-review-uttrumrsou",!0],["tb02","http://www.mouthshut.com/review/Bluestone-com-review-ptlqpnstpt",!0],["tb03","https://www.facebook.com/manisha.lalwani86?fref=nf",!0],["tb04","https://www.facebook.com/binod.seo?fref=nf",!0],["tb05","https://www.facebook.com/ruchika.s.dang",!0],["tb06","https://www.facebook.com/100002146737941",!0],["tb07","https://www.facebook.com/meenaxi.george",!0],["tb08","http://www.mouthshut.com/pravin2650/timeline",!0]],bs_promise_links=[["30-day-return",GLOBAL_CTX+"/shipping-return.html#30-day-return",!0],["lifetime-exchange",GLOBAL_CTX+"/shipping-return.html#lifetime-exchange",!0
54],["certifications",GLOBAL_CTX+"/certifications.html",!0],["refund",GLOBAL_CTX+"/shipping-return.html#refund",!0],["free-shipping",GLOBAL_CTX+"/shipping-return.html#free-shipping",!0],["free-returns",GLOBAL_CTX+"/shipping-return.html#free-returns",!0]],bs_certification_links=[["bis","https://www.bis.gov.in/",!0],["pgi","https://platinumguild.com/",!0],["igi","https://www.igi.org/",!0],["gsi","https://gemscience.net/",!0]],gifts_links=[["gifts",GLOBAL_CTX+"/gifts.html",!1,["_trackEvent","BsUI","MainMenu","Gifts"]],["gift-card",GLOBAL_CTX+"/giftcard.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_GiftCard"]],["gfhr",GLOBAL_CTX+"/jewellery/filter/next+day+delivery-gifts+for+her.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_ForHer"]],["gfhm",GLOBAL_CTX+"/jewellery/filter/next+day+delivery-gifts+for+him.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_ForHim"]],["valentine",GLOBAL_CTX+"/valentine.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_Valentine"]],["gifts-valentine",GLOBAL_CTX+"/jewellery/valentine+s+day.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_Valentine"]],["gfb",GLOBAL_CTX+"/jewellery/gift-for+birthday.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_Birthday"]],["gfa",GLOBAL_CTX+"/jewellery/gift-for+anniversary.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_Anniversary"]],["gfw",GLOBAL_CTX+"/jewellery/gift-for+wedding.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_Wedding"]],["gf10k",GLOBAL_CTX+"/jewellery/gift-rs+0+to+10000.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_Under10k"]],["gf10-20",GLOBAL_CTX+"/jewellery/gift-rs+10000+to+20000.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_10k20k"]],["gf20-30",GLOBAL_CTX+"/jewellery/gift-rs+20000+to+30000.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_20k30k"]],["gf30",GLOBAL_CTX+"/jewellery/gift-rs+30000+to+1000000.html",!1,["_trackEvent","BsUI","MainMenu","Gifts_above30k"]]],home_page_w=[["certifications",GLOBAL_CTX+"/certifications.html",!0,["_trackEvent","BsUI","HP_Cerification_Icon_Clicked","HP_Cerification_Icon"]],["30-day-return",GLOBAL_CTX+"/shipping-return.html#30-day-return",!0,["_trackEvent","BsUI","HP_30Day_Return_Icon_Clicked","HP_30Day_Return_Icon"]],["lifetime-exchange",GLOBAL_CTX+"/shipping-return.html#lifetime-exchange",!0,["_trackEvent","BsUI","HP_Lifetime_Exchange_Icon_Clicked","HP_Lifetime_Exchange_Icon"]]],menu_links=[["rings-all",GLOBAL_CTX+"/jewellery/rings.html",!1],["rings-engagement",GLOBAL_CTX+"/jewellery/engagement-rings.html",!1],["rings-diamond",GLOBAL_CTX+"/jewellery/diamond-rings.html",!1],["rings-couple-band",GLOBAL_CTX+"/jewellery/couple+band-rings.html",!1],["rings-plain-gold",GLOBAL_CTX+"/jewellery/plain+gold-rings.html",!1],["rings-officewear",GLOBAL_CTX+"/jewellery/officewear-rings.html",!1],["rings-gemstone",GLOBAL_CTX+"/jewellery/gemstone-rings.html",!1],["rings-stackable",GLOBAL_CTX+"/jewellery/filter/stackable-rings.html",!1],["rings-slider",GLOBAL_CTX+"/jewellery/filter/slider-adjustable+rings.html",!1],["rings-cocktail",GLOBAL_CTX+"/jewellery/cocktail-rings.html",!1],["rings-preset-solitaires",GLOBAL_CTX+"/jewellery/preset+solitaire+rings.html",!1],["rings-multi-finger",GLOBAL_CTX+"/jewellery/multi+finger+rings.html",!1],["rings-religious",GLOBAL_CTX+"/jewellery/religious-rings.html",!1],["rings-platinum",GLOBAL_CTX+"/jewellery/platinum-rings.html",!1],["rings-men",GLOBAL_CTX+"/jewellery/rings-men.html",!1],["rings-navaratna",GLOBAL_CTX+"/jewellery/navaratna-rings.html",!1],["rings-gift",GLOBAL_CTX+"/jewellery/filter/gift-rings.html",!1],["rings-pearl",GLOBAL_CTX+"/jewellery/pearl-rings.html",!1],["rings-view-all",GLOBAL_CTX+"/jewellery/rings.html",!1],["rings-below15k",GLOBAL_CTX+"/jewellery/filter/rings-rs+0+to+15000.html",!1],["rings-15k20k",GLOBAL_CTX+"/jewellery/filter/rings-rs+15000+to+20000.html",!1],["rings-20k30k",GLOBAL_CTX+"/jewellery/filter/rings-rs+20000+to+30000.html",!1],["rings-30k50k",GLOBAL_CTX+"/jewellery/filter/rings-rs+30000+to+50000.html",!1],["rings-above50k",GLOBAL_CTX+"/jewellery/filter/rings-rs+50000+to+1000000.html",!1],["rings-offers",GLOBAL_CTX+"/jewellery/filter/offers-rings.html",!1],["rings-diamond",GLOBAL_CTX+"/jewellery/diamond-rings.html",!1],["rings-gold",GLOBAL_CTX+"/jewellery/gold-rings.html",!1],["rings-gold-white",GLOBAL_CTX+"/jewellery/white+gold-rings.html",!1],["rings-gold-rose",GLOBAL_CTX+"/jewellery/rose+gold-rings.html",!1],["rings-platinum",GLOBAL_CTX+"/jewellery/platinum-rings.html",!1],["rings-ndd",GLOBAL_CTX+"/jewellery/filter/next+day+delivery-rings.html",!1],["rings-open-look",GLOBAL_CTX+"/jewellery/filter/open+look+rings.html",!1],["rings-liviana-collection",GLOBAL_CTX+"/jewellery/liviana+collection.html",!1],["earrings-all",GLOBAL_CTX+"/jewellery/earrings.html",!1],["earrings-studs",GLOBAL_CTX+"/jewellery/studs-earrings.html",!1],["earrings-danglers",GLOBAL_CTX+"/jewellery/danglers-earrings.html",!1],["earrings-drops",GLOBAL_CTX+"/jewellery/drops-earrings.html",!1],["earrings-plain-gold",GLOBAL_CTX+"/jewellery/plain+gold-earrings.html",!1],["earrings-sui-dhaga",GLOBAL_CTX+"/jewellery/sui+dhaga-earrings.html",!1],["earrings-diamond",GLOBAL_CTX+"/jewellery/diamond-earrings.html",!1],["earrings-jhumka",GLOBAL_CTX+"/jewellery/jhumka-earrings.html",!1],["earrings-pearl",GLOBAL_CTX+"/jewellery/pearl-earrings.html",!1],["earrings-chandbali",GLOBAL_CTX+"/jewellery/chand+bali.html",!1],["earrings-gemstone",GLOBAL_CTX+"/jewellery/gemstone-earrings.html",!1],["earrings-front-back",GLOBAL_CTX+"/jewellery/front+back.html",!1],["earrings-hoops",GLOBAL_CTX+"/jewellery/hoops-earrings.html",!1],["earrings-multi-pierced","/jewellery/multi+pierced-earrings.html",!1],["earrings-kids",GLOBAL_CTX+"/jewellery/earrings-kids.html",!1],["earrings-earcuff",GLOBAL_CTX+"/jewellery/earcuff-earrings.html",!1],["earrings-men",GLOBAL_CTX+"/jewellery/earrings-men.html",!1],["earrings-navaratna",GLOBAL_CTX+"/jewellery/filter/navaratna-earrings.html",!1],["earrings-gift",GLOBAL_CTX+"/jewellery/filter/gift-earrings.html",!1],["earrings-mixnmatch",GLOBAL_CTX+"/jewellery/filter/mix+and+match-earrings.html",!1],["earrings-view-all",GLOBAL_CTX+"/jewellery/earrings.html",!1],["earrings-below10k",GLOBAL_CTX+"/jewellery/filter/earrings-rs+0+to+10000.html",!1],["earrings-15k20k",GLOBAL_CTX+"/jewellery/filter/earrings-rs+15000+to+20000.html",!1],["earrings-20k30k",GLOBAL_CTX+"/jewellery/filter/earrings-rs+20000+to+30000.html",!1],["earrings-30k50k",GLOBAL_CTX+"/jewellery/filter/earrings-rs+30000+to+50000.html",!1],["earrings-above50k",GLOBAL_CTX+"/jewellery/filter/earrings-rs+50000+to+1000000.html",!1],["earrings-offers",GLOBAL_CTX+"/jewellery/filter/offers-earrings.html",!1],["earrings-diamond",GLOBAL_CTX+"/jewellery/diamond-earrings.html",!1],["earrings-gold",GLOBAL_CTX+"/jewellery/gold-earrings.html",!1],["earrings-gold-white",GLOBAL_CTX+"/jewellery/white+gold-earrings.html",!1],["earrings-gold-rose",GLOBAL_CTX+"/jewellery/rose+gold-earrings.html",!1],["earrings-gemstone",GLOBAL_CTX+"/jewellery/gemstone-earrings.html",!1],["earrings-preset-solitaire",GLOBAL_CTX+"/jewellery/filter/preset+solitaire+earrings.html",!1],["earrings-ndd",GLOBAL_CTX+"/jewellery/filter/next+day+delivery-earrings.html",!1],["earrings-ziba",GLOBAL_CTX+"/ziba-collection.html",!1],["pendants-all",GLOBAL_CTX+"/jewellery/pendants.html",!1],["pendants-alphabet",GLOBAL_CTX+"/jewellery/alphabet-pendants.html",!1],["pendants-mangalsutra",GLOBAL_CTX+"/jewellery/mangalsutra.html",!1],["pendants-religious",GLOBAL_CTX+"/jewellery/religious-pendants.html",!1],["pendants-diamond",GLOBAL_CTX+"/jewellery/diamond-pendants.html",!1],["pendants-fashion",GLOBAL_CTX+"/jewellery/fashion-pendants.html",!1],["pendants-pearl",GLOBAL_CTX+"/jewellery/pearl-pendants.html",!1],["pendants-hearts",GLOBAL_CTX+"/jewellery/hearts-pendants.html",!1],["pendants-gemstone",GLOBAL_CTX+"/jewellery/gemstone-pendants.html",!1],["pendants-locket",GLOBAL_CTX+"/jewellery/locket-pendants.html",!1],["pendants-plain-gold",GLOBAL_CTX+"/jewellery/plain+gold-pendants.html",!1],["pendants-officewear",G
54LOBAL_CTX+"/jewellery/officewear-pendants.html?preferredProducts=818,3177,2979,1896,2083,1688",!1],["pendants-men",GLOBAL_CTX+"/jewellery/pendants-men.html",!1],["pendants-zodiac",GLOBAL_CTX+"/jewellery/zodiac-pendants.html",!1],["pendants-kids",GLOBAL_CTX+"/jewellery/pendants-kids.html",!1],["pendants-navaratna",GLOBAL_CTX+"/jewellery/navaratna-pendants.html",!1],["pendants-gift",GLOBAL_CTX+"/jewellery/filter/gift-pendants.html",!1],["pendants-all",GLOBAL_CTX+"/jewellery/pendants.html",!1],["pendants-below10k",GLOBAL_CTX+"/jewellery/filter/pendants-rs+0+to+10000.html",!1],["pendants-10k15k",GLOBAL_CTX+"/jewellery/filter/pendants-rs+10000+to+15000.html",!1],["pendants-15k20k",GLOBAL_CTX+"/jewellery/filter/pendants-rs+15000+to+20000.html",!1],["pendants-20k30k",GLOBAL_CTX+"/jewellery/filter/pendants-rs+20000+to+30000.html",!1],["pendants-above25k",GLOBAL_CTX+"/jewellery/filter/pendants-rs+25000+to+1000000.html",!1],["pendants-offers",GLOBAL_CTX+"/jewellery/filter/offers-pendants.html",!1],["pendants-diamond",GLOBAL_CTX+"/jewellery/diamond-pendants.html",!1],["pendants-gold",GLOBAL_CTX+"/jewellery/gold-pendants.html",!1],["pendants-gold-white",GLOBAL_CTX+"/jewellery/white+gold-pendants.html",!1],["pendants-gold-rose",GLOBAL_CTX+"/jewellery/rose+gold-pendants.html",!1],["pendants-gemstone",GLOBAL_CTX+"/jewellery/gemstone-pendants.html",!1],["pendants-preset-solitaire",GLOBAL_CTX+"/jewellery/filter/preset+solitaire+pendants.html",!1],["pendants-ndd",GLOBAL_CTX+"/jewellery/filter/next+day+delivery-pendants.html",!1],["pendants-floral",GLOBAL_CTX+"/floral.html",!1],["pendants-divaine",GLOBAL_CTX+"/jewellery/divaine+diamonds+collection.html",!1],["bangles-all",GLOBAL_CTX+"/jewellery/bangles.html",!1],["bangles-everyday",GLOBAL_CTX+"/jewellery/everyday-bangles.html",!1],["bangles-dailywear",GLOBAL_CTX+"/jewellery/filter/essentially+light+collection-bangles.html",!1],["bangles-diamond",GLOBAL_CTX+"/jewellery/diamond-bangles.html",!1],["bangles-wedding",GLOBAL_CTX+"/jewellery/wedding-bangles.html",!1],["bangles-kada",GLOBAL_CTX+"/jewellery/kada-men.html",!1],["bangles-plain-gold",GLOBAL_CTX+"/jewellery/plain+gold-bangles.html",!1],["bangles-officewear",GLOBAL_CTX+"/jewellery/officewear-Bangles.html",!1],["bangles-men",GLOBAL_CTX+"/jewellery/bangles-men.html",!1],["bangles-eternity",GLOBAL_CTX+"/jewellery/eternity-bangles.html",!1],["bangles-kids",GLOBAL_CTX+"/jewellery/bangles-kids.html",!1],["bangles-faishon",GLOBAL_CTX+"/jewellery/fashion-bangles.html",!1],["bangles-gift",GLOBAL_CTX+"/jewellery/filter/gift-bangles.html",!1],["bangles-all",GLOBAL_CTX+"/jewellery/bangles.html",!1],["bangles-below30k",GLOBAL_CTX+"/jewellery/filter/bangles-rs+0+to+30000.html",!1],["bangles-30k50k",GLOBAL_CTX+"/jewellery/filter/bangles-rs+30000+to+50000.html",!1],["bangles-above50k",GLOBAL_CTX+"/jewellery/filter/bangles-rs+50000+to+1000000.html",!1],["bangles-offers",GLOBAL_CTX+"/jewellery/filter/offers-bangles.html",!1],["bangles-diamond",GLOBAL_CTX+"/jewellery/diamond-bangles.html",!1],["bangles-gold",GLOBAL_CTX+"/jewellery/gold-bangles.html",!1],["bangles-gold-white",GLOBAL_CTX+"/jewellery/white+gold-bangles.html",!1],["bangles-gold-rose",GLOBAL_CTX+"/jewellery/filter/rose+gold-bangles.html",!1],["bangles-gemstone",GLOBAL_CTX+"/jewellery/gemstone-bangles.html",!1],["bangles-ruby",GLOBAL_CTX+"/jewellery/ruby-bangles.html",!1],["bangles-ndd",GLOBAL_CTX+"/jewellery/filter/next+day+delivery-bangles.html",!1],["bangles-teen",GLOBAL_CTX+"/jewellery/filter/teen+bangles.html",!1],["bangles-preset",GLOBAL_CTX+"/jewellery/filter/preset+solitaires.html",!1],["preset-solitaire",GLOBAL_CTX+"/jewellery/preset+solitaires.html",!1],["solitaires-build-ring",GLOBAL_CTX+"/build-your-own-diamond-ring",!1],["solitaires-preset-rings",GLOBAL_CTX+"/jewellery/preset+solitaire+rings.html",!1],["solitaires-build-pendant",GLOBAL_CTX+"/build-your-own-diamond-pendant",!1],["solitaires-preset-pendant",GLOBAL_CTX+"/jewellery/filter/preset+solitaire+pendants.html",!1],["solitaires-build-earrings",GLOBAL_CTX+"/build-your-own-diamond-earring",!1],["solitaires-preset-earrings",GLOBAL_CTX+"/jewellery/filter/preset+solitaire+earrings.html",!1],["solitaires-ndd",GLOBAL_CTX+"/jewellery/filter/next+day+delivery-solitaire.html",!1],["solitaires-education",GLOBAL_CTX+"/jewellery-education-cat-2.html",!1],["solitaires-education-cut",GLOBAL_CTX+"/jewellery-education/diamond-and-solitaire-guide/diamond-cut",!1],["solitaires-education-color",GLOBAL_CTX+"/jewellery-education/diamond-and-solitaire-guide/diamond-color",!1],["solitaires-education-clarity",GLOBAL_CTX+"/jewellery-education/diamond-and-solitaire-guide/diamond-clarity",!1],["solitaires-education-carat",GLOBAL_CTX+"/jewellery-education/diamond-and-solitaire-guide/diamond-carat",!1],["solitaires-education2",GLOBAL_CTX+"/jewellery-care-tips-and-advice-cat-19.html",!1],["solitaires-certifications",GLOBAL_CTX+"/certifications.html",!1],["all-jewellery",GLOBAL_CTX+"/jewellery.html",!1],["all-jewellery-bracelets",GLOBAL_CTX+"/jewellery/bracelets.html",!1],["all-jewellery-bracelets-diamond",GLOBAL_CTX+"/jewellery/diamond-bracelets.html",!1],["all-jewellery-bracelets-plain-gold",GLOBAL_CTX+"/jewellery/plain+gold-bracelets.html",!1],["all-jewellery-bracelets-men",GLOBAL_CTX+"/jewellery/bracelets-men.html",!1],["all-jewellery-diamond",GLOBAL_CTX+"/jewellery/diamond.html",!1],["all-jewellery-diamond-rings",GLOBAL_CTX+"/jewellery/diamond-rings.html",!1],["all-jewellery-diamond-earrings",GLOBAL_CTX+"/jewellery/diamond-earrings.html",!1],["all-jewellery-diamond-pendants",GLOBAL_CTX+"/jewellery/diamond-pendants.html",!1],["all-jewellery-diamond-bangles",GLOBAL_CTX+"/jewellery/diamond-bangles.html",!1],["all-jewellery-diamond-bracelets",GLOBAL_CTX+"/jewellery/diamond-bracelets.html",!1],["all-jewellery-diamond-necklaces",GLOBAL_CTX+"/jewellery/diamond-necklaces.html",!1],["all-jewellery-diamond-mangalsutra",GLOBAL_CTX+"/jewellery/diamond-mangalsutra.html",!1],["all-jewellery-diamond-nosepins",GLOBAL_CTX+"/jewellery/diamond-nose+pins.html",!1],["all-jewellery-diamond-cufflinks",GLOBAL_CTX+"/jewellery/diamond-cufflinks.html",!1],["all-jewellery-nosepins",GLOBAL_CTX+"/jewellery/nose+pins.html",!1],["all-jewellery-nosepins-noserings",GLOBAL_CTX+"/jewellery/filter/nose+ring-nose+pins.html",!1],["all-jewellery-nosepins-plain-gold",GLOBAL_CTX+"/jewellery/filter/plain+gold-nose+pins.html",!1],["all-jewellery-nosepins-diamond",GLOBAL_CTX+"/jewellery/diamond-nose+pins.html",!1],["all-jewellery-gemstone-nose-pins",GLOBAL_CTX+"/jewellery/gemstone-nose+pins.html",!1],["all-jewellery-gold",GLOBAL_CTX+"/jewellery/gold.html",!1],["all-jewellery-gold-rings",GLOBAL_CTX+"/jewellery/gold-rings.html",!1],["all-jewellery-gold-earrings",GLOBAL_CTX+"/jewellery/gold-earrings.html",!1],["all-jewellery-gold-pendants",GLOBAL_CTX+"/jewellery/gold-pendants.html",!1],["all-jewellery-gold-bangles",GLOBAL_CTX+"/jewellery/gold-bangles.html",!1],["all-jewellery-gold-bracelets",GLOBAL_CTX+"/jewellery/gold-bracelets.html",!1],["all-jewellery-gold-necklaces",GLOBAL_CTX+"/jewellery/gold-necklaces.html",!1],["all-jewellery-gold-mangalsutra",GLOBAL_CTX+"/jewellery/gold-mangalsutra.html",!1],["all-jewellery-gold-nosepins",GLOBAL_CTX+"/jewellery/gold-nose+pins.html",!1],["all-jewellery-necklaces",GLOBAL_CTX+"/jewellery/necklaces.html",!1],["all-jewellery-necklaces-wedding",GLOBAL_CTX+"/jewellery/wedding-necklaces.html",!1],["all-jewellery-necklaces-diamond",GLOBAL_CTX+"/jewellery/diamond-necklaces.html",!1],["all-jewellery-necklaces-pearl",GLOBAL_CTX+"/jewellery/pearl-necklaces.html",!1],["all-jewellery-necklaces-plain-gold",GLOBAL_CTX+"/jewellery/plain+gold-necklaces.html",!1],["all-jewellery-gemstone",GLOBAL_CTX+"/jewellery/gemstone.html",!1],["all-jewellery-gemstone-rings",GLOBAL_CTX+"/jewellery/gemstone-rings.html",!1],["all-jewellery-gemstone-earrings",GLOBAL_CTX+"/jewellery/gemstone-earrings.html",!1],["all-jewellery-gemstone-pendants",GLOBAL_CTX+"/jewellery/gemstone-pendants.html",!1],["all-jewellery-gemstone-bangles",GLOBAL_CTX+"/jewellery/gemstone-bangles.html",!1],["all-jewellery-gemstone-bracelets",GLOBAL_CTX+"/jewellery/gemstone-bracelets.html",!1],["all-jewellery-gemstone-necklaces",GLOBAL_CTX+"/jewellery/gemstone-necklaces.html",!1],["all-jewellery-gemstone-mangalsutra",GLOBAL_CTX+"/jewellery/gemstone-mangalsutra.html",!1],["all-jewellery-gemstone-nosepins",GLOBAL_CTX+"/jewellery/gemstone-nose+pins.html",!1],["all-jewellery-mangalsutra",GLOBAL_CTX+"/jewellery/mangalsutra.html",!1],["all-jewellery-mangalsutra-diamond",GLOBAL_CTX+"/jewellery/diamond-mangalsutra.html",!1],["all-jewellery-mangalsutra-plain-gold",GLOBAL_CTX+"/jewellery/plain+gold-mangalsutra.html",!1],["all-jewellery-mangalsutra-everyday",GLOBAL_CTX+"/jewellery/everyday-mangalsutra.html",!1],["all-jewellery-platinum",GLOBAL_CTX+"/jewellery/platinum.html",!1],["all-jewellery-platinum-women",GLOBAL_CTX+"/jewellery/filter/platinum-women.html",!1],["all-jewellery-platinum-men",GLOBAL_CTX+"/jewellery/filter/platinum-men.html",!1],["all-jewellery-platinum-diamond",GLOBAL_CTX+"/jewellery/filter/platinum-diamond.html",!1],["all-jewellery-goldcoins",GLOBAL_CTX+"/jewellery/goldcoins.html",!1],["all-jewellery-goldcoins-plain-gold",GLOBAL_CTX+"/jewellery/plaingoldcoins.html",!1],["all-jewellery-goldcoins-lakshmi",GLOBAL_CTX+"/jewellery/lakshmigoldcoins.html",!1],["mens-jewellery-kadas",GLOBAL_CTX+"/jewellery/bangles-men.html",!1],["mens-jewellery-rings",GLOBAL_CTX+"/jewellery/rings-men.html",!1],["mens-jewellery-bracelets",GLOBAL_CTX+"/jewellery/bracelets-men.html",!1],["mens-jewellery-pendants",GLOBAL_CTX+"/jewellery/pendants-men.html",!1],["mens-jewellery-cufflinks",GLOBAL_CTX+"/jewellery/filter/cufflinks.html",!1],["mens-jewellery-chains",GLOBAL_CTX+"/jewellery/filter/chains-men.html",!1],["gold-coins-weight-0_5gms",GLOBAL_CTX+"/gold+coins/500-milligram-24-kt-gold-coin~52981.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins_0.5gms"]],["gold-coins-weight-1gms",GLOBAL_CTX+"/jewellery/1gram24ktgoldcoins.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins_1gms"]],["gold-coins-weight-2gms",GLOBAL_CTX+"/jewellery/2gram24ktgoldcoins.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins_2gms"]],["gold-coins-weight-5gms",GLOBAL_CTX+"/jewellery/5gram24ktgoldcoins.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins_5gms"]],["gold-coins-weight-10gms",GLOBAL_CTX+"/jewellery/10gram24ktgoldcoins.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins_10gms"]],["gold-coins-weight-20gms",GLOBAL_CTX+"/jewellery/20gram24ktgoldcoins.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins_20gms"]],["gold-coins-weight-50gms",GLOBAL_CTX+"/jewellery/50gram24ktgoldcoins.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins_50gms"]],["l-gold-coins-weight-1gms",GLOBAL_CTX+"/gold+coins/1-gram-24-kt-lakshmi-gold-coin~41619.html",!1,["_trackEvent","BsUI","MainMenu","LakshmiGoldCoins_1gms"]],["l-gold-coins-weight-2gms",GLOBAL_CTX+"/gold+coins/2-gram-24-kt-lakshmi-gold-coin~9168.html",!1,["_trackEvent","BsUI","MainMenu","LakshmiGoldCoins_2gms"]],["l-gold-coins-weight-5gms",GLOBAL_CTX+"/gold+coins/5-gram-24-kt-lakshmi-gold-coin~9165.html",!1,["_trackEvent","BsUI","MainMenu","LakshmiGoldCoins_5gms"]],["l-gold-coins-weight-10gms",GLOBAL_CTX+"/gold+coins/10-gram-24-kt-lakshmi-gold-coin~9167.html",!1,["_trackEvent","BsUI","MainMenu","LakshmiGoldCoins_10gms"]],["l-gold-coins-weight-20gms",GLOBAL_CTX+"/gold+coins/20-gram-24-kt-lakshmi-gold-coin~9164.html",!1,["_trackEvent","BsUI","MainMenu","LakshmiGoldCoins_20gms"]],["l-gold-coins-weight-50gms",GLOBAL_CTX+"/gold+coins/50-gram-24-kt-lakshmi-gold-coin~9163.html",!1,["_trackEvent","BsUI","MainMenu","LakshmiGoldCoins_50gms"]],["gold-coins-22-weight-1gms",GLOBAL_CTX+"/gold+coins/1-gram-22-kt-gold-coin~10369.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins22_1gms"]],["gold-coins-22-weight-2gms",GLOBAL_CTX+"/gold+coins/2-gram-22-kt-gold-coin~10371.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins22_2gms"]],["gold-coins-22-weight-5gms",GLOBAL_CTX+"/gold+coins/5-gram-22-kt-gold-coin~10368.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins22_5gms"]],["gold-coins-22-weight-10gms",GLOBAL_CTX+"/gold+coins/10-gram-22-kt-gold-coin~10365.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins22_10gms"]],["gold-coins-22-weight-20gms",GLOBAL_CTX+"/gold+coins/20-gram-22-kt-gold-coin~10370.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins22_20gms"]],["gold-coins-22-weight-50gms",GLOBAL_CTX+"/gold+coins/50-gram-22-kt-gold-coin~10364.html",!1,["_trackEvent","BsUI","MainMenu","GoldCoins22_50gms"]],["silver-coins-weight-5gms",GLOBAL_CTX+"/silver+coins/5-gram-silver-coin~60168.html",!1,["_trackEvent","BsUI","MainMenu","SilverCoins_5gms"]],["silver-coins-weight-10gms",GLOBAL_CTX+"/silver+coins/10+gram+silver+coin~53090.html",!1,["_trackEvent","BsUI","MainMenu","SilverCoins_10gms"]],["silver-coins-weight-20gms",GLOBAL_CTX+"/silver+coins/20-gram-silver-coin~56793.html",!1,["_trackEvent","BsUI","MainMenu","SilverCoins_20gms"]],["all-jewellery-chains",GLOBAL_CTX+"/jewellery/chains.html",!1],["all-jewellery-chains-mangalsutra",GLOBAL_CTX+"/jewellery/filter/mangalsutra+chains.html",!1],["all-jewellery-men",GLOBAL_CTX+"/jewellery/men.html",!1],["all-jewellery-men-rings",GLOBAL_CTX+"/jewellery/rings-men.html",!1],["all-jewellery-men-bangles",GLOBAL_CTX+"/jewellery/bangles-men.html",!1],["all-jewellery-men-bracelets",GLOBAL_CTX+"/jewellery/bracelets-men.html",!1],["all-jewellery-men-earrings",GLOBAL_CTX+"/jewellery/earrings-men.html",!1],["all-jewellery-kids",GLOBAL_CTX+"/jewellery/kids.html",!1],["all-jewellery-kids-earrings",GLOBAL_CTX+"/jewellery/earrings-kids.html",!1],["all-jewellery-kids-pendants",GLOBAL_CTX+"/jewellery/pendants-kids.html",!1],["gifts-all",GLOBAL_CTX+"/gifts.html",!1],["gifts-rakhi",GLOBAL_CTX+"/jewellery/filter/raksha+bandhan.html",!1],["gifts-anniversary",GLOBAL_CTX+"/jewellery/filter/gift-for+anniversary.html",!1],["gifts-birthday",GLOBAL_CTX+"/jewellery/filter/gift-for+birthday.html",!1],["gifts-engagement",GLOBAL_CTX+"/jewellery/gift-for+engagement.html",!1],["gifts-wedding",GLOBAL_CTX+"/jewellery/filter/for+wedding-gift.html",!1],["gifts-her",GLOBAL_CTX+"/jewellery/filter/gifts+for+her.html",!1],["gifts-below50k",GLOBAL_CTX+"/jewellery/filter/gift-rs+0+to+5000.html",!1],["gifts-5k10k",GLOBAL_CTX+"/jewellery/filter/gift-rs+5000+to+10000.html",!1],["gifts-10k20k",GLOBAL_CTX+"/jewellery/filter/gift-rs+10000+to+20000.html",!1],["gifts-20k30k",GLOBAL_CTX+"/jewellery/filter/gift-rs+20000+to+30000.html",!1],["gifts-above30k",GLOBAL_CTX+"/jewellery/filter/gift-rs+30000+to+1000000.html",!1],["gifts-offers",GLOBAL_CTX+"/jewellery/filter/offers-gift.html",!1],["gifts-her",GLOBAL_CTX+"/jewellery/filter/gifts+for+her.html",!1],["gifts-him",GLOBAL_CTX+"/jewellery/filter/gifts+for+him.html",!1],["gifts-mother",GLOBAL_CTX+"/jewellery/filter/gift-for+mother.html",!1],["gifts-father",GLOBAL_CTX+"/jewellery/filter/gift-for+father.html",!1],["gifts-sister",GLOBAL_CTX+"/jewellery/filter/gift-for+sister.html",!1],["gifts-brother",GLOBAL_CTX+"/jewellery/filter/gift-for+brother.html",!1],["gifts-ndd",GLOBAL_CTX+"/jewellery/filter/next+day+delivery-gift.html",!1],["gifts-browse-all",GLOBAL_CTX+"/jewellery/filter/gift.html",!1],["gifts-giftcard",GLOBAL_CTX+"/giftcard.html",!1],["next-day-delivery",GLOBAL_CTX+"/jewellery/next+day+delivery.html",!1],["goldcoins-2gms",GLOBAL_CTX+"/gold+coins/2-gram-24-kt-gold-coin~5921.html",!1],["goldcoins-5gms",GLOBAL_CTX+"/gold+coins/5-gram-24-kt-gold-coin~5922.html",!1],["goldcoins-10gms",GLOBAL_CTX+"/gold+coins/10-gram-24-kt-gold-coin~5923.html",!1],["goldcoins-20gms",GLOBAL_CTX+"/gold+coins/20-gram-24-kt-gold-coin~5924.html",!1],["goldcoins-50gms",GLOBAL_CTX+"/gold+coins/50-gram-24-kt-gold-coin~5925.html",!1],["goldcoins-all",GLOBAL_CTX+"/jewellery/goldcoins.html",!1],["goldcoins-plain-gold",GLOBAL_CTX+"/jewellery/plaingoldcoins.html",!1],["goldcoins-lakshmi",GLOBAL_CTX+"/jewellery/lakshmigoldcoins.html",!1],["offers",GLOBAL_CTX+"/jewellery/offers.html",!1],["rakhi",GLOBAL_CTX+"/jewellery/filter/raksha+bandhan.html",!1],["gift-for-sister",GLOBAL_CTX+"/jewellery/gift-for+sister.html",!1],["gifts-for-her",GLOBAL_CTX+"/jewellery/gifts+for+her.html",!1],["offers-10off",GLOBAL_CTX+"/jewellery/filter/upto+30+percent+off.html",!1],["offers-2030off",GLOBAL_CTX+"/jewellery/filter/20+to+30+
54percent+off.html",!1],["offers-30off",GLOBAL_CTX+"/jewellery/filter/flat+30+percent+off.html",!1],["offers-100mc",GLOBAL_CTX+"/jewellery/filter/100+percent+making+charge+off.html",!1],["offers-75mcoff",GLOBAL_CTX+"/jewellery/filter/75+percent+making+charge+off.html",!1],["offers-50mcoff",GLOBAL_CTX+"/jewellery/filter/50+percent+making+charge+off.html",!1],["offers-flat50mcoff",GLOBAL_CTX+"/jewellery/filter/flat+50+percent+making+charge+off.html",!1],["offers-20mcoff",GLOBAL_CTX+"/jewellery/filter/20+percent+making+charge+off.html",!1],["offers-30mcoff",GLOBAL_CTX+"/jewellery/filter/30+percent+making+charge+off.html",!1],["offers-25mcoff",GLOBAL_CTX+"/jewellery/filter/25+percent+making+charge+off.html",!1],["offers-15mcoff",GLOBAL_CTX+"/jewellery/filter/15+percent+making+charge+off.html",!1],["offers-10mcoff",GLOBAL_CTX+"/jewellery/filter/10+percent+making+charge+off.html",!1],["offers-flat50mcoffdiamond",GLOBAL_CTX+"/jewellery/filter/flat+50+percent+making+charge+off+on+diamond.html",!1],["offers-flat50mcoffgemstone",GLOBAL_CTX+"/jewellery/filter/flat+50+percent+making+charge+off+on+gemstone.html",!1],["offers-flat50mcoffplatinum",GLOBAL_CTX+"/jewellery/filter/flat+50+percent+making+charge+off+on+platinum.html",!1],["offers-upto75mcoff",GLOBAL_CTX+"/jewellery/filter/upto+75+percent+off+on+making+charge.html",!1],["offers-upto75mcoffplatinum",GLOBAL_CTX+"/jewellery/filter/upto+75+percent+off+on+making+charge+on+platinum.html",!1],["offers-upto60mcoff",GLOBAL_CTX+"/jewellery/filter/upto+60+percent+off+on+making+charge.html",!1],["offers-upto50mcoff",GLOBAL_CTX+"/jewellery/filter/50+percent+off+on+making+charge.html",!1],["offers-upto50mcoffdiamond",GLOBAL_CTX+"/jewellery/filter/upto+50+percent+off+on+making+charge+on+diamond.html",!1],["offers-upto20offgoldjewels",GLOBAL_CTX+"/jewellery/filter/upto+20+percent+off+on+plain+gold.html",!1],["offers-upto20offplatinum",GLOBAL_CTX+"/jewellery/filter/upto+20+percent+off+on+platinum.html",!1],["offers-upto50mcoffgemstone",GLOBAL_CTX+"/jewellery/filter/upto+50+percent+making+charge+off+on+gemstone.html",!1],["offers-upto30mcoff",GLOBAL_CTX+"/jewellery/filter/upto+30+percent+off+on+making+charges.html",!1],["offers-upto20mcoff",GLOBAL_CTX+"/jewellery/filter/upto+20+percent+off+on+making+charge.html",!1],["offers-29uptomcoff",GLOBAL_CTX+"/jewellery/filter/upto+29+percent+off+on+making+charge.html",!1],["offers-100mc-20off",GLOBAL_CTX+"/jewellery/filter/100+percent+making+charge+off-upto+20+percent+off.html",!1],["offers-25off",GLOBAL_CTX+"/jewellery/filter/25+percentage+off.html",!1],["offers-20off",GLOBAL_CTX+"/jewellery/filter/20+percentage+off.html",!1],["offers-upto25offmc",GLOBAL_CTX+"/jewellery/filter/upto+25+percent+off+on+making+charge.html",!1],["offers-upto20mcoffgemmak",GLOBAL_CTX+"/jewellery/upto+20+percent+off+on+making+charge+on+gemstone.html",!1],["offers-10offplaingold",GLOBAL_CTX+"/jewellery/10+percent+off+on+making+charge+on+plain+gold.html",!1],["offers-10mcoffplaingold",GLOBAL_CTX+"/jewellery/filter/upto+10+percent+off+on+making+charge+on+plain+gold.html",!1],["offers-20mcoffplaingold",GLOBAL_CTX+"/jewellery/filter/upto+20+percent+off+on+making+charge+on+plain+gold.html",!1],["offers-flat15off",GLOBAL_CTX+"/jewellery/filter/flat+15+percent+off.html",!1],["offers-flat20off",GLOBAL_CTX+"/jewellery/filter/flat+20+percent+off.html",!1],["offers-flat10off",GLOBAL_CTX+"/jewellery/filter/flat+10+percent+off.html",!1],["offers-flat5off",GLOBAL_CTX+"/jewellery/filter/flat+5+percent+off.html",!1],["offers-flat20offdiamond",GLOBAL_CTX+"/jewellery/filter/20+percent+off+on+diamond.html",!1],["offers-flat20offplatinum",GLOBAL_CTX+"/jewellery/filter/20+percent+off+on+platinum.html",!1],["offers-10peroff",GLOBAL_CTX+"/jewellery/filter/10+percent+off+on+diamond+prices.html",!1],["offers-15peroff",GLOBAL_CTX+"/jewellery/filter/15+percent+off+on+diamond+prices.html",!1],["offers-20peroff",GLOBAL_CTX+"/jewellery/filter/20+percent+off+on+diamond+prices.html",!1],["offers-29peroff",GLOBAL_CTX+"/jewellery/filter/29+percent+off+on+diamond+prices.html",!1],["offers-25peroff",GLOBAL_CTX+"/jewellery/filter/25+percent+off+on+diamond+
54prices.html",!1],["offers-21peroff",GLOBAL_CTX+"/jewellery/filter/21+percent+off+on+diamond+prices.html",!1],["offers-20min",GLOBAL_CTX+"/jewellery/filter/100+percent+making+charge+off-rs+20000+to+1100000.html",!1],["offers-upto-25peroff",GLOBAL_CTX+"/jewellery/filter/upto+25+percent+off+on+diamond+prices.html",!1],["offers-goldcoin1000off",GLOBAL_CTX+"/jewellery/goldcoins.html",!1],["offers-30peroff",GLOBAL_CTX+"/jewellery/filter/30+percent+off+on+diamond+prices.html",!1],["offers-upto-30peroff",GLOBAL_CTX+"/jewellery/filter/upto+30+percent+off+on+diamond+prices.html",!1],["offers-upto25mcoffgem",GLOBAL_CTX+"/jewellery/filter/upto+25+percent+off+on+making+charge+on+gemstone.html",!1],["offers-upto25mcoffdia",GLOBAL_CTX+"/jewellery/filter/upto+25+percent+off+on+making+charge+on+diamond.html",!1],["offers-upto20mcoffdia",GLOBAL_CTX+"/jewellery/filter/upto+20+percent+off+on+making+charge+on+diamond.html",!1],["offers-upto50mcoffpla",GLOBAL_CTX+"/jewellery/filter/upto+50+percent+off+on+making+charge+on+platinum.html",!1],["offers-upto25mcoffpla",GLOBAL_CTX+"/jewellery/filter/upto+25+percent+off+on+making+charge+on+platinum.html",!1],["offers-upto20mcoffsol",GLOBAL_CTX+"/jewellery/upto+20+percent+off+on+making+charge+on+solitaire.html",!1],["tah",GLOBAL_CTX+"/try-at-home.html",!1],["collections",GLOBAL_CTX+"/collections.html",!1],["offer-landing",GLOBAL_CTX+"/offer-landing.html",!1]];function process(e,l,t){var r,n=!1;"f"==l?r=footer_links:"h"==l?r=header_links:"t"==l?r=testimonials_block_links:"bsp"==l?r=bs_promise_links:"bsc"==l?r=bs_certification_links:"g"==l?r=gifts_links:"hpw"==l?r=home_page_w:"m"==l&&(r=menu_links);for(var i="",a=0;a<r.length;a++)if(r[a][0]==e){if(r[a][3]){var s=r[a][3];trackGA(s[1],s[2],s[3])}(null!=t&&0!=t||1==r[a][2])&&(n=!0),i=r[a][1],"true"===hasTahAppointment&&i.indexOf("try-at-home")>-1&&(i=GLOBAL_CTX+"/hto/view"),n?(window.open(i),n=!1):location.href=i;break}}var target,specialKeys={8:"backspace",9:"tab",13:"return",16:"shift",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",188:",",190:".",191:"/",224:"meta"};function isKeyUp(){target=!1}function isKeyDown(e){for(spk in specialKeys){if(e.keyCode!=spk)if(e.ctrlKey||e.metaKey){target=!0;break}}}$(document).bind("keydown",isKeyDown),$(document).bind("keyup",isKeyUp),$(document).ready(function(){$("body").on("click",".prcs-d",function(){var e,l,t;(e=$(this).data("p").split(","))[0]&&(l=e[0]),e[1]&&(t=e[1]),process(l,t,target)}
54),$("body").on("click",".prcs-dl",function(){var e=$(this).data("p");get_data=e.split(","),get_data[1]&&(get_ga=get_data[1].split("-"),trackGA(get_ga[0],get_ga[1],get_ga[2])),get_data[0]&&(target?(window.opener=this,window.open(get_data[0])):location.href=get_data[0])}),$("body").on("click",".prcs-dlh",function(){var e=$(this).data("p");handleStoreQueryParamsForFilter(e)})});
55/**
56 * @preserve jQuery Autocomplete plugin v1.2.6
57 * @homepage http://xdsoft.net/jqplugins/autocomplete/
58 * @license MIT - MIT-LICENSE.txt
59 * (c) 2014, Chupurnov Valeriy <[email protected]>
60 * line 122 was Customized as it was causing build error.
61 */
62!function(t){"use strict";var e,o={},i=!1,a={},n={"ẚ":"a","Á":"a","á":"a","À":"a","à":"a","Ă":"a","ă":"a","Ắ":"a","ắ":"a","Ằ":"a","ằ":"a","Ẵ":"a","ẵ":"a","Ẳ":"a","Ẫ":"a","ẫ":"a","Ẩ":"a","ẩ":"a","Ǎ":"a","ǎ":"a","Å":"a","å":"a","Ǻ":"a","ǻ":"a","Ä":"a","ä":"a","Ǟ":"a","ǟ":"a","Ã":"a","ã":"a","Ȧ":"a","ȧ":"a","Ǡ":"a","ǡ":"a","Ą":"a","ą":"a","Ā":"a","ā":"a","Ả":"a","ả":"a","Ȁ":"a","ȁ":"a","Ȃ":"a","ȃ":"a","Ạ":"a","ạ":"a","Ặ":"a","ặ":"a","Ậ":"a","ậ":"a","Ḁ":"a","ḁ":"a","Ⱥ":"a","ⱥ":"a","Ǽ":"a","ǽ":"a","Ǣ":"a","ǣ":"a","Ḃ":"b","ḃ":"b","Ḅ":"b","ḅ":"b","Ḇ":"b","ḇ":"b","Ƀ":"b","ƀ":"b","ᵬ":"b","Ɓ":"b","ɓ":"b","Ƃ":"b","ƃ":"b","Ć":"c","ć":"
62c","Ĉ":"c","ĉ":"c","Č":"c","č":"c","Ċ":"c","ċ":"c","Ç":"c","ç":"c","Ḉ":"c","ḉ":"c","Ȼ":"c","ȼ":"c","Ƈ":"c","ƈ":"c","ɕ":"c","Ď":"d","ď":"d","Ḋ":"d","ḋ":"d","Ḑ":"d","ḑ":"d","Ḍ":"d","ḍ":"d","Ḓ":"d","ḓ":"d","Ḏ":"d","ḏ":"d","Đ":"d","đ":"d","ᵭ":"d","Ɖ":"d","ɖ":"d","Ɗ":"d","ɗ":"d","Ƌ":"d","ƌ":"d","ȡ":"d","ð":"d","É":"e","Ə":"e","Ǝ":"e","ǝ":"e","é":"e","È":"e","è":"e","Ĕ":"e","ĕ":"e","Ê":"e","ê":"e","Ế":"e","ế":"e","Ề":"e","ề":"e","Ễ":"e","ễ":"e","Ể":"e","ể":"e","Ě":"e","ě":"e","Ë":"e","ë":"e","Ẽ":"e","ẽ":"e","Ė":"e","ė":"e","Ȩ":"e","ȩ":"e","Ḝ":"e","ḝ":"e","Ę":"e","ę":"e","Ē":"e","ē":"e","Ḗ":"e","ḗ":"e","Ḕ":"e","ḕ":"e","Ẻ":"e","ẻ":"e","Ȅ":"e","ȅ":"e","Ȇ":"e","ȇ":"e","Ẹ":"e","ẹ":"e","Ệ":"e","ệ":"e","Ḙ":"e","ḙ":"e","Ḛ":"e","ḛ":"e","Ɇ":"e","ɇ":"e","ɚ":"e","ɝ":"e","Ḟ":"f","ḟ":"f","ᵮ":"f","Ƒ":"f","ƒ":"f","Ǵ":"g","ǵ":"g","Ğ":"g","ğ":"g","Ĝ":"g","ĝ":"g","Ǧ":"g","ǧ":"g","Ġ":"g","ġ":"g","Ģ":"g","ģ":"g","Ḡ":"g","ḡ":"g","Ǥ":"g","ǥ":"g","Ɠ":"g","ɠ":"g","Ĥ":"h","ĥ":"h","Ȟ":"h","ȟ":"h","Ḧ":"h","ḧ":"h","Ḣ":"h","ḣ":"h","Ḩ":"h","ḩ":"h","Ḥ":"h","ḥ":"h","Ḫ":"h","ḫ":"h",H:"h","̱":"h","ẖ":"h","Ħ":"h","ħ":"h","Ⱨ":"h","ⱨ":"h","Í":"i","í":"i","Ì":"i","ì":"i","Ĭ":"i","ĭ":"i","Î":"i","î":"i","Ǐ":"i","ǐ":"i","Ï":"i","ï":"i","Ḯ":"i","ḯ":"i","Ĩ":"i","ĩ":"i","İ":"i",i:"i","Į":"i","į":"i","Ī":"i","ī":"i","Ỉ":"i","ỉ":"i","Ȉ":"i","ȉ":"i","Ȋ":"i","ȋ":"i","Ị":"i","ị":"i","Ḭ":"i","ḭ":"i",I:"i","ı":"i","Ɨ":"i","ɨ":"i","Ĵ":"j","ĵ":"j",J:"j","̌":"j","ǰ":"j","ȷ":"j","Ɉ":"j","ɉ":"j","ʝ":"j","ɟ":"j","ʄ":"j","Ḱ":"k","ḱ":"k","Ǩ":"k","ǩ":"k","Ķ":"k","ķ":"k","Ḳ":"k","ḳ":"k","Ḵ":"k","ḵ":"k","Ƙ":"k","ƙ":"k","Ⱪ":"k","ⱪ":"k","Ĺ":"a","ĺ":"l","Ľ":"l","ľ":"l","Ļ":"l","ļ":"l","Ḷ":"l","ḷ":"l","Ḹ":"l","ḹ":"l","Ḽ":"l","ḽ":"l","Ḻ":"l","ḻ":"l","Ł":"l","ł":"l","̣":"l","Ŀ":"l","ŀ":"l","Ƚ":"l","ƚ":"l","Ⱡ":"l","ⱡ":"l","Ɫ":"l","ɫ":"l","ɬ":"l","ɭ":"l","ȴ":"l","Ḿ":"m","ḿ":"m","Ṁ":"m","ṁ":"m","Ṃ":"m","ṃ":"m","ɱ":"m","Ń":"n","ń":"n","Ǹ":"n","ǹ":"n","Ň":"n","ň":"n","Ñ":"n","ñ":"n","Ṅ":"n","ṅ":"n","Ņ":"n","ņ":"n","Ṇ":"n","ṇ":"n","Ṋ":"n","ṋ":"n","Ṉ":"n","ṉ":"n","Ɲ":"n","ɲ":"n","Ƞ":"n","ƞ":"n","ɳ":"n","ȵ":"n",N:"n","̈":"n",n:"n","Ó":"o","ó":"o","Ò":"o","ò":"o","Ŏ":"o","ŏ":"o","Ô":"o","ô":"o","Ố":"o","ố":"o","Ồ":"o","ồ":"o","Ỗ":"o","ỗ":"o","Ổ":"o","ổ":"o","Ǒ":"o","ǒ":"o","Ö":"o","ö":"o","Ȫ":"o","ȫ":"o","Ő":"o","ő":"o","Õ":"o","õ":"o","Ṍ":"o","ṍ":"o","Ṏ":"o","ṏ":"o","Ȭ":"o","ȭ":"o","Ȯ":"o","ȯ":"o","Ȱ":"o","ȱ":"o","Ø":"o","ø":"o","Ǿ":"o","ǿ":"o","Ǫ":"o","ǫ":"o","Ǭ":"o","ǭ":"o","Ō":"o","ō":"o","Ṓ":"o","ṓ":"o","Ṑ":"o","ṑ":"o","Ỏ":"o","ỏ":"o","Ȍ":"o","ȍ":"o","Ȏ":"o","ȏ":"o","Ơ":"o","ơ":"o","Ớ":"o","ớ":"o","Ờ":"o","ờ":"o","Ỡ":"o","ỡ":"o","Ở":"o","ở":"o","Ợ":"o","ợ":"o","Ọ":"o","ọ":"o","Ộ":"o","ộ":"o","Ɵ":"o","ɵ":"o","Ṕ":"p","ṕ":"p","Ṗ":"p","ṗ":"p","Ᵽ":"p","Ƥ":"p","ƥ":"p",P:"p","̃":"p",p:"p","ʠ":"q","Ɋ":"q","ɋ":"q","Ŕ":"r","ŕ":"r","Ř":"r","ř":"r","Ṙ":"r","ṙ":"r","Ŗ":"r","ŗ":"r","Ȑ":"r","ȑ":"r","Ȓ":"r","ȓ":"r","Ṛ":"r","ṛ":"r","Ṝ":"r","ṝ":"r","Ṟ":"r","ṟ":"r","Ɍ":"r","ɍ":"r","ᵲ":"r","ɼ":"r","Ɽ":"r","ɽ":"r","ɾ":"r","ᵳ":"r","ß":"s","Ś":"s","ś":"s","Ṥ":"s","ṥ":"s","Ŝ":"s","ŝ":"s","Š":"s","š":"s","Ṧ":"s","ṧ":"s","Ṡ":"s","ṡ":"s","ẛ":"s","Ş":"s","ş":"s","Ṣ":"s","ṣ":"s","Ṩ":"s","ṩ":"s","Ș":"s","ș":"s","ʂ":"s",S:"s","̩":"s",s:"s","Þ":"t","þ":"t","Ť":"t","ť":"t",T:"t","ẗ":"t","Ṫ":"t","ṫ":"t","Ţ":"t","ţ":"t","Ṭ":"t","ṭ":"t","Ț":"t","ț":"t","Ṱ":"t","ṱ":"t","Ṯ":"t","ṯ":"t","Ŧ":"t","ŧ":"t","Ⱦ":"t","ⱦ":"t","ᵵ":"t","ƫ":"t","Ƭ":"t","ƭ":"t","Ʈ":"t","ʈ":"t","ȶ":"t","Ú":"u","ú":"u","Ù":"u","ù":"u","Ŭ":"u","ŭ":"u","Û":"u","û":"u","Ǔ":"u","ǔ":"u","Ů":"u","ů":"u","Ü":"u","ü":"u","Ǘ":"u","ǘ":"u","Ǜ":"u","ǜ":"u","Ǚ":"u","ǚ":"u","Ǖ":"u","ǖ":"u","Ű":"u","ű":"u","Ũ":"u","ũ":"u","Ṹ":"u","ṹ":"u","Ų":"u","ų":"u","Ū":"u","ū":"u","Ṻ":"u","ṻ":"u","Ủ":"u","ủ":"u","Ȕ":"u","ȕ":"u","Ȗ":"u","ȗ":"u","Ư":"u","ư":"u","Ứ":"u","ứ":"u","Ừ":"u","ừ":"u","Ữ":"u","ữ":"u","Ử":"u","ử":"u","Ự":"u","ự":"u","Ụ":"u","ụ":"u","Ṳ":"u","ṳ":"u","Ṷ":"u","ṷ":"u","Ṵ":"u","ṵ":"u","Ʉ":"u","ʉ":"u","Ṽ":"v","ṽ":"v","Ṿ":"v","ṿ":"v","Ʋ":"v","ʋ":"v","Ẃ":"w","ẃ":"w","Ẁ":"w","ẁ":"w","Ŵ":"w","ŵ":"w",W:"w","̊":"w","ẘ":"w","Ẅ":"w","ẅ":"w","Ẇ":"w","ẇ":"w","Ẉ":"w","ẉ":"w","Ẍ":"x","ẍ":"x","Ẋ":"x","ẋ":"x","Ý":"y","ý":"y","Ỳ":"y","ỳ":"y","Ŷ":"y","ŷ":"y",Y:"y","ẙ":"y","Ÿ":"y","ÿ":"y","Ỹ":"y","ỹ":"y","Ẏ":"y","ẏ":"y","Ȳ":"y","ȳ":"y","Ỷ":"y","ỷ":"y","Ỵ":"y","ỵ":"y","ʏ":"y","Ɏ":"y","ɏ":"y","Ƴ":"y","ƴ":"y","Ź":"z","ź":"z","Ẑ":"z","ẑ":"z","Ž":"z","ž":"z","Ż":"z","ż":"z","Ẓ":"z","ẓ":"z","Ẕ":"z","ẕ":"z","Ƶ":"z","ƶ":"z","Ȥ":"z","ȥ":"z","ʐ":"z","ʑ":"z","Ⱬ":"z","ⱬ":"z","Ǯ":"z","ǯ":"z","ƺ":"z","2":"2","6":"6","B":"B","F":"F","J":"J","N":"N","R":"R","V":"V","Z":"Z","b":"b","f":"f","j":"j","n":"n","r":"r","v":"v","z":"z","1":"1","5":"5","9":"9","A":"A","E":"E","I":"I","M":"M","Q":"Q","U":"U","Y":"Y","a":"a","e":"e","i":"i","m":"m","q":"q","u":"u","y":"y","0":"0","4":"4","8":"8","D":"D","H":"H","L":"L","P":"P","T":"T","X":"X","d":"d","h":"h","l":"l","p":"p","t":"t","x":"x","3":"3","7":"7","C":"C","G":"G","K":"K","O":"O","S":"S","W":"W","c":"c","g":"g","k":"k","o":"o","s":"s","w":"w","ẳ":"a","Â":"a","â":"a","Ấ":"a","ấ":"a","Ầ":"a","ầ":"a"};function accentReplace(t){if(!t)return"";var e,o="";for(e=0;e<t.length;e+=1)o+=n[t.charAt(e)]||t.charAt(e);return o}function escapeRegExp(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function isset(t){return void 0!==t}function safe_call(e,o,i,a){return isset(e)&&!t.isArray(e)?t.isFunction(e)?e.apply(this,o):a:isset(i)?safe_call.call(this,i,o):a}function __safe(t,e,i,a){var n;return safe_call.call(this,isset(this.source[e])&&Object.prototype.hasOwnProperty.call(this.source[e],t)?this.source[e][t]:n,i,function(){return safe_call.call(this,isset(this[t][e])?this[t][e]:isset(this[t][0])?this[t][0]:Object.prototype.hasOwnProperty.call(this,t)?this[t]:n,i,o[t][e]||o[t][0]||o[t],a)},a)}function __get(e,o){return isset(o)||(o=0),t.isArray(this.source)&&isset(this.source[o])&&isset(this.source[o][e])?this.source[o][e]:isset(this[e])?t.isArray(this[e])?isset(this[e][o])?this[e][o]:isset(this[e][0])?this[e][0]:null:this[e]:null}function loadRemote(e,o,i,a){t.ajax(t.extend(!0,{url:e,type:"GET",async:!0,cache:!1,dataType:"json"},o.ajax)).done(function(e){i&&i.apply(this,t.makeArray(arguments))}).fail(function(t,e){})}function findRight(t,e){var o,i=!1;for(o=0;o<t.length;o+=1)if(i=__safe.call(this,"findRight",o,[t[o],e,o]))return{right:i,source:o};return!1}function processData(t,e){var o;for(preparseData.call(this,t,e),o=0;o<t.length;o+=1)t[o]=__safe.call(this,"filter",o,[t[o],e,o],t[o])}function collectData(e,o,i){var a,n=this;if(t.isFunction(n.source))n.source.apply(n,[e,function(t){o=[t],safe_call.call(n,i,[e])},o,0]);else for(a=0;a<n.source.length;a+=1)if(t.isArray(n.source[a]))o[a]=n.source[a];else if(t.isFunction(n.source[a]))(function(a){n.source[a].apply(n,[e,function(s){if(o[a]||(o[a]=[]),s&&t.isArray(s))if("replace"===n.appendMethod)o[a]=s;else o[a]=o[a].concat(s);safe_call.call(n,i,[e])},o,a])})(a);else if("remote"===n.source[a].type){if(isset(n.source[a].url)&&(!isset(n.source[a].minLength)||e.length>=n.source[a].minLength)){var s=__safe.call(n,"replace",a,[n.source[a].url,e],"");o[a]||(o[a]=[]),function(t){loadRemote(s,n.source[t],function(a){o[t]=a,safe_call.call(n,i,[e])},n.debug)}(a)}}else isset(n.source[a].data)?o[a]=n.source[a].data:o[a]=n.source[a];safe_call.call(n,i,[e])}function preparseData(t,e){for(var o=0;o<t.length;o++)t[o]=__safe.call(this,"preparse",o,[t[o],e],t[o])}function renderData(e,o){var i,a,n,s=[];for(i=0;i<e.length;i+=1)for(a=0;a<e[i].length&&!(s.length>=this.limit);a+=1)(n=t(__safe.call(this,"render",i,[e[i][a],i,a,o],""))).data("source",i),n.data("pid",a),n.data("item",e[i][a]),s.push(n);return s}function getItem(t,e){return!!(isset(t.data("source"))&&isset(t.data("pid"))&&isset(e[t.data("source")])&&isset(e[t.data("source")][t.data("pid")]))&&e[t.data("source")][t.data("pid")]}function getValue(t,e){var o=getItem(t,e);return o?__safe.call(this,"getValue",t.data("source"),[o,t.data("source")]):isset(t.data("value"))?decodeURIComponent(t.data("value")):t.html()}function init(o,a){if(!t(o).hasClass("xdsoft_input")){var n=t('<div class="xdsoft_autocomplete"></div>'),s=t('<div class="xdsoft_autocomplete_dropdown"></div>'),r=t('<input readonly class="xdsoft_autocomplete_hint"/>'),c=t(o),l=[],u=!1,d="",f="",h=null,g=0;c.data("autocomplete_options",a),s.on("mousedown","a",function(e){location.href=GLOBAL_CTX+t(this).attr("href"),e.preventDefault(),e.stopPropagation()}).on("updatescroll.xdsoft",function(){var t=s.find(".active");if(t.length){var e=t.position().top,o=t.outerHeight(!0),i=s.scrollTop(),a=s.height();e<0?s.scrollTop(i-Math.abs(e)):e+o>a&&s.scrollTop(i+e+o-a)}}),n.css({display:c.css("display"),width:c.css("width")}),a.style&&n.css(a.style),c.addClass("xdsoft_input").attr("autocomplete","off"),s.on("mousemove","div",function(){if(t(this).hasClass("active"))return!0;s.find("div").removeClass("active"),t(this).addClass("active")}).on("mousedown touchstart","div",function(){s.find("div").removeClass("active"),t(this).addClass("active")}),c.data("xdsoft_autocomplete",l).after(n).on("pick.xdsoft",function(t,e){c.trigger("timepick.xdsoft",e),f=c.val(),c.trigger("close.xdsoft"),(h=s.find("div.active").eq(0)).length||(h=s.children().first()),c.trigger("selected.xdsoft",[getItem(h,l)])}).on("timepick.xdsoft",function(t,e){(h=s.find("div.active")).length||(h=s.children().first()),h.length&&(isset(e)?c.val(e):c.val(getValue.call(a,h,l)),c.trigger("autocompleted.xdsoft",[getItem(h,l)]),r.val(""),function setCaretPosition(t,e){if(t.setSelectionRange)t.focus(),t.setSelectionRange(e,e);else if(t.createTextRange){var o=t.createTextRange();o.collapse(!0),o.moveEnd("character",e),o.moveStart("character",e),o.select()}}(c[0],c.val().length))}).on("keydown.xdsoft input.xdsoft cut.xdsoft paste.xdsoft",function(t){var e=manageKey(t);if(!1===e||!0===e)return e;setTimeout(function(){manageData()},1),manageData()}).on("change.xdsoft",function(t){f=c.val()}),f=c.val(),collectData.call(a,c.val(),l,function(t){processData.call(a,l,t)}),a.openOnFocus&&c.on("focusin.xdsoft",function(){c.trigger("open.xdsoft"),c.trigger("updateContent.xdsoft")}),a.closeOnBlur&&c.on("focusout.xdsoft",function(){c.trigger("close.xdsoft")}),n.append(c).append(s);var p=!1,m=0;c.on("updateHelperPosition.xdsoft",function(){clearTimeout(m),m=setTimeout(function(){if(n.css({display:c.css("display"),width:c.css("width")}),s.css(t.extend(!0,{left:c.position().left,top:c.position().top+parseInt(c.css("marginTop"))+parseInt(c[0].offsetHeight),marginLeft:c.css("marginLeft"),marginRight:c.css("marginRight"),width:"100%"==a.dropdownWidth?c[0].offsetWidth:a.dropdownWidth},a.dropdownStyle)),a.showHint){var e=getComputedStyle(c[0],"");r[0].style.cssText=e.cssText,r.css({"box-sizing":e.boxSizing,borderStyle:"solid",borderCollapse:e.borderCollapse,borderLeftWidth:e.borderLeftWidth,borderRightWidth:e.borderRightWidth,borderTopWidth:e.borderTopWidth,borderBottomWidth:e.borderBottomWidth,paddingBottom:e.paddingBottom,marginBottom:e.marginBottom,paddingTop:e.paddingTop,marginTop:e.marginTop,paddingLeft:e.paddingLeft,marginLeft:e.marginLeft,paddingRight:e.paddingRight,marginRight:e.marginRight,maxHeight:e.maxHeight,minHeight:e.minHeight,maxWidth:e.maxWidth,minWidth:e.minWidth,width:e.width,letterSpacing:e.letterSpacing,lineHeight:e.lineHeight,outlineWidth:e.outlineWidth,fontFamily:e.fontFamily,fontVariant:e.fontVariant,fontStyle:c.css("fontStyle"),fontSize:c.css("fontSize"),fontWeight:c.css("fontWeight"),flex:e.flex,justifyContent:e.justifyContent,borderRadius:e.borderRadius,"-webkit-box-shadow":"none","box-shadow":"none"}
62),c.css("font-size",c.css("fontSize")),r.innerHeight(c.innerHeight()),r.css(t.extend(!0,{position:"absolute",zIndex:"1",borderColor:"transparent",outlineColor:"transparent",left:c.position().left,top:c.position().top,background:c.css("background")},a.hintStyle)),!1!==p?r.css("background",p):p=c.css("background");try{c[0].style.setProperty("background","transparent","important")}catch(t){c.css("background","transparent")}n.append(r)}},a.timeoutUpdate||1)}),c.is(":visible")?c.trigger("updateHelperPosition.xdsoft"):e=setInterval(function(){c.is(":visible")&&(c.trigger("updateHelperPosition.xdsoft"),clearInterval(e))},100),t(window).on("resize",function(){n.css({width:"auto"}),c.trigger("updateHelperPosition.xdsoft")}),c.on("close.xdsoft",function(){u&&(s.hide(),r.val(""),a.autoselect||c.val(f),u=!1)}).on("updateContent.xdsoft",function(){var e=renderData.call(a,l,c.val()),o=10;e.length?(c.trigger("open.xdsoft"),t(e).each(function(){this.css(t.extend(!0,{paddingLeft:c.css("paddingLeft"),paddingRight:c.css("paddingRight")},a.itemStyle))}),s.html(e),o=a.visibleHeight?a.visibleHeight:a.visibleLimit*((e[0]?e[0].outerHeight(!0):0)||a.defaultHeightItem)+5,s.css("maxHeight",o+"px")):c.trigger("close.xdsoft")}).on("open.xdsoft",function(){u||(s.show(),u=!0)}).on("destroy.xdsoft",function(){c.removeClass("xdsoft"),n.after(c),n.remove(),clearTimeout(0),c.data("xdsoft_autocomplete",null),c.off(".xdsoft")})}function manageData(){c.val()!=f&&((f=c.val()).length<a.minLength?c.trigger("close.xdsoft"):collectData.call(a,f,l,function(t){var e;if(t==f)if(processData.call(a,l,t),c.trigger("updateContent.xdsoft"),a.showHint&&f.length&&f.length<=c.prop("size")&&(e=findRight.call(a,l,f))){var o=__safe.call(a,"getTitle",e.source,[e.right,e.source]);o=t+o.substr(t.length),r.val(o)}else r.val("")}))}function manageKey(t){var e,o=t.keyCode;switch(o){case 65:case 67:case 86:case 90:case 89:if(t.shiftKey||t.ctrlKey)return!0;break;case 16:case 17:case 9:return!0;case 39:case 37:return!!(i||t.shiftKey||t.ctrlKey)||(d=c.val(),g=function getCaretPosition(t){if(t){if(t.selectionStart)return t.selectionStart;if(document.selection){t.focus();var e=document.selection.createRange(),o=document.selection.createRange().text.length;return e.moveStart("character",-t.value.length),e.text.length-o}}}(c[0]),39!==o||g!==d.length||((e=findRight.call(a,l,d))?c.trigger("pick.xdsoft",[__safe.call(a,"getValue",e.source,[e.right,e.source])]):c.trigger("pick.xdsoft"),t.preventDefault(),!1));case 27:return c.val(f).trigger("close.xdsoft"),t.preventDefault(),!1;case 40:case 38:if(!u)return c.trigger("open.xdsoft"),c.trigger("updateContent.xdsoft"),t.preventDefault(),!1;var n=40==o?"next":"prev",r=!0;return(h=s.find("div.active")).length?(h.removeClass("active"),h[n]().length?h[n]().addClass("active"):(c.val(f),r=!1)):s.children().eq(40==o?0:-1).addClass("active"),r&&c.trigger("timepick.xdsoft"),s.trigger("updatescroll.xdsoft"),t.preventDefault(),!1}}}void 0===window.getComputedStyle&&(window.getComputedStyle=function(){function getPixelSize(t,e,o,i){var a,n=e[o],s=parseFloat(n),r=n.split(/\d/)[0];return i=null!==i?i:/%|em/.test(r)&&t.parentElement?getPixelSize(t.parentElement,t.parentElement.currentStyle,"fontSize",null):16,a="fontSize"===o?i:/width/i.test(o)?t.clientWidth:t.clientHeight,"em"===r?s*i:"in"===r?96*s:"pt"===r?96*s/72:"%"===r?s/100*a:s}function setShortStyleProperty(t,e){var o="border"===e?"Width":"",i=e+"Top"+o,a=e+"Right"+o,n=e+"Bottom"+o,s=e+"Left"+o;t[e]=(t[i]===t[a]===t[n]===t[s]?[t[i]]:t[i]===t[n]&&t[s]===t[a]?[t[i],t[a]]:t[s]===t[a]?[t[i],t[a],t[n]]:[t[i],t[a],t[n],t[s]]).join(" ")}function CSSStyleDeclaration(t){var e,o=t.currentStyle,i=this,a=getPixelSize(t,o,"fontSize",null);for(e in o)Object.prototype.hasOwnProperty.call(o,e)&&(/width|height|margin.|padding.|border.+W/.test(e)&&"auto"!==i[e]?i[e]=getPixelSize(t,o,e,a)+"px":i[e]=o[e]);return setShortStyleProperty(i,"margin"),setShortStyleProperty(i,"padding"),setShortStyleProperty(i,"border"),i.fontSize=a+"px",i}return CSSStyleDeclaration.prototype={constructor:CSSStyleDeclaration,getPropertyPriority:function(){},getPropertyValue:function(t){return this[t]||""},item:function(){},removeProperty:function(){},setProperty:function(){},getPropertyCSSValue:function(){}},function getComputedStyle(t){return new CSSStyleDeclaration(t)}}()),t(document).on("keydown.xdsoftctrl",function(t){17===t.keyCode&&(i=!0),16===t.keyCode&&(i=!0)}).on("keyup.xdsoftctrl",function(t){17===t.keyCode&&(i=!1),16===t.keyCode&&(i=!1)}),o={minLength:0,valueKey:"value",titleKey:"title",highlight:!0,showHint:!0,dropdownWidth:"100%",dropdownStyle:{},itemStyle:{},hintStyle:!1,style:!1,debug:!0,openOnFocus:!1,closeOnBlur:!0,autoselect:!1,accents:!0,replaceAcce
62ntsForRemote:!0,limit:20,visibleLimit:20,visibleHeight:0,defaultHeightItem:30,timeoutUpdate:10,get:function(t,e){return __get.call(this,t,e)},replace:[function(t,e){return this.replaceAccentsForRemote&&(e=accentReplace(e)),t.replace("%QUERY%",encodeURIComponent(e))}],equal:function(t,e){return e.toLowerCase()==t.substr(0,e.length).toLowerCase()},findRight:[function(t,e,o){var i,a="";if(t)for(i=0;i<t.length;i+=1)if(a=__safe.call(this,"getValue",o,[t[i],o]),__safe.call(this,"equal",o,[a,e,o],!1))return t[i];return!1}],valid:[function(t,e){return this.accents&&(t=accentReplace(t),e=accentReplace(e)),-1!=t.toLowerCase().indexOf(e.toLowerCase())}],filter:[function(t,e,o){var i,a=[];if(t)for(i=0;i<t.length;i+=1)isset(t[i][this.get("valueKey",o)])?t[i][this.get("valueKey",o)]:t[i].toString(),a.push(t[i]);return a}],preparse:function(t){return t},getValue:[function(t,e){return isset(t[this.get("valueKey",e)])?t[this.get("valueKey",e)]:t.toString()}],getTitle:[function(t,e){return isset(t[this.get("titleKey",e)])?t[this.get("titleKey",e)]:t.toString()}],render:[function(t,e,i,a){var n,s,r,c=__safe.call(this,"getValue",e,[t,e],o.getValue[0].call(this,t,e)),l=__safe.call(this,"getTitle",e,[t,e],o.getTitle[0].call(this,t,e)),u="",d="",f="",h="",g=0;if(this.highlight)if(this.accents){for(d=accentReplace(l).toLowerCase().replace(/[<>]+/g,""),u=accentReplace(a).toLowerCase().replace(/[<>]+/g,""),f=d.replace(new RegExp(escapeRegExp(u),"g"),"<"+u+">"),r=0;r<f.length;r+=1)n=l.charAt(g),"<"===(s=f.charAt(r))?h+="<b>":">"===s?h+="</b>":(g+=1,h+=n);l=h}else l=l.replace(new RegExp("("+escapeRegExp(a)+")","i"),"<b>$1</b>");return'<div><a href="/search?search_category=suggestion-click&search_query='+c+'&search_type=auto-suggestion&_eventId=searched_for_product" '+(c==a?'class="active"':"")+' data-value="'+encodeURIComponent(c)+'">'+l+"</a></div>"}],appendMethod:"concat",source:[]},a={destroy:function(){return this.trigger("destroy.xdsoft")},update:function(){return this.trigger("updateHelperPosition.xdsoft")},options:function(e){return this.data("autocomplete_options")&&t.isPlainObject(e)&&this.data("autocomplete_options",t.extend(!0,this.data("autocomplete_options"),e)),this},setSource:function(e,o){if(this.data("autocomplete_options")&&(t.isPlainObject(e)||t.isFunction(e)||t.isArray(e))){var i=this.data("autocomplete_options"),a=this.data("xdsoft_autocomplete"),n=i.source;void 0===o||isNaN(o)?t.isFunction(e)?this.data("autocomplete_options").source=e:t.extend(!0,n,e):t.isPlainObject(e)||t.isArray(e)?n[o]=t.extend(!0,t.isArray(e)?[]:{},e):n[o]=e,collectData.call(i,this.val(),a,function(t){processData.call(i,a,t)})}return this},getSource:function(t){if(this.data("autocomplete_options")){var e=this.data("autocomplete_options").source;return void 0!==t&&!isNaN(t)&&e[t]?e[t]:e}return null}},t.fn.jautocomplete=function(e,i,n){return"string"===t.type(e)&&a[e]?a[e].call(this,i,n):this.each(function(){init(this,t.extend(!0,{},o,e))})}}(jQuery);
63var isIOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,weCheckoutEvent="we_checkout_event";function getDeferAddressCommonAttr(){let e={},t=0;t="undefined"!=typeof deviceName&&"MOBILE"===deviceName?$(".total-payable").text():$(".total-price-payable").text(),e.Price="function"==typeof parsePrice?parsePrice(t):t;const n=$("#isAddressDeferredEnabled").val();return e["Address Page Variation"]="true"===String(n)?"v2":"v1",e}function triggerProceedToPaymentClicked(e){if(e&&!e.isTrusted)return;const t="Proceed to payment clicked";let n=getDeferAddressCommonAttr();const o=$("#isAddressDeferred").val();n["Is Address Filled"]=o&&"true"!==String(o),processClientEvent(t,n),"undefined"!=typeof deviceName&&"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,t)}function triggerAddAddressCTAFormClick(e){const t="Add Address Button Clicked";let n={};n["Page Name"]=e||"","function"==typeof processClientEvent&&processClientEvent(t,n),"undefined"!=typeof deviceName&&"MOBILE"===deviceName&&"function"==typeof appWEEvents&&appWEEvents(weCheckoutEvent,n,t)}function triggerGoKwikBtnClickEvent(e){let t={};t["Page Section"]=e||"";let n="GoKwik Address Button Clicked";processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)}function goKwikAddressFilledEvent(){let e={},t="GoKwik Address Filled";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}function triggerBannerViewedEvent(e){let t="Banner Viewed";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}function triggerResultClickEvent(e){let t={};t.store_count=e||0;let n="Nearby Store Result Clicked";processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)}function triggerRetryEvent(){$(".retry-payment").click(function(){const e=parsePrice(sessionStorage.getItem("rtyCnt"))+1;sessionStorage.setItem("rtyCnt",e);let t=newPaymentCommonAttr()||{};t["Retry Count"]=parsePrice(e);let n="Payment Retry Clicked";processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)})}function getPaySSAtr(){const e=sessionStorage.getItem("payMtd"),t=sessionStorage.getItem("ordrAmt"),n=sessionStorage.getItem("svdPay"),o=sessionStorage.getItem("wltApld"),a=$(".error-code").val(),i=$(".error-desc").val(),r=$(".scs-txn-id").val();let c={};return e&&null!==e&&""!==e&&(c["Payment Method"]=e?e+"":""),t&&null!==t&&""!==t&&(c["Order Amount"]=t?parsePrice(t):""),n&&null!==n&&""!==n&&(c["Is Saved Payment Method"]=n?n+"":""),a&&null!==a&&""!==a&&(c["Error Code"]=a?a+"":""),i&&null!==i&&""!==i&&(c["Error Message"]=i?i+"":""),r&&null!==r&&""!==r&&(c["Transaction ID"]=r?r+"":""),o&&null!==o&&""!==o&&(c["Wallet Used"]=o),payFlow&&null!==payFlow&&""!==payFlow&&(c["Payment Flow"]=payFlow),c}function triggerWalletEvent(e,t,n){let o=newPaymentCommonAttr()||{};const a=parsePrice(t.data("walletbalance"))||0,i=parsePrice(t.data("appliedbalance"))||0;o["Wallet Type"]="BlueStone",o["Wallet Name"]=e?e+"":"",o["Wallet Balance"]=a||i?a+i:0,o["Remaining Amou
63nt"]=a||0;let r="Wallet Option "+n;processClientEvent(r,o),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,o,r),sessionStorage.setItem(n+"-"+e,"")}function triggerAllWalletEvent(e){let t=[],n=[],o=[];$(".bsWallet .wallet").each(function(e,a){const i=$(a).attr("id")||"",r=$(a).data("appliedbalance"),c=$(a).data("walletbalance"),s=parsePrice(r)+parsePrice(c);t.push(i),o.push(c),n.push(s)});let a=newPaymentCommonAttr()||{};a["Wallet Type"]="BlueStone",a["Wallet Name"]=t.toString()||"",a["Wallet Balance"]=n.toString()||"",a["Remaining Amount"]=o.toString()||"";let i=e+" All Wallet Clicked";processClientEvent(i,a),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,a,i)}function paymentCommonAttr(){let e={};return payFlow&&null!==payFlow&&""!==payFlow&&(e["Payment Flow"]=payFlow),e}function newPaymentCommonAttr(){const e=getCookie("pincode");let t=getPaySSAtr()||{};t["Is Autopay Enabled"]="true"===$("#AutopayEnabled").val(),t["Autopay Variant"]=$("#autopayUiVariant").val()||"V1";let n=[];return $(".cart-items-list").each(function(e,t){n.push($(t).data("itemedd"))}),n&&n.length>0&&(t.EDD=n),e&&null!==e&&""!==e&&(t.Pincode=e+""||""),t}function setPaymentAttributes(){const e=$(".payment-method-selected").val()||"",t=$(".order-total").val()||0,n=$("#saved-payments-section .method-selected").length>0,o=getPaymentMethodForEvents(e);sessionStorage.setItem("payMtd",o),sessionStorage.setItem("ordrAmt",t),sessionStorage.setItem("svdPay",n)}function triggerPaymentInitiatedEvent(e){let t=newPaymentCommonAttr()||{},n="Payment Initiated";const o=$(".payment-method-selected").val()||"",a=isAutopayMethod(o)&&"true"===$("#upiAutopayStatus").val();t["Auto-clicked"]=e,t["Autopay Applied"]=a,processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n),commonFacebookEventsUtil("AddPaymentInfo",getFacebookAddPaymentInfoAttr(),"AddPaymentInfo"),sessionStorage.setItem("dropOffTime",Date.now())}function triggerPaymentAutoClickCancelledEvent(){let e=newPaymentCommonAttr()||{};const t=getPaymentMethodForEvents($(".payment-method-selected").val()||"");let n="Payment Auto-Click Cancelled";e["Payment Method"]=t||"",processClientEvent(n,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,n)}function manualPaymentSelected(e,t){let n=newPaymentCommonAttr()||{},o="",a="card"===t?"Card":"UPI";"disable"===e?o="Manual "+a+" Payment Clicked":"confirm"===e?o="Manual "+a+" Payment Selected":"enable"===e&&(o="Enable Autopay Clicked"),o&&processClientEvent(o,n)}function triggerUPIAppSelectedEvent(e,t){if(!$(e.currentTarget).hasClass("selected")){"qr-code"===t&&triggerQrSelectEvent();let e=newPaymentCommonAttr()||{};e["UPI App Name"]=t+""||"";let n="true"===$("#upiAutopayStatus").val();e["Autopay Applied"]=!!n;let o="UPI App Selected";processClientEvent(o,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,o)}if("upi-id-input"===$(e.currentTarget).attr("id")||"new-upi"===$(e.currentTarget).attr("id")){let e=newPaymentCommonAttr()||{},t="Enter UPI ID Selected";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}}function triggerQrEvent(){let e=newPaymentCommonAttr()||{};e["QR Code Generated"]=!0;let t="Generate QR Clicked";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}function triggerQrSelectEvent(){let e=newPaymentCommonAttr()||{},t="QR Code Payment Mode Selected";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}function triggerBankSelectEvent(e,t){let n=newPaymentCommonAttr()||{};n["Bank Type"]=e+""||"",n["Bank Name"]=t+""||"";let o="Netbanking Bank Selected";processClientEvent(o,n),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,o)}function triggerUPIVerifiedEvent(e){let t=newPaymentCommonAttr()||{};t.Status=e||!1;let n="Collect UPI ID Verified";processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)}function triggerCancelClickedEvent(e){const t=sessionStorage.getItem("payMtd"),n=sessionStorage.getItem("svdPay");let o=newPaymentCommonAttr()||{};o["Payment Method"]=t?t+"":"",o["Is Saved Payment Method"]=n?n+"":"";let a=e?"Cancel Payment Pop up Clicked":"Cancel Payment Clicked";e&&(o["CTA Name"]=e),processClientEvent(a,o),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,o,a)}function removeWishlistEvent(e){processClientEvent("Removed From Wishlist",getCommonWishlistAttr(".pid-"+e))}function hoverEventWithCancelTimer(e,t,n){const o=document.querySelectorAll(t),a=debounce(e,n);o.forEach(function(e){e.addEventListener("mouseenter",function(){a.call(e)}),e.addEventListener("mouseleave",function(){a.cancel()})})}function weAddToCart(e,t){let n={};"product"===PAGE_TYPE?n=getPDPCommonAttributes(t.size):"wishlist"===PAGE_TYPE&&(n=getCommonWishlistAttr($(e).parents(".wishlist-item"))),processClientEvent("Added To Cart",n),cartUpdateTrigger(!0,["we"])}function moveToWishlistEvent(e){processClientEvent("Added To Wishlist",getCommonItemAttr(e))}function getCommonItemAttr(e){let t=parsePrice($(e).parents(".bag-item").find(".old-price").text()),n=parsePrice($(e).parents(".bag-item").find(".new-price").text()),o=$(e).parents(".bag-item").data("metal"),a=$(e).parents(".bag-item").find("#ringselect").val(),i={};return i["Previous Cart Value"]=parsePrice($(".grand-total .new-price").text())||parsePrice($("#valueToSum").text())||0,i["Page Name"]=getWEPageCategory(),i["Product Id"]=$(e).parents(".bag-item").data("productid")+""||"",i["Category Name"]=$(e).parents(".bag-item").data("category")+""||"",i["Product Name"]=$(e).parents(".bag-item").data("productname")||"",i.Discount=t&&n?t-n:0,i.Price=n||0,i.Quantity=parsePrice($(e).parents(".bag-item").find("#cart_item_quantity .qty").val())||0,i.Size=a?a+"":"",i.Color=o?o.split("KT ")[1]||o.split("Kt ")[1]:"",i.Image=$(e).parents(".bag-item").find(".product-image img").attr("src")||"",i}function giftMessageEvent(e,t,n,o){let a={};a["Recipient's Name"]=t||"",a["Sender's Name"]=n||"",a["Gift Message"]=e||"",a["Less characters error"]=o||"";let i="Gift Message Added";processClientEvent(i,a),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,a,i)}function getWEPageCategory(){if(window.execution_step)switch(window.execution_step){case"viewCart":return"Cart";
63case"checkoutFlowAddressDetails":return"Delivery Details";case"checkoutPaymentDetails":return"Payments"}if(window.PAGE_TYPE)switch(window.PAGE_TYPE){case"home":return"Homepage";case"browse":return"PLP";case"product":return"PDP";case"goldmine":return"GMS";case"wishlist":return"Wishlist";case"store":return"Locate Store"}return""}function getCommonCartAttr(){let e={"Product Id":"","Product Name":"","Category Name":"",Quantity:0,"Cart Value":"",Size:"",Color:"",Image:"","Variant Id":""};return e["Page Name"]=getWEPageCategory(),$(".bag-item").each(function(t,n){""!==e["Product Id"]&&(e["Product Id"]+=","),""!==e["Product Name"]&&(e["Product Name"]+=","),""!==e["Category Name"]&&(e["Category Name"]+=","),""!==e.Size&&(e.Size+=","),""!==e.Color&&(e.Color+=","),""!==e.Image&&(e.Image+=","),""!==e["Variant Id"]&&(e["Variant Id"]+=","),e["Product Id"]+=$(n).data("productid")+""||"",e["Product Name"]+=$(n).data("productname")||"",e["Category Name"]+=$(n).data("category")||"";let o=0;$(".qty").each(function(){o+=Number($(this).val())||0}),e.Quantity=o||0,e["Cart Value"]=parsePrice($(".total-payable").text())||0,e.Discount=parsePrice($(".discounted-amount .price-width").text())||0,e.Price=parsePrice($(".total-payable").text())||0,e.Size+=$(n).find("#ringselect").data("displaysize")+""||"",e["Variant Id"]+=$(n).data("customizationid")+""||"";let a="",i=$(n).data("metal");i&&(a=i.split("Kt ")[1]||i.split("KT ")[1]),e.Color+=a||"",e.Image+=$(n).find(".product-image img").attr("src")}),e}function placedOrderOnCart(){let e=getCommonCartAttr(),t="Checkout Started";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t),commonFacebookEventsUtil("InitiateCheckout",getFacebookInitiateCheckoutAttr(),"InitiateCheckout")}function selectedStoreOnShipping(e){const t=$("#postcode_delivery").val();let n={};n["Recipient's Name"]=$("#fullname").val()||"",n["Recipient's Phone"]=$("#recipientNumber").val()+""||"",n.City=$("#pickupCity").val()||"",n["Store Address"]=$("#pickupStoreAddress").val()||"",n.Store=$(e).val()||"",n.Pincode=t?t+"":"";let o="Store Name Added";processClientEvent(o,n),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,o)}function userDetailsAddedEvent(e){let t={};t.Email=$("#email").val()||"",t["Phone No."]=$("#contactNumber").val()||"";let n="User Details Added";processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)}function PhoneIncorrectEvent(e,t){let n={"Phone Number Incorrect":!0};n["Phone No."]=t||"";let o="Phone Number Incorrect";processClientEvent(o,n),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,o)}function EmailIncorrectEvent(e,t){let n={"Email Incorrect":!0};n.Email=t||"";let o="Email Incorrect";processClientEvent(o,n),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,o)}function pinChangeEvent(){if(!$("#pincodeWidget .change-pin").hasClass("enter-pin")){const e=$("#pincodeWidget #currentPincode").text();let t={};t.Pincode=e?e+"":"";let n="Pincode Changed";processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)}}function PincodeEnteredEvent(e,t,n){let o={};o["Error Flag"]=n||!1,o.Pincode=t?t+"":"";let a="Pincode Entered";processClientEvent(a,o),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,o,a)}function PincodeIncorrectEvent(e,t){let n={"Error Flag":!0};n.Pincode=t?t+"":"",processClientEvent("Pincode Incorrect",n)}function otpSendEvent(e,t){let n={};n["OTP Generated"]=t||!1,n["Payment Mode"]=e||"";let o="Payment Page OTP Generated";processClientEvent(o,n),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,o)}function otpEnteredOnPayment(e,t){let n={"Correct OTP Entered":!0};n["Payment Mode"]=$(e.target).data("paymentmode")||$(".payment_tab.selected").data("paymentmode")||"";let o="Payment Page OTP Entered";processClientEvent(o,n),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,o)}function orderPlacedEvent(e){let t={};t["Payment Mode"]=e||"",t["Product Id"]=$("#productIds").val()||"",t["Product Name"]=$("#productNames").val()||"",t.Quantity=parsePrice($("#totalCartCount").val())||0,t["Cart Value"]=parsePrice($(".total-payable").text())||0,t["Product Details"]="",t["Discount Amount"]=parsePrice($("#total_discount").text())||parsePrice($(".discount-row .discount").text())||0,t["Shipping Charges"]=0,t["Tax Charged"]=0;let n="Checkout Completed";processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)}function processServerEvent(e){const t=eventsGlobalAttr(e);
63eventLoggerServerRequest(t)}function processClientEvent(e,t,n=[]){const o=eventsGlobalClientAttr(t);window.webengage&&(n.includes("we")||webengage.track(e,o)),n.includes("go")||"Added To Cart"!==e&&"Added To Wishlist"!==e&&"Cart Updated"!==e||processGoKwikEvent(e,t)}function processGoKwikEvent(e,t,n){const o=renameKeys(t,{"Variant Id":"variant_id",Image:"image_url"});window.KwikAnalytics&&window.KwikAnalytics.trackEvent&&KwikAnalytics.trackEvent({category:n||"custom_event_type",name:e,action:"user_action",attributes:o})}function eventsGlobalClientAttr(e){e=e||{},($("body").hasClass("with-checkout-footer")||$("html").hasClass("new-cf-ui")||location.pathname.includes("/order")||location.pathname.includes("goldReserveOrder")||location.pathname.includes("goldmineOrder"))&&(e["Cart Type"]=cartType||""),e["Logged In"]=isLoggedIn||!1,e["Soft Login Type"]=e["Soft Login Type"]||softLoginType||"None",e["Home Page Variant"]=getPageVariantFromCookie("EX_HOME_")||"NONE",e["PDP Page Variant"]=getPageVariantFromCookie("EX_PDP_")||"NONE",e["PLP Page Variant"]=getPageVariantFromCookie("EX_PLP_")||"NONE",e["Guest Checkout Variant"]=getPageVariantFromCookie("EX_GC_")||"NONE";const t=getUrlParams(),n=getPageName();return{...e,...n,...t}}function eventsGlobalAttr(e){(e=e||{}).currentURL=window.location.href||"",e.pageType=getCurrentPageType()||"",e.cart_type=cartType||"",e.referrer=document.referrer||"",e.directServer=0,e.visitorId=visitorId||"",e.pincode=getCookie("pincode")||"",e._fbc=getCookie("_fbc")||"",e._fbp=getCookie("_fbp")||"",e.client_user_agent=navigator.userAgent||"",e.isApp=Boolean(getCookie("bsApp"))||!1,e.customerId=customerId||"",e.platform=deviceName||"",e.user_id=(isLoggedIn?customerId:visitorId)||"",e.user_type=(isLoggedIn?"logged_in_user":"guest_user")||"",e.timestamp=Date.now()||"";var t=getURLparams;return void 0!==t.utm_source&&(e.utm_source=t.utm_source||""),void 0!==t.utm_medium&&(e.utm_medium=t.utm_medium||""),void 0!==t.utm_campaign&&(e.utm_campaign=t.utm_campaign||""),void 0!==t.utm_content&&(e.utm_content=t.utm_content||""),void 0!==t.utm_term&&(e.utm_term=t.utm_term||""),webengage.onReady(function(){e.we_luid=webengage.state.getForever().luid||""}),e}function resendOTPEvent(){processClientEvent("Resend OTP",{})}function logInitiatedSignUpEvent(){}function logInitiatedLoginEvent(){}function applyVoucherEvent(e,t){let n={};n["Voucher Type"]=e||"",n["Voucher Name"]=t||"",processClientEvent("Voucher Applied",n)}function cartUpdatedEvent(){let e=getCommonCartAttr(),t="Cart Updated";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}function cartUpdateTrigger(e,t){sessionStorage.setItem("CartUpdateTriggered",!e),sessionStorage.setItem("cartUpdateTriggeredAS",t||[])}function sizeSelectedEvent(){let e=getCommonCartAttr(),t="Size Selected";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}function homeDeliverySelected(e){if($(e).is(":checked")){let e={"Home Delivery Selected":!0},t="Home Delivery Selected";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}}function storeDeliverySelected(e){if($(e).is(":checked")){let e={"Store Pickup Selected":!0},t="Store Pickup Selected";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}}function fireLoginEvents(e,t){e.id&&e.id;let n=e.userCode?e.userCode+"":"",o=e.email?e.email:"",a=e.name?e.name:"",i=e.phone?"+91"+e.phone:"";e.gender&&e.gender,e.bDay&&e.bDay,e.maritalStatus&&e.maritalStatus,e.identity&&e.identity;webengage&&(webengage.user.login(n),webengage.user.setAttribute("we_email",o),webengage.user.setAttribute("we_first_name",a),webengage.user.setAttribute("we_phone",i)),t&&facebookCompleteRegistration("email","new")}function softLoginEvent(e){let t={},n="Soft Login";t["Soft Login Type"]=e,processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)}function getCommonWishlistAttr(e){let t={"Product Id":"","Product Name":"","Category Name":"",MRP:"","Selling Price":"","Wishlist Value":0,Discount:""};return $(e).each(function(e,n){const o=parsePrice($(n).data("price")),a=parsePrice($(n).data("sellingprice"));""!==t["Product Id"]&&(t["Product Id"]+=","),""!==t["Product Name"]&&(t["Product Name"]+=","),""!==t["Category Name"]&&(t["Category Name"]+=","),""!==t.MRP&&(t.MRP+=","),""!==t["Selling Price"]&&(t["Selling Price"]+=","),""!==t.Discount&&(t.Discount+=","),t["Product Id"]+=$(n).data("productid")?$(n).data("productid")+"":$(n).data("pid")?$(n).data("pid")+"":"",t["Product Name"]+=$(n).data("productname")||$(n).data("pname")||"",t["Category Name"]+=$(n).data("category")||$(n).data("cat")||"",t.MRP+=o||0,t["Selling Price"]+=a||0,t["Wishlist Value"]=t["Wishlist Value"]+a,t.Discount+=getDiscount(o,a)}),"wishlist"===PAGE_TYPE&&(t["Wishlist Cart Item Count"]=parsePrice($(".wishlist-inner").data("wishlistcount"))||0),t}function getCommonVideoCartAttr(e){let t={"Product Id":"","Product Name":"","Category Name":"",MRP:"","Selling Price":"",Discount:""},n=[];return $(e).each(function(e,o){const a=parsePrice($(o).data("price")),i=parsePrice($(o).data("sellingprice"));n.push(i),""!==t["Product Id"]&&(t["Product Id"]+=","),""!==t["Product Name"]&&(t["Product Name"]+=","),""!==t["Category Name"]&&(t["Category Name"]+=","),""!==t.MRP&&(t.MRP+=","),""!==t["Selling Price"]&&(t["Selling Price"]+=","),""!==t.Discount&&(t.Discount+=","),t["Product Id"]+=$(o).data("productid")+""||"",t["Product Name"]+=$(o).data("productname")||"",t["Category Name"]+=$(o).data("category")||"",t.MRP+=a||0,t["Selling Price"]+=i||0,t.Discount+=getDiscount(a,i)}),e&&e.length>1&&(t["Video Call Cart Value"]=getTotalValue(n)||0,t["Cart Item Count"]=parsePrice($("#shopping-bag").data("totalcount"))),t["Page Name"]="Video Call",t}function getDiscount(e,t){try{let n=0;return e&&t&&(n=parsePrice(e)-parsePrice(t)),n}catch(e){return 0}}function getTotalValue(e){try{let t=0;return e.forEach(function(e,n){t+=parsePrice(e)}),t}catch(e){return 0}}function getPageName(){try{let e={};return location.href.includes("/search")?e["Page Name"]="Search":location.href.includes("/jewellery")?e["Page Name"]="PLP":location.href.includes("/stores/")?e["Page Name"]="Stores":location.href.includes("/recently-viewed")?e["Page Name"]="Recently Viewed":location.href.includes("~")?e["Page Name"]="PDP":location.href.includes("/wishlist")?e["Page Name"]="Wishlist":"newPaymentDetails"===execution_step||"newPaymentFailureState"===execution_step||"newPaymentSuccessState"===execution_step||"newPaymentTimeoutState"===execution_step||"paymentVerificationState"===execution_step||"orderProcessingState"===execution_step?e["Page Name"]="Payments":location.href.includes("/offer-landing")&&(e["Page Name"]="Offer Landing Page"),e}catch(e){return{}}}function getUrlParams(){try{let e={};if(-1!==location.href.indexOf("?")){let t=getQueryParams(location.search);t.utm_source&&(e.utm_source=t.utm_source),t.utm_medium&&(e.utm_medium=t.utm_medium),t.utm_campaign&&(e.utm_campaign=t.utm_campaign),t.search_query&&(e.search_query=t.search_query)}return e}catch(e){return{}}}function getQueryParams(e){const t=new URLSearchParams(e),n={};for(const[e,o]of t.entries())n[e]=o;return n}function getPaymentMethodForEvents(e){var t=sessionStorage.getItem("ordrAmt"),n="";switch(e){case"wallet":n="UPI Intent";break;case"new-upi":case"upi":n="UPI Collect";break;case"qr":n="UPI QR";break;case"new-card":case"card":n="Card";break;case"net-bank":n="Net Banking";break;case"":0==t&&(n="BS Wallet");break;default:n=""}return n}function handleVisibilityChange(e){var t=$(".payment-method-selected").attr("id")||"",n=sessionStorage.getItem("payMtd")||"",o=sessionStorage.getItem("ordrAmt")||"",a=sessionStorage.getItem("rtyCnt"),i=sessionStorage.getItem("dropOffTime"),r="";""!=i&&(r=Math.round((Date.now()-parseInt(i,10))/1e3));var c={};c["Order Total"]=o?parsePrice(o):0,c["Payment Method Type"]=n,c["UPI App Name"]=t,c["Retry Count"]=a?parsePrice(a):0,c["Drop Off Time"]=r,"hidden"===document.visibilityState&&processClientEvent("Redirection URL Received Razopray",c)}function getPDPCommonAttributes(e){let t={};var n=parsePrice($("#discountedPriceSpan").data("srp")),o=parsePrice($("#our_price_display").data("mrp")),a=parsePrice($("#totalDiamonds").data("totaldiamonds"))||0,i=parsePrice($("#otherStonesCount").val())||0;return t["Customization Id"]=$("#customizationId").val()||"",t["Product Id"]=designId||"",t["Product Name"]=$("#buy_block h1").data("designname")||"",t["Category Name"]=productCategory||"",t.MRP=o||"",t["Selling Price"]=n||(o||""),t.Discount=o&&n&&o!=n?o-n:0,t["Offer Name"]=$(".off-mkg-chrg").text()||"",t["Collection Name"]=$(".pd-collections-info-title").data("c
63ollection")||"",t.Image=$(".image-placeholder a").data("imageurl")||"",t.Height=$("#pHeight").data("pheight")||"",t.Width=$("#pWidth").data("pwidth")||"",t["Error Flag"]=!e||"undefined"===e,t.Size=e||"",t.Length=$("#pLength").data("plength")||"",t["Product Weight"]=$("#product_total_weight").data("pweight")||"",t.Color=metalColor||"",t["Metal Type"]=metalType||"",t["Metal Purity"]=metalPurity||"",t["Metal Weight"]=$("#metalWeight").data("mweight")||"",t["Diamond Weight"]=$("#pptotaldmdwt").data("dweight")||"",t["Diamond Color"]=diamondColorClarity||"",t["No. of Diamonds"]=a||0,t.Stones=$("#otherStones").val()||"",t["No. of other stones"]=i-a||0,t["Solitaire Clarity"]=solitaireClarity||"",t["Solitaire Color"]=solitaireColor||"",t["Solitaire Weight"]=solitaireCarat||"",t["No. of Solitaire"]=$("#solitaireCount").data("scount")||0,t.Currency="INR",t}function triggerSizeSelectedEvent(e){processClientEvent("Size Selected",getPDPCommonAttributes(e)||{})}function initializeGoKwikSystemEvents(){if("browse"!==PAGE_TYPE&&"product"!==PAGE_TYPE&&"viewCart"!==execution_step){const e=new CustomEvent("page_view_kp",{detail:{type:"other"}});window.dispatchEvent(e)}if("browse"===PAGE_TYPE){const e=new CustomEvent("page_view_kp",{detail:{type:"collection",data:{collection_id:$("#selectedCategories").val()||"",name:$(".page-title").text().trim()||""}}});window.dispatchEvent(e)}if("product"===PAGE_TYPE){const e=new CustomEvent("page_view_kp",{detail:{type:"product",data:{product_id:productDetails.id+""||"",variant_id:$("#customizationId").val()+""||"",image_url:$("#"+productDetails.id).data("imageurl")||"",name:productDetails.name||"",price:parsePrice(productDetails.price)||0}}});window.dispatchEvent(e)}if("viewCart"===execution_step){const e=new CustomEvent("page_view_kp",{detail:{type:"other",data:{cart_id:$("#cartIdValue").val()+""||""}}});window.dispatchEvent(e)}}function renameKeys(e,t){const n={...e};return Object.keys(t).forEach(e=>{n.hasOwnProperty(e)&&(n[t[e]]=n[e],delete n[e])}),n}function sessionStorageBasedEvent(e,t,n){const o=getCommonCartAttr();"false"===sessionStorage.getItem(t)&&(processClientEvent(e,o,n),sessionStorage.setItem(t,!0),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,o,e))}function handlePOSCartViewDetailsWEEvent(e){const t=e.dataset.productid,n=parseInt((e.dataset.price||"").replace(/[^\d]/g,""),10)||"",o=parseInt((e.dataset.discountedprice||"").replace(/[^\d]/g,""),10)||"",a=e.dataset.designname,i=e.dataset.sourcetype,r={};r["Product Id"]=t||"",r["Product Name"]=a||"",r["Selling Price"]=o||n,r["Page Name"]="Cart",r.Source=i||"";const c="Store-Visit Item Clicked";processClientEvent(c,r),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,r,c)}function posCartAddToWishlistWEEvent(e){const t=e.dataset.id,n=parseInt((e.dataset.price||"").replace(/[^\d]/g,""),10)||"",o=parseInt((e.dataset.discountedprice||"").replace(/[^\d]/g,""),10)||"",a=e.dataset.designname,i=e.dataset.sourcetype,r=e.classList.contains("wishlist-added"),c={};c["Product Id"]=t||"",c["Product Name"]=a||"",c["Selling Price"]=o||n,c["Page Name"]="Cart",c.Source=i||"";const s=r?"Store-Visit Item Removed from Wishlist":"Store-Visit Item Added to Wishlist";processClientEvent(s,c),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,c,s)}function facebookAddToWishlist(e,t,n,o,a,i){commonFacebookEventsUtil("AddToWishlist",{content_name:t,content_category:n,content_ids:e?e+"":"",content_type:"product",value:a||"",variant_id:o||"",wishlist_item_count_after:i?Number(i):0},"AddToWishlist")}function facebookAddToCart(e,t,n,o,a){commonFacebookEventsUtil("AddToCart",{content_names:t?[t]:[],content_ids:e?[e]:"",content_type:"product",value:a||"",contents:[{id:e,quantity:1}],variant_id:o})}function facebookProductCustomization(e,t,n,o,a,i,r,c){if("function"==typeof window.fbq){var s=document.querySelector("#ringselect"),l=(c=c||(s?s.dataset.key:""),document.querySelector('input[id^="metalPurity_"]:checked'));r=r||(l?l.value:"");commonFacebookEventsUtil("CustomizeProduct",{content_name:t,content_category:n,content_ids:e?e+"":"",content_type:"product",value:"",currency:"INR",selected_variant:a?String(a):"",metal_colour:i,purity:r?r+"kt":"",size:c})}}function facebookCompleteRegistration(e,t){commonFacebookEventsUtil("CompleteRegistration",{registration_method:e,customer_status:t})}function facebookDeliveryAvailabilityChecked(){"function"==typeof window.fbq&&commonFacebookEventsUtil("DeliveryAvailabilityChecked",{content_name:productDetails?productDetails.name:"",content_category:productDetails?productDetails.category:"",content_ids:productDetails?String(productDetails.id):"",content_type:"product",broad_city:"",nearby_store_available:"",value:"",currency:"INR"})}function facebookStoreInventoryViewed(e,t,n,o){"function"==typeof window.fbq&&commonFacebookEventsUtil("StoreInventoryViewed",{store_id:e,store_name:t,city:n,content_category:"",content_ids:"",result_count:"",source_page:o})}function facebookPLPViewed(){if("function"!=typeof window.fbq)return;let e="",t=[],n=[];if("undefined"!=typeof document){const o=document.getElementById("product_list_ui");if(o){const a=Array.from(o.querySelectorAll(":scope > li[data-pid]")).slice(0,9);e=a.length>0?a[0].dataset.cat:"",t=a.map(e=>String(e.dataset.pid)),n=a.map(e=>e.dataset.pname)}}const o=document.querySelector(".selected-sorting");let a=o?o.innerHTML.trim():"";commonFacebookEventsUtil("PLPViewed",{content_names:n,content_category:e,content_ids:t,content_type:"product",result_count:null!=totalDesigns&&totalDesigns?String(totalDesigns):"",list_name:"",sort_order:a})}function facebookRecentlyViewedOpened(){if("function"!=typeof window.fbq)return;let e="",t=[],n=[];if("undefined"!=typeof document){const o=document.getElementById("product_list_ui");if(o){const a=Array.from(o.querySelectorAll(":scope > li[data-pid]")).slice(0,9);e=a.length>0?a[0].dataset.cat:"",t=a.map(e=>String(e.dataset.pid)),n=a.map(e=>e.dataset.pname)}}let o=0;document.querySelector(".total-designs")&&(o=(document.querySelector(".total-designs")?.textContent.match(/\d+/)||[""])[0]),o>0&&commonFacebookEventsUtil("RecentlyViewedOpened",{content_ids:t,content_category:e,content_type:"product",num_items:o,currency:"INR",source_page:""})}function commonFacebookEventsUtil(e,t,n){if(["oms.bluestone.com","pos.bluestone.com","warmup.bluestone.com"].includes(window.location.hostname))return;(t=t||{}).event_id=generateUUIDId(),("MOBILE"!==deviceName||"MOBILE"===deviceName&&!isAppWebView)&&
63(facebookClientEvent(e,t),"PageView"===e&&processClientEvent("PageView",t),"ViewContent"===e&&processClientEvent("ViewContent",t),facebookServerEvent(e,t),openAiClientEvent(e,t),facebookServerEvent(e,{...t,openAIEvent:!0}));"MOBILE"===deviceName&&(n&&void 0!==n&&""!==n)&&facebookAppEvent(n,t)}function generateUUIDId(){return window.crypto&&window.crypto.randomUUID?window.crypto.randomUUID():Date.now()+"-"+Math.random().toString(36).substr(2,9)}function facebookClientEvent(e,t){let n={...getFacebookGlobalAttr(),...t};n.client_ip_address="",n.client_user_agent="";const o=removeEmptyParams(n);if("function"!=typeof window.fbq)setTimeout(function(){if("function"==typeof window.fbq)try{window.fbq("track",e,o,{eventID:n.event_id})}catch(e){}},1e3);else try{window.fbq("track",e,o,{eventID:n.event_id})}catch(e){}}function facebookServerEvent(e,t){const n={_eventId:e,metaEvent:!0,...getFacebookGlobalAttr(),...t};n.producer_system="web_capi";const o=removeEmptyParams(n);eventLoggerServerRequest(o)}async function facebookAppEvent(e,t){if(isAppWebView){let n={...getFacebookGlobalAttr(),...t};n.source_surface=isIOS?"ios_app":"android_app",n.producer_system=isIOS?"ios_sdk":"android_sdk",n._eventId=e,n.metaEvent=!0,n.isApp=!0,n.purchaseAmount=n.value||0;let o=removeEmptyParams(n);facebookServerEvent(e,o),n.metaEvent="",n.client_ip_address="",n.client_user_agent="",n.isApp="";const a=await convertToSha256({em:n.em,ph:n.ph,external_id:n.external_id,ct:n.ct,st:n.st,zp:n.zp,country:n.country,fn:n.fn,ln:n.ln});n={...n,...a},o=removeEmptyParams(n);const i=normalizeMetaParams(o),r=n.value||0;AppEvent&&AppEvent.facebook&&AppEvent.facebook(e,i,r)}}function openAiClientEvent(e,t){const n=t||{},o={PageView:{oaiName:"page_viewed"},ViewContent:{oaiName:"contents_viewed"},AddToCart:{oaiName:"items_added"},AddToWishlist:{oaiName:"custom",customEventName:"add_to_wishlist"},CustomizeProduct:{oaiName:"custom",customEventName:"customize_product"},Search:{oaiName:"custom",customEventName:"search"},CompleteRegistration:{oaiName:"registration_completed"},FindLocation:{oaiName:"custom",customEventName:"find_location"},DeliveryAvailabilityChecked:{oaiName:"custom",customEventName:"delivery_availability_checked"},StoreInventoryViewed:{oaiName:"custom",customEventName:"store_inventory_viewed"},RecentlyViewedOpened:{oaiName:"custom",customEventName:"recently_viewed_opened"},InitiateCheckout:{oaiName:"checkout_started"},AddPaymentInfo:{oaiName:"custom",customEventName:"add_payment_info"},Purchase:{oaiName:"order_created"}}[e];if(o){var a=function readStoredUser(){try{var e=sessionStorage.getItem("userinfo")||localStorage.getItem("userinfo");if(!e)return{};var t=JSON.parse(e);return t&&"object"==typeof t?t:{}}catch(e){return{}}}(),i=firstDefined(normalizeEmail(n.email),normalizeEmail(n.em),normalizeEmail(a.email)),r=firstDefined(normalizePhone(n.phone),normalizePhone(n.ph),normalizePhone(a.phoneNumber),normalizePhone(a.phone)),c=firstDefined(n.external_id,n.userCode,a.userCode,a.customerId);null!=c&&(c=String(c).trim()||void 0);var s=firstDefined(normalizeName(n.firstName),normalizeName(n.fn),normalizeName(a.firstName)),l=firstDefined(normalizeName(n.lastName),normalizeName(n.ln),normalizeName(a.lastName)),d=firstDefined(normalizeCity(n.city),normalizeCity(n.ct),normalizeCity(n.cityName),normalizeCity(a.cityName),normalizeCity(a.deliveryCity),normalizeCity(a.city)),m=firstDefined(n.st,n.state,a.state);m&&(m=String(m).trim().slice(0,128)||void 0);var u,p=firstDefined(normalizePostal(n.zp),normalizePostal(n.pincode),normalizePostal(a.pincode),normalizePostal(localStorage.getItem("pincode")));u="page_viewed"===o.oaiName?{type:"contents",contents:[{id:window.location.pathname,name:document.title,content_type:"page"}]}:"contents_viewed"===o.oaiName||"items_added"===o.oaiName||"checkout_started"===o.oaiName||"order_created"===o.oaiName?compact({type:"contents",amount:n.value,currency:null!=n.value?n.currency||"INR":void 0,contents:buildContents()}):"registration_completed"===o.oaiName?{type:"customer_action"}:compact({type:"custom",amount:n.value,currency:null!=n.value?n.currency||"INR":void 0,contents:buildContents()});var v=compact({event_id:n.event_id,oppref:function getOppref(){try{var e=new URLSearchParams(window.location.search).get("oppref");if(e&&e.trim())return e.trim()}catch(e){}return function readCookie(e){if("undefined"!=typeof document){var t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):void 0}}("__oppref")}(),custom_event_name:"custom"===o.oaiName?o.customEventName||"custom_event":void 0});"function"!=typeof window.oaiq?setTimeout(function(){"function"==typeof window.oaiq&&run().catch(function(e){})},1e3):run().catch(function(e){})}function toStringArray(e){if(null==e||""===e)return[];return(Array.isArray(e)?e:[e]).filter(function(e){return null!=e&&""!==e}).map(String)}function compact(e){return Object.fromEntries(Object.entries(e).filter(function(e){return null!=e[1]&&""!==e[1]}))}function firstDefined(){for(var e=0;e<arguments.length;e++){var t=arguments[e];if(null!=t&&""!==t)return t}}function normalizeEmail(e){if(null!=e&&""!==e){var t=String(e).trim().toLowerCase();return t&&-1!==t.indexOf("@")?t:void 0}}function normalizePhone(e){if(null!=e&&""!==e){var t=String(e).trim().replace(/[\s().-]/g,"").replace(/^\+/,"").replace(/^0+/,"");if(t)return/^\d{10}$/.test(t)&&(t="91"+t),/^\d{8,15}$/.test(t)?t:void 0}}function normalizeName(e){if("string"==typeof e)return e.trim().toLowerCase().replace(/[\s!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]/g,"")||void 0}function normalizeCity(e){if(null!=e&&""!==e)return String(e).trim().toLowerCase().slice(0,128)||void 0}function normalizePostal(e){if(null!=e&&""!==e)return String(e).trim().replace(/[^A-Za-z0-9 -]/g,"").slice(0,32)||void 0}function buildContents(){var e=toStringArray(n.content_ids),t=toStringArray(n.content_names),o=n.content_type||"product",a=n.currency||"INR";return e.map(function(e,i){return compact({id:e,name:t[i],content_type:o,quantity:1,amount:n.value,currency:null!=n.value?a:void 0})})}async function run(){var e=await convertToSha256({email:i,phone:r,externalId:c,firstName:s,lastName:l});!function fire(e){e&&Object.keys(e).length>0&&window.oaiq("init",{user:e}),window.oaiq("measure",o.oaiName,u,v)}
63(compact({email_sha256:e.email,phone_number_sha256:e.phone,external_id_sha256:e.externalId,first_name_sha256:e.firstName,last_name_sha256:e.lastName,country:"IN",city:d,region:m,postal_code:p,zip_code:p}))}}function getFacebookGlobalAttr(e){return(e=e||{}).event_time=Math.floor(Date.now()/1e3),e.event_source_url=window.location.href,e.fbp=getCookie("_fbp"),e.fbc=getCookie("_fbc"),e.client_ip_address=CLIENT_IP||"",e.client_user_agent=navigator.userAgent,e.external_id=customerCode||null,e.em=EMAIL?String(EMAIL).trim().toLowerCase():null,e.ph=normalizePhoneForFacebookEvents(CUSTOMER_PHONE),e.fn=getFirstNameForFacebook(),e.ln=CUSTOMER_LAST_NAME||null,e.ct=SHIPPING_ADDRESS_CITY||null,e.st=SHIPPING_ADDRESS_STATE||null,e.zp=SHIPPING_ADDRESS_POSTCODE||getCookie("pincode")||null,e.country="undefined"!=typeof SHIPPING_ADDRESS_COUNTRY_ISO&&null!=SHIPPING_ADDRESS_COUNTRY_ISO?String(SHIPPING_ADDRESS_COUNTRY_ISO).trim().toLowerCase():"in",e.currency="INR",e.source_surface="website",e.producer_system="web_pixel",e.surface_identifier=window.location.pathname||"",e.surface_title=document.title||"",e.surface_type=getCurrentPageType()||"",e.city=deliveryCity,e.variation="JSP",e}function getFirstNameForFacebook(){return(("undefined"!=typeof CUSTOMER_FIRST_NAME&&CUSTOMER_FIRST_NAME?CUSTOMER_FIRST_NAME.trim():"")+("undefined"!=typeof CUSTOMER_MIDDLE_NAME&&CUSTOMER_MIDDLE_NAME?" "+CUSTOMER_MIDDLE_NAME.trim():"")).trim()||null}function normalizePhoneForFacebookEvents(e){return e?(e=(e=String(e).trim()).replace(/[+\-\s()]/g,""),/^\d{10}$/.test(e)&&(e="91"+e),e):null}function getFacebookPDPAttr(e){(e=e||{}).content_ids=content_ids_var||[],e.content_type=content_type_var||"",e.content_names=[content_name_var]||[],e.content_category=content_category_var||"",e.contents=contents_var||[],e.value=Number(value_var)||0,e.design_id=designId||"";const t=document.getElementById("customizationId");e.variant_id=t?t.value:"";const n=document.querySelector(".pd-collections-info-title");return e.collection_name=n?n.getAttribute("data-collection"):"",e.metal_type=metalType||"",e.metal_colour=metalColor||"",e.purity=metalPurity?metalPurity+"KT":"",e.stone_type=solitaireCarat?"Solitaire":"Diamond",e.diamond_quality=diamondColorClarity||"",e.default_size=window.sizeKey||"",e}let fbSearchDebounce;function facebookSearchEvent(e){const triggerEvent=t=>{if("function"!=typeof window.fbq)return;const n=new URLSearchParams(window.location.search).get("search_query")||e?.search_query_str||e?.search_text;if(!n)return;let o=[];if(e?.products?.list?.length)o=e.products.list.slice(0,9).map(e=>e.designId||e.id||e.productId||e.sku).filter(Boolean);else{o=[...document.querySelectorAll("#search-result li:not(.valentine-wdg)")].slice(0,9).map(e=>e.dataset.pid).filter(Boolean)}commonFacebookEventsUtil("Search",{search_string:n,content_ids:o,result_count:o?.length||"",sort_order:""})};e?.products?.list?(clearTimeout(fbSearchDebounce),fbSearchDebounce=setTimeout(function(){triggerEvent()},4e3)):triggerEvent()}function shouldFirePurchase(e){if(!e)return!1;e=String(e).trim();const t="last_purchase_order";return sessionStorage.getItem(t)!==e&&(sessionStorage.setItem(t,e),!0)}function getFacebookPurchaseEventAttr(e){return(e=e||{}).content_ids=content_ids_var||[],e.order_id=$("#orderCode").data("orderid")||"",e.content_type=content_type_var||"",e.content_names=content_name_var||[],e.contents=contents_var||[],e.value=Number(value_var)||0,e.num_items=content_ids_var.length,e.store_id=window.pickup_store_code||"",e.store_name=window.pickup_store_name||"",e.store_city=window.pickup_store_city||"",e}function getFacebookInitiateCheckoutAttr(e){return(e=e||{}).content_ids=content_ids_var||[],e.content_type=content_type_var||"",e.content_names=content_name_var||[],e.contents=contents_var||[],e.value=Number(value_var)||0,e.num_items=content_ids_var.length,e.discount_amount=parsePrice($("#total_discount").text())||parsePrice($(".total-saving.text-green").text())||parsePrice($(".total-savings").text())||0,e}function getFacebookAddPaymentInfoAttr(e){(e=e||{}).content_ids=window.content_ids_var||[],e.content_type=window.content_type_var||"",e.contents=window.contents_var||[],e.value=Number(window.value_var)||0,e.currency=window.currency_var||"INR",e.num_items=e.content_ids.length,e.store_id=window.pickup_store_code||"",e.store_name=window.pickup_store_name||"",e.store_city=window.pickup_store_city||"";const t=$(".payment-method-selected").val()||"";t&&(e.payment_method_type=t);const n=$("#fulfillment-channel").val()||"";n&&(e.fulfillment_channel=n);const o=Number($("#discount-amount").val())||parsePrice($("#total_discount").text())||0;e.discount_amount=o;const a=$("#checkout-mode").val()||"";return a&&(e.checkout_mode=a),e}function removeEmptyParams(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>null!=e&&""!==e))}async function convertToSha256(e){const t={};for(const[n,o]of Object.entries(e)){if(null==o||""===o){t[n]="";continue}const e=(new TextEncoder).encode(String(o).trim().toLowerCase()),a=await crypto.subtle.digest("SHA-256",e);t[n]=Array.from(new Uint8Array(a)).map(e=>e.toString(16).padStart(2,"0")).join("")}return t}function normalizeMetaParams(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>"number"==typeof t?[e,t]:null==t?[e,""]:"object"==typeof t?[e,JSON.stringify(t)]:[e,String(t)]))}function getFacebookRegistrationMethodByContact(e,t){if("string"!=typeof e)return"";const n=e.trim();if(!n)return"";const o=n.includes("@"),a=/^\d+$/.test(n.replace(/[\s()+\-]/g,""));if("signup"===t){if(o)return"phone_email";if(a)return"phone"}else if("login"===t){if(o)return"email";if(a)return"phone"}return""}function trackPhoneNumberEntered(e,t,n){processClientEvent("Guest Phone Number Entered",{isBsAct:e,isNewCustomer:t,page:n})}function triggerFBCustomerRegistrationEvent(){"true"===isNewCustomer&&facebookCompleteRegistration("email","new")}
63$(document).ready(function(){function weUserEvents(e,t,n){if(null==window.webengage)return;const o="we_user_events";let a={};switch(e){case"email":webengage.user.setAttribute("we_email",n),a={we_email:n},processClientEvent(t,a),"MOBILE"===deviceName&&appWEEvents(o,a,o);break;case"phone":n=n?"+91"+n:"",webengage.user.setAttribute("we_phone",n),a={we_phone:n},processClientEvent(t,a),"MOBILE"===deviceName&&appWEEvents(o,a,o);break;case"name":webengage.user.setAttribute("we_first_name",n),a={we_first_name:n},processClientEvent(t,a),"MOBILE"===deviceName&&appWEEvents(o,a,o)}}if($("body").on("focusout","#email, #otp_login, #email-id, #contactNumber, #customer_phone, #userName",function(){var e=$(this).val();""!==e&&(validateEmail(e)?weUserEvents("email","Email ID Entered",e):validateMobile(e)?weUserEvents("phone","Phone Number Entered",e):$(this).is("#userName")&&weUserEvents("name","Name Entered",e))}),"offer-landing"===PAGE_TYPE){setTimeout(function(){let e={},t="Offer Landing Page Viewed";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)},1e3),$(".offer-banner").on("click",function(){let e={};const t=$(this).data("name"),n=$(this).data("bannertype");e.banner_name=t||"",e.banner_type=n||"";let o="Banner Clicked";processClientEvent(o,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,o)}),$(".btn-cta").on("click",function(){let e={};const t=$(this).data("name");e.cta_name=t||"";let n="CTA Clicked";processClientEvent(n,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,n)}),$("#searchStoresBtn").on("click",function(){let e={};const t=$(this).parents("form").find("#pinInput").val();e.pincode=t||"";let n="Nearby Store Searched";processClientEvent(n,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,n)});const onOfferPageIntersection=t=>{t.forEach(t=>{if(t.isIntersecting){let n={};e&&e.forEach(e=>{t.target===e&&(n.section_name=$(e).data("sectioname")||"")}),triggerBannerViewedEvent(n),offerLandingPageObserver&&offerLandingPageObserver.unobserve(t.target)}})};offerLandingPageObserver=new IntersectionObserver(onOfferPageIntersection,{root:null,threshold:.5});const e=document.querySelectorAll(".event-section-block");e&&e.forEach(e=>{offerLandingPageObserver.observe(e)})}if(location.href.includes("/search")){"true"===sessionStorage.getItem("searchTriggered")&&(sessionStorage.setItem("searchTriggered","false"),setTimeout(function(){facebookSearchEvent()},1e3))}if("home"===PAGE_TYPE){setTimeout(function(){const e="Home Page Viewed",t={};processClientEvent(e,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e)},1e3),$(document).on("click",".ab-exp-event-trigger",function(e){processClientEvent($(this).data("abeventname")+" Clicked",{"Page Name":"Home","Video Name":$(this).data("bannername"),"Video Variation":$(this).data("abversion"),"Visitor Id":visitorId})}),hoverEventWithCancelTimer(function(e){processClientEvent($(this).data("abeventname")+" Hovered",{"Page Name":"Home","Video Name":$(this).data("bannername"),"Video Variation":$(this).data("abversion"),"Visitor Id":visitorId})},".ab-exp-event-trigger",500);const homePageIntersection=t=>{t.forEach(t=>{if(t.isIntersecting){let n={},o="";t.target===e&&(o=t.target.dataset.abeventname+" Viewed",n["Page Name"]="Home",n["Video Name"]=document.querySelector("a.ab-exp-event-trigger")?.dataset.bannername,n["Video Variation"]=document.querySelector("a.ab-exp-event-trigger")?.dataset.abversion,n["Visitor Id"]=visitorId),o&&processClientEvent(o,n)}})};homePageObserver=new IntersectionObserver(homePageIntersection,{root:null,threshold:.7});const e=document.querySelector("a.ab-exp-event-trigger");homePageObserver.observe(e)}if("viewCart"===execution_step&&(setTimeout(function(){sessionStorageBasedEvent("Cart Updated","CartUpdateTriggered",sessionStorage.getItem("cartUpdateTriggeredAS")),sessionStorageBasedEvent("Cart Page Viewed","CartPageViewed")},1e3),$(".remove-product").on("click",function(){const e=getCommonItemAttr($(this));let t="Removed From Cart";"videoCallTah"!==cartType&&processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}
63)),"checkoutFlowAddressDetails"===execution_step){$("body").on("click",".delivery-dropdown, #mobile-address-accordion-trigger",function(e){if("none"===$(this).find(".delivery-arrow").css("display"))return;const t="Address Dropdown Clicked";let n=getDeferAddressCommonAttr();processClientEvent(t,n),"undefined"!=typeof deviceName&&"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,t)}),$("body").on("click",".defer-address-btn",function(e){const t="Skip Address Clicked";let n=getDeferAddressCommonAttr();processClientEvent(t,n),"undefined"!=typeof deviceName&&"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,t)});let e={};const t=$("#goKwikEnabled").val();e.GokwikEnabled=t||!1;const n=$("#isAddressDeferredEnabled").val();e["Address Page Variation"]="true"===String(n)?"v2":"v1";let o="Delivery Details Page Viewed";processClientEvent(o,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,o),$("#pickupCity").change(function(){let e={},t="Store City Added";e["Recipient's Name"]=$("#fullname").val()||"",e["Recipient's Phone"]=$("#recipientNumber").val()+""||"",e.City=$(this).val()||"",processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}),$("#pincodeWidget .enter-pin").on("click",function(){const e=$("#pincodeWidget #currentPincode").val();let t={},n="Enter Pincode CTA Clicked";t.Pincode=e?e+"":"",processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)}),$("#postcode_delivery").on("focusout",function(){const e=$(this).val(),t=document.getElementById("stateId_delivery");let n={};n["Recipient's Name"]=$("#fullname").val()||"",n["Recipient's Phone"]=$("#recipientNumber").val()+""||$("#alternateContactNumber").val()+""||"",n.City=$("#cityName_delivery").val()||"",n["Shipping Address"]=$("#address").val()+", "+$("#street").val()+", "+$("#locality").val()+", "+$("#landmark").val()||"",n.Pincode=e?e+"":"",n.State=t?t.options[t.selectedIndex].text+"":"",n.Country="India";let o="Delivery Details Added";processClientEvent(o,n),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,o)})}if("checkoutPaymentDetails"===execution_step){let e=paymentCommonAttr()||{},t="Payment Page Viewed";if(processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t),"MOBILE"===deviceName)$(".payment-options").on("click",function(){let e={},t="Payment Mode Selected";e["Payment Mode"]=$(this).data("type")||"",processClientEvent(t,e),appWEEvents(weCheckoutEvent,e,t)});else if($(".payment_tab").on("click",function(){let e={};e["Payment Mode"]=$(this).data("type")||"",processClientEvent("Payment Mode Selected",e)}),$(".payment_tab.selected").length>0){let e={},t="Payment Mode Selected";e["Payment Mode"]=$(".payment_tab.selected").data("type")||"",processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}triggerFBCustomerRegistrationEvent()}if("newPaymentDetails"===execution_step){setPaymentAttributes(),$(".bsWallet .wallet").each(function(e,t){const n=$(t).attr("id");if($(t).is(":checked")){const e=sessionStorage.getItem("selected-"+n);null!==e&&""!==e&&(sessionStorage.setItem("wltApld"+n,!0),sessionStorage.setItem("wltApld",!0),triggerWalletEvent(n,$(this),"selected"))}else{const e=sessionStorage.getItem("deselected-"+n);null!==e&&""!==e&&(sessionStorage.setItem("wltApld"+n,!1),sessionStorage.setItem("wltApld",!1),triggerWalletEvent(n,$(this),"deselected"))}});let e=newPaymentCommonAttr()||{};e["Wallet Balance Available"]=parsePrice($(".bluestone-balance").data("totalbalance"))>0,e["Is Auto click enabled"]="MOBILE"===deviceName&&"true"===$(".isAutoClickEnabled").val();let t="Payment Page Viewed";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t);if("true"===sessionStorage.getItem("loginTrigger")&&isLoggedIn){let e=newPaymentCommonAttr()||{},t="User Login";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t);const n=$(".user-id").val(),o=$(".user-email").val(),a=$(".user-phone").val();let i={};i.id=n?n+"":"",i.email=o?o+"":"",i.phone=a?a+"":"",i.userCode=customerCode?customerCode+"":"",fireLoginEvents(i,!1),sessionStorage.setItem("loginTrigger",!1)}$("#resend-button").on("click",function(){let e=newPaymentCommonAttr()||{},t="Resend OTP";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}),$(".verify-otp-button").click(function(){let e=newPaymentCommonAttr()||{},t="OTP Entered";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t),sessionStorage.setItem("loginTrigger",!0)});const n="true"===sessionStorage.getItem("allWltSlctd"),o="true"===sessionStorage.getItem("allWltDeSlctd");n&&(triggerAllWalletEvent("Select"),sessionStorage.setItem("allWltSlctd",!1),sessionStorage.setItem("wltApld",!0),sessionStorage.setItem("wltApldblueCash",!0),sessionStorage.setItem("wltApldblueCredits",!0)),o&&(triggerAllWalletEvent("Deselect"),sessionStorage.setItem("allWltDeSlctd",!1),sessionStorage.setItem("wltApld",!1),sessionStorage.setItem("wltApldblueCash",!1),sessionStorage.setItem("wltApldblueCredits",!1)),$(".bs-login-trigger").on("click",function(){let e=newPaymentCommonAttr()||{},t="Payment Page Login Clicked";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}
63),$(".clickable-row, .saved-payments-section .payment-row").on("click",function(){let e=newPaymentCommonAttr()||{};e["Payment Method Type"]=$(this).find(".saved-method").val()+""||"";let t="Saved Payment Method Selected";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}),$(".cvv-input").on("blur",function(){if(""==$(this).val())return;let e=newPaymentCommonAttr()||{};e["Card Type"]=$(this).data("cardtype")+""||"";let t="Saved Card CVV Entered";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}),$(".upi-consent .consent-box").on("click",function(){let e=newPaymentCommonAttr()||{};e["Is Checked"]=!!$(this).is(":checked");let t="Collect UPI ID Save Checkbox Clicked";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}),$(".vpa-input").on("input",debounce(function(){let e=newPaymentCommonAttr()||{};e["UPI ID Valid"]=!$(this).parent().hasClass("invalid");let t="UPI ID Entered";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)},5e3)),$("#card-number").on("blur",function(){if(""==$(this).val())return;const e=$(".card-type").data("cardtype");let t=newPaymentCommonAttr()||{};t["Autopay Applied"]="true"===$("#upiAutopayStatus").val(),t["Card Type"]=e?e+"":"",t["Card Valid"]=!$(this).hasClass("error")||!1,t["Error Flag"]=$(this).hasClass("error")?$(this).parent().find(".card-error").text():"";let n="Card Number Entered";processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)}),$(".new-section, #new-card, .new-section-for-card").on("click",function(){if($(this).hasClass("new-card")){let e=newPaymentCommonAttr()||{};e["Autopay Applied"]="true"===$("#upiAutopayStatus").val();let t="Add New Card Selected";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}}),$(".exp-date").on("blur",function(){if(""==$(this).val())return;const e=$(".card-type").data("cardtype");let t=newPaymentCommonAttr()||{};t["Autopay Applied"]="true"===$("#upiAutopayStatus").val(),t["Card Type"]=e?e+"":"",t["Error Flag"]=$(this).hasClass("invalid")?$(this).parent().find(".date-error").text():"";let n="Card Expiry Entered";processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)}),$("#cvv-card").on("blur",function(){if(""!==$(this).val()){let e=newPaymentCommonAttr()||{};e["Autopay Applied"]="true"===$("#upiAutopayStatus").val();const t=$(".card-type").data("cardtype");e["Card Type"]=t?t+"":"";let n="Card CVV Entered";processClientEvent(n,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,n)}}),$(".checkout-block").click(function(){let e=newPaymentCommonAttr()||{};e["Payment Method"]=$(".payment-method-selected").val()+""||"";let t="Payment Page Back Button Clicked";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}),$(".bsWallet .wallet").change(function(){$(this).is(":checked")?sessionStorage.setItem("selected-"+$(this).attr("id"),$(this).attr("id")):sessionStorage.setItem("deselected-"+$(this).attr("id"),$(this).attr("id"))}),$(".bsWallet #selectAll").on("click",function(){$(this).is(":checked")?sessionStorage.setItem("allWltSlctd",!0):sessionStorage.setItem("allWltDeSlctd",!0)}),$(".card-consent-box").on("click",function(){let e=!1;$(this).is(":checked")&&(e=!0);let t=newPaymentCommonAttr()||{};t["Is Checked"]=e;let n="Save Card Details Checkbox Clicked";processClientEvent(n,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,n)});const a=$(".error-type").val();if(a&&"errorRedirect"==a){let e=newPaymentCommonAttr()||{},t="Payment Failed";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}else if(a&&"timeoutRedirect"==a){let e=newPaymentCommonAttr()||{},t="Session Timeout";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}triggerFBCustomerRegistrationEvent()}if("newPaymentFailureState"===execution_step){let e=newPaymentCommonAttr()||{},t="Payment Failed";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t),triggerRetryEvent()}if("newPaymentTimeoutState"===execution_step){let e=newPaymentCommonAttr()||{},t="Session Timeout";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t),triggerRetryEvent()}if("newPaymentSuccessState"===execution_step){let e=newPaymentCommonAttr()||{},t="Payment Success";processClientEvent(t,e),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,e,t)}if("paymentSuccessView"===execution_step||"newOrderSummary"===execution_step||"newPaymentSuccessState"===execution_step&&"undefined"!=typeof PAGE_TYPE&&"Payment_Success"===PAGE_TYPE){const e="Order Confirmed",t=$("#orderCode").data("ordercode"),n=$("#orderDate").data("orderdate"),o=$(".customers-order-details");let a="",i="",r="";o&&o.each(function(e,t){""!==a&&(a+=","),a+=$(t).find(".product-name .text").text(),""!==r&&(r+=","),r+=$(t).find(".edd-date .text").text(),""!==i&&(i+=","),i+=$(t).data("productid")});let c={};c["Product Name"]=a,c["Product Id"]=i,c["Order Code"]=t||"",c["Order Date"]=n||"",c["Order EDD"]=r||"",c["Autopay enabled"]=null!==document.querySelector(".autopay-success-info");shouldFirePurchase(txn||"")&&(processClientEvent(e,c),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,c,e),cartType&&"goldMine"==cartType&&gms_installment_number>=2||cartType&&"goldReserve"==cartType||commonFacebookEventsUtil("Purchase",getFacebookPurchaseEventAttr(),"Purchase"))}if("tah"===cartType||"videoCallTah"===cartType){if("viewCart"===execution_step){let e={};const t=$("#cartItemCount").val();e._eventId="cart_page_viewed",e.cart_item_count=t,processServerEvent(e),$(".tah-faq-wrapper").on("click","div.title",function(){trackGA("BsUI","TAH Cart Page","tah_faqsection_items_clicked")}
63),$(".add-to-wishlist").on("click",function(){const e=$(this).parents(".product-details").find("#tahProductDetails").val().split("_"),t=$(this).parents(".product-details").find(".price-info-block .new-price").text().replace(/\D/g,"").trim();let n={_eventId:"wishlist_button_clicked"};n.product_id=e[0],n.product_category=e[2],n.product_name=e[1],n.price=parsePrice(t),processServerEvent(n)})}if("TAH SUCCESS"===PAGE_TYPE){let e={_eventId:"confirmation_page_viewed"};processServerEvent(e),$(".browse-btn").on("click",function(){const e={_eventId:"confirmation_CTA_clicked"};processServerEvent(e)})}}if($("#headerCartIcon").on("click",function(){sessionStorage.setItem("CartPageViewed",!1)}),"wishlist"===PAGE_TYPE){processClientEvent("Wishlist Page Viewed",getCommonWishlistAttr(".wishlist-item")),$(".wishlist-op-btn").on("click",function(){processClientEvent("Wishlist Page Open Product Clicked",getCommonWishlistAttr($(this).parents(".wishlist-item")))}),$(".wishlist-atc-btn").on("click",function(){processClientEvent("Buy Now Clicked",getCommonWishlistAttr($(this).parents(".wishlist-item")))}),$(".share-wishlist").on("click",function(){processClientEvent("Wishlist Share Via Email CTA Clicked",getCommonWishlistAttr(".wishlist-item"))}),$(".whatsapp").on("click",function(){processClientEvent("Wishlist Share Via WhatsApp CTA Clicked",getCommonWishlistAttr(".wishlist-item"))}),$(".wishlist-se-btn").on("click",function(){const e={};e.Email=$("#shareWishListId").val()||"",e["Error Flag"]=!!$("#shareWishListId").hasClass("error"),e["Item Count"]=parsePrice($(".wishlist-inner").data("wishlistcount"))||0,processClientEvent("Wishlist Shared On Email",e)})}"product"===PAGE_TYPE&&(processClientEvent("PDP Page Viewed",getPDPCommonAttributes(document.getElementById("size")?.value||document.getElementById("sizeSelected")?.value||-1)),commonFacebookEventsUtil("ViewContent",getFacebookPDPAttr()),$("#buy-now").on("click",function(){processClientEvent("Buy Now Clicked",getPDPCommonAttributes($(".size-box-overlay").data("size")+"")||{})}));if($("body").hasClass("tah-video-call-checkout")){if("viewCart"===execution_step||"emptyVideoCart"===execution_step){const e="Video Call Cart Page Viewed";let t={};$(".bag-item").length>0&&(t=getCommonVideoCartAttr(".bag-item")),processClientEvent(e,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e)}if($(".remove-vc-item").on("click",function(){const e="Removed From Video Call Cart",t=getCommonVideoCartAttr($(this).parents(".bag-item"));processClientEvent(e,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e)}),$(".schedule-btn").on("click",function(){const e="Schedule Video Call CTA Clicked",t=getCommonVideoCartAttr(".bag-item");processClientEvent(e,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e)}),$("#address-form-tah .tah-video-call-user-info-btn").on("click",function(){const e="Book Video Call CTA Clicked";let t=!1;($("#try_email_pd").parent().hasClass("error")||$("#try_name_pd").parent().hasClass("error")||$("#try_mobile_pd").parent().hasClass("error"))&&(t=!0);const n={"Email ID Entered":$("#try_email_pd").val()||"","First Name Entered":$("#try_name_pd").val()||"","WhatsApp Number":$("#try_mobile_pd").val()+""||"","Error Flag":t};processClientEvent(e,n),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,e)}),$("#tahOTPForm .btn").on("click",function(){let e=!1;validateForm("tahOTPForm")||(e=!0);const t="Video Call OTP Submitted",n={"Error Flag":e};processClientEvent(t,n),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,t)}),$("#resend-otp").on("click",function(){const e="Video Call Resend OTP Clicked",t={};processClientEvent(e,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e)}),"VIDEO CALL SUCCESS"===PAGE_TYPE){const e="Video Call Scheduled",t={"Email ID Entered":$(".tah-vc-success-container").data("cemail")+""||"","First name Entered":$(".tah-vc-success-container").data("cname")+""||"","Watsapp Number":$(".tah-vc-success-container").data("cwnumber")+""||"","Cart Item Count":parsePrice($(".tah-vc-success-container").data("cartitems"))||0};processClientEvent(e,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e)}}if($(".wishlist-page-trigger").on("click",function(){processClientEvent("Wishlist Cart Viewed",{"Item Count":$(this).data("wccount")}
63)}),"goldreserve"===PAGE_TYPE){const e="GRP Page Viewed",t={};processClientEvent(e,{}),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e),$("#amount").on("focus",function(){const e="GRP Enter Monthly Amount Clicked",t={Location:"Top"};processClientEvent(e,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e)}),$("#gms_calc").on("focus",function(){const e="GRP Enter Monthly Amount Clicked",t={Location:"Bottom"};processClientEvent(e,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e)}),$("#amount").on("change",function(){const e="GRP Monthly Amount Entered";let t={Location:"Top"};t["Monthly Amount"]=parsePrice($(this).val()),processClientEvent(e,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e)}),$("#gms_calc").on("change",function(){const e="GRP Monthly Amount Entered";let t={Location:"Bottom"};t["Monthly Amount"]=parsePrice($(this).val()),processClientEvent(e,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e)}),$("#Email, #email").on("focusout",function(){setTimeout(function(){const e=$(this).parent().hasClass("error"),t="GRP Email Entered";let n={};n["Error Flag"]=e,n["Email ID Entered"]=$(this).val(),processClientEvent(t,n),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,t)}.bind(this),0)}),$("#gmsStart, #submit").on("click",function(){const e=$("#amount").parent().hasClass("error")||$("#email, #Email").parent().hasClass("error"),t="GRP Start Now Clicked",n={};n["Monthly Amount"]=parsePrice($("#amount").val())||0,n.Location=$(this).data("label")||"",n["Email ID Entered"]=$("#Email, #email").val()||"",n["Error Flag"]=e||!1,processClientEvent(t,n),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,n,t)}),$(".calculator-btn").click(function(){const e="GRP Calculator Used";let t={"Check Button":"check button",Slider:0};t["Monthly Amount"]=$("#gms_calc").length>0?parsePrice($("#gms_calc").val()):0,t["Gold Rate"]=$(".goldRate").length>0?parsePrice($(".goldRate").data("goldrate")):0,t["Gold Units"]=$(".calc-reserved-gold").length>0?parsePrice($(".calc-reserved-gold").text()):0,processClientEvent(e,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,e)}),$("#rangeSlider").on("change",function(){const e=$(this).val(),t=$(this).attr("max"),n=e&&t?Math.round(e/t*100):0,o="GRP Calculator Used";let a={"Check Button":"slider moved"};a.Slider=n,a["Monthly Amount"]=$("#gms_calc").length>0?parsePrice($("#gms_calc").val()):0,a["Gold Rate"]=$(".goldRate").length>0?parsePrice($(".goldRate").data("goldrate")):0,a["Gold Units"]=$(".calc-reserved-gold").length>0?parsePrice($(".calc-reserved-gold").text()):0,processClientEvent(o,a),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,a,o)});const onIntersectionGRP=(e,t)=>
63{e.forEach(e=>{if(e.isIntersecting){let t={},o="";e.target===n&&(o="GRP Calculator Viewed"),processClientEvent(o,t),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,t,o),webengageObserverGRP&&webengageObserverGRP.unobserve(e.target)}})};webengageObserverGRP=new IntersectionObserver(onIntersectionGRP,{root:null,threshold:.6});const n=document.querySelector(".goldReserve-calc");n&&webengageObserverGRP.observe(n)}if("orderProcessingState"===execution_step){var e=$("#paymentTxnId").val()||"",t="paymentProcessingLogged_"+e;if(!sessionStorage.getItem(t)&&""!==e){var n=[];$(".processing-product-name").each(function(){n.push($(this).text().trim())});var o={"Transaction ID":e,"Product Name":n.join(", ")},a="Payment Processing Page Viewed";processClientEvent(a,o),"undefined"!=typeof deviceName&&"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,o,a),sessionStorage.setItem(t,"true")}}if("goldReserve"==cartType&&($(".gms-address-form").submit(function(e){const t=sessionStorage.getItem("goldRate"),n=sessionStorage.getItem("goldUnits");if(validateForm("address-form")){const e="GRP Personal Details Submitted";let o={};o["Email ID Entered"]=$("#email").val()||"",o["Phone Number Entered"]=$("#contactNumberGhost").val()||$("#user-mobile").val()||"",o.Name=$("#fullname").val()||"",o.Address=$("#address").val()+" "+$("#street").val()+" "+$("#locality").val()+" "+$("#landmark").val()+" "+$("#cityName").val()+" "+$('#state_gms option[value="'+$("#state_gms").val()+'"]').text().trim(),o.Pincode=$("#postcode_delivery").val()||"",o["Monthly Amount"]=parsePrice($(".subscribed-amount").data("subscribedamount"))||parsePrice($(".gms-summary").data("subscribedamount"))||0,o.Discount=0,o["Final Amount"]=parsePrice($(".subscribed-amount").data("subscribedamount"))||parsePrice($(".gms-summary").data("subscribedamount"))||0,o["Gold Rate"]=t?parsePrice(t):0,o["Gold Units"]=n?parsePrice(n):0,processClientEvent(e,o),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,o,e)}}),$(".gms-nominee-form, #gms-nominee-form").submit(function(e){const t=sessionStorage.getItem("goldRate"),n=sessionStorage.getItem("goldUnits");if("MOBILE"===deviceName?validateForm("gms-nominee-form"):validateForm("address-form")){const e="Nominee Details Submitted";let o={};o["Nominee's Full Name"]=$("#nomineeName").val()||"",o.Relationship=$("#nomineeRelationship").val()||"",o.Nationality=$("#nomineeNationality").val()||"",o["Monthly Amount"]=parsePrice($(".subscribed-amount").data("subscribedamount"))||parsePrice($(".gms-summary").data("subscribedamount"))||0,o.Discount=0,o["Final Amount"]=parsePrice($(".subscribed-amount").data("subscribedamount"))||parsePrice($(".gms-summary").data("subscribedamount"))||0,o["Gold Rate"]=t?parsePrice(t):0,o["Gold Units"]=n?parsePrice(n):0,processClientEvent(e,o),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,o,e)}})),"Payment_Success_GR"==PAGE_TYPE){const e=parsePrice($("#allocatedGoldWt").text())||0,t=parsePrice($("#goldRate").text())||0,n=parsePrice($("#subscriptionAmount").text())||0,o="GRP Initiated";let a={};a["Email ID"]=$("#email").text()||"",a["Phone Number"]=$("#phone").text()||"",a["Plan ID"]=$("#planId").text()||"",a.Name=$("#name").text()||"",a.Address=$("#address").text()||"",a.Pincode=$("#pincode").text()||"",a["Monthly Amount"]=n,a.Discount=parsePrice($("#disocunt").text())||0,a["Gold Units"]=e,a["Gold Value"]=n,a["Gold Rate"]=t,a["Start Date"]=new Date,a["Maturity Date"]=new Date($("#maturityDate").text())||"",a["Final Amount"]=n,processClientEvent(o,a),"MOBILE"===deviceName&&appWEEvents(weCheckoutEvent,a,o)}$("#goKwikAddressBtnGuest").on("click",function(){triggerGoKwikBtnClickEvent("Your Details")}),$("#goKwikAddressBtn").on("click",function(){triggerGoKwikBtnClickEvent("Home Delivery")}),initializeGoKwikSystemEvents()}),$(document).ready(function(){let e="";"_connecto"in window&&(e=_connecto.getAnonymousId()),commonFacebookEventsUtil("PageView",{CONNECTO_ID:e},"PageView")});
64function triggerSwipeLeftRightEvent(e){const t=e.slides[e.activeIndex].querySelector("a").getAttribute("data-bannername");let r={_eventId:"bs_homepage_offer_scrolled"};r.banner_name=t,processServerEvent(r)}function applyFilterEvent(e,t){let r={};if(t&&Object.keys(t).length>0)for(const e in t)r[e]=getItemsCommaSeparated(t[e]);processClientEvent(e,r)}function getSelectedFiltersObj(e,t){const r={};return $(e).each(function(e,n){const o=$(n).data("itemcategory");let a=[];if($(this).find(".form-item.selected").each(function(){a.push({name:$(this).find(".filter-item").data("name"),displayName:capitalizeWords($(this).find(".filter-item").data("name"))})}),o===$(t.target).parent().data("itemcategory"))if($(t.target).parent().hasClass("selected")){let e=$(t.target).data("name");a=a.filter(t=>t.name!==e)}else a.push({name:$(t.target).data("name"),displayName:capitalizeWords($(t.target).data("name"))});a.length>0&&(r[o]=a)}),r}function capitalizeWords(e){return e?e.replace(/\b\w/g,e=>e.toUpperCase()):""}function getItemsCommaSeparated(e){let t="";
64return e.forEach(e=>{""!==t&&(t+=","),t+=e.displayName}),t}$(document).ready(function(){var e;if("home"==PAGE_TYPE){let e={_eventId:"bs_homepage_viewed"};processServerEvent(e),document.querySelector(".collection-section .bttn")&&document.querySelector(".collection-section .bttn").addEventListener("click",function(e){let t={_eventId:"bs_homepage_collection_section_clicked",button_clicked:"browse_all"};processServerEvent(t)}),document.querySelector(".video-section video")&&document.querySelector(".video-section video").addEventListener("play",e=>{let t={_eventId:"bs_hompage_YTvideo_watched",youtube_video_played:"true"};processServerEvent(t)})}if($("body").on("mouseenter",".ga-event-trigger",function(){let t=$(this).data("eventname"),r=$(this).data("sectionname"),n=$(this).data("bannername"),o=$(this).data("pos"),a={};a._eventId="bs_homepage_"+r+"_hovered",a.section_banner=n||"",a.section_banner_id=o||"",e=setTimeout(function(){trackGA("NewHome","Clicked","bs_home_hover_"+t),processServerEvent(a)},500)}),$("body").on("mouseleave",".ga-event-trigger",function(){clearTimeout(e)}),$("body").on("click",".ga-event-trigger",function(){let e=$(this).data("eventname"),t=$(this).data("sectionname"),r=$(this).data("bannername"),n=$(this).data("pos");trackGA("NewHome","Clicked","home_clk_"+e);let o={};o._eventId="bs_homepage_"+t+"_clicked",o.section_banner=r||"",o.section_banner_id=n||"",processServerEvent(o)}),$("body").on("mouseenter",".giftcard-section",function(){let t={_eventId:"bs_homepage_gift_card_hovered"};e=setTimeout(function(){trackGA("NewHome","Clicked","bs_homepage_gift_card_hovered"),processServerEvent(t)},500)}),$("body").on("mouseleave",".giftcard-section",function(){clearTimeout(e)}),hoverEventWithCancelTimer(function(){const e=$(this).text();trackGA("BsUI","NewMenuHover","NewMenuHover "+e)},".wh-navbar .menuparent > a, .wh-navbar .menuparent > .prcs-d, .wh-navbar .menuparent > .prcs-dlh",500),$(".wh-navbar .menuparent > a, .wh-navbar .menuparent > span.prcs-d, .wh-navbar .menuparent >
64 span.prcs-dlh").click(function(){var e=$(this).text();trackGA("BsUI","NewMenuClick","NewMenuClick "+e)}),$(".wh-submenu a, .wh-submenu .prcs-d, .wh-submenu .prcs-dlh").click(function(){var e=$(this).closest(".menuparent").children("a, .prcs-d, .prcs-dlh").text();$(this).parents(".collection-slider").hasClass("active")&&(e="Collections_Infocus");var t=$(this).text(),r=$(this).hasClass("has-badge")?1:0;trackGA("BsUI","NewMenuClick","NewSubMenuClick "+e+" - "+t,r)}),hoverEventWithCancelTimer(function(){processClientEvent("Nav Bar 10+1 Plan Hovered")},".wh-navbar .menuparent > a.monthly-plan",200),$(".wh-navbar .menuparent a.gold-mine, .wh-navbar .menuparent a.gold-reserve").click(function(){var e=$(this).text();processClientEvent("Nav Bar 10+1 Plan Clicked",{"Plan Name":e})}),$(".menu-right-banner.e-gift-card > a").click(function(){processClientEvent("E-GiftCard Clicked",{})}),$("#egc #eg-submit").click(function(){processClientEvent("E-GiftCard Proceed to Pay",{Occasion:$('#egc input[name="occasion"]:checked').val(),Amount:Number($("#eGiftCard2 #amount").val())})}),$(".menu-close").click(function(){$(this).closest(".menuparent").removeClass("active"),$(".wh-overlay").hide()}),$("#search_query_top_elastic_search").click(function(){trackGA("BsUI","Header Search","bs_seach_bar_clicked")}),$("#search_query_top_elastic_search").on("blur",function(){let e=$(this).val();""!==e&&trackGA("BsUI","Header Search","bs_seach_bar_typed - "+e)}),$("#searchbox_elastic_search .button").on("click",function(){""!==$("#search_query_top_elastic_search").val()&&trackGA("BsUI","Header Search","bs_search_button_clicked")}
64),$("#breadcrumb a").click(function(){var e=$(this).attr("title");trackGA("BsUI","Breadcrumb","breadcrumb_"+e+"_clicked")}),hoverEventWithCancelTimer(function(){var e=$(this).attr("title"),t=$(this).data("bannertype");trackGA("BsUI","browse_page","plp "+t+" banner "+e+" hovered")},".bp-offer-banner a, .banner-ab-bp a",500),$(".bp-offer-banner a, .banner-ab-bp a").click(function(){const e=$(this).attr("title"),t=$(this).data("bannertype");let r=$(this).data("pos");trackGA("BsUI","browse_page","plp "+t+" banner "+e+" clicked");let n={};n["Banner Name"]=e,n["Banner Position"]=r||"",n["Banner Type"]=t,processClientEvent("Banner Clicked",n)}),$(".middle-filters .filter-item").click(function(){let e=$(this).text();trackGA("BsUI","browse_page","plp_subheader "+e+" clicked")}),$(".middle-filters .sort-by").click(function(){trackGA("BsUI","browse_page","plp_sort_label_clicked");let e={_eventId:"plp_sort_label_clicked"};e.hover_viewed=itemValue,processServerEvent(e)}),$(".middle-filters .sort-by .content a").click(function(){let e=$(this).text();trackGA("BsUI","browse_page","plp_sort_option_selected "+e+" clicked");let t={};t["Filter Name"]=e,processClientEvent("Sort Filter Applied",t)}),hoverEventWithCancelTimer(function(){processClientEvent("Sort Filter Hovered",{})},".middle-filters .sort-by",500),$("body").on("click",".middle-filters .update-pincode",function(){let e=$("#browsePincodeValue").text();trackGA("BsUI",e,"plp_pincode_popup_viewed");let t={};t.Pincode=e?e+"":"",processClientEvent("Enter Pincode CTA Clicked",t)}),$("body").on("blur","#StoreTahPincodeValidation .form-control",function(){let e=$("#browsePincodeValue").text();trackGA("BsUI",e,"plp_pincode_popup_input_clicked")}),$("body").on("click","#StoreTahPincodeValidation .btn",function(){let e=$("#StoreTahPincodeValidation .form-control").val();trackGA("BsUI",e,"plp_pincode_popup_submit_clk");let t=!1;$("#StoreTahPincodeValidation .fl-wrap").hasClass("error")&&(t=!0);let r={};r.Pincode=e,r["Error Flag"]=t,processClientEvent("Pincode Entered",r)}),$("body").on("keydown","#StoreTahPincodeValidation .form-control",function(e){if("Enter"===e.key||13===e.keyCode){let e=$("#browsePincodeValue").text();trackGA("BsUI",e,"plp_pincode_popup_submit_clk")}}),"browse"===PAGE_TYPE&&(processClientEvent("Product Listing Page Viewed",{}),setTimeout(function(){facebookPLPViewed()},1e3),function initBrowsePageLogger(){const e={root:null,rootMargin:"0px",threshold:1},t=new Map,r=new Set,n=new IntersectionObserver(e=>{e.forEach(e=>{const n=e.target,o=n.getAttribute("data-pid");if(e.isIntersecting){let a={},i={};if(o&&!t.has(o)&&e.intersectionRatio>=.99){if(r.has(o))return;const e=setTimeout(()=>{if(!r.has(o)){const e=n.querySelector(".offer span"),t=e?e.innerText.trim():"No Offer",c=n.getAttribute("data-cat"),s=parseInt(n.getAttribute("data-position"),10),d=n.getAttribute("data-saveamount"),l=n.getAttribute("data-price");let p=0;d&&l&&d>0&&(p=d/l*100);let u=s;(s>=3||"Gold Coins"===c)&&(u=s+1);const _=(u-1)%3+1,m=Math.ceil(u/3);a["Product Id"]=n.getAttribute("data-pid")?n.getAttribute("data-pid"):"",a["Product Name"]=n.getAttribute("data-pname")?n.getAttribute("data-pname"):"",a["Category Name"]=n.getAttribute("data-cat")?n.getAttribute("data-cat"):"",a.MRP=l?parsePrice(l):0,a["Selling Price"]=n.getAttribute("data-sellingprice")?parsePrice(n.getAttribute("data-sellingprice")):0,a["Discount Percent"]=p?Math.round(p):0,a["Discount Price"]=d?parsePrice(d):0,a["Offer Name"]=t||"No Offer",a.Currency="INR",a["Scroll depth"]=m||0,a["Horizontal position"]=_||0,processClientEvent("Product Viewed",a),i._eventId="listing_page_product_viewed",i.product_id=n.getAttribute("data-pid")?n.getAttribute("data-pid"):"",i.product_name=n.getAttribute("data-pname")?n.getAttribute("data-pname"):"",i.category_name=n.getAttribute("data-cat")?n.getAttribute("data-cat"):"",i.mrp=l?parsePrice(l):0,i.selling_price=n.getAttribute("data-sellingprice")?parsePrice(n.getAttribute("data-sellingprice")):0,i.discount_percent=p?Math.round(p):0,i.discount_price=d?parsePrice(d):0,i.offer_name=t||"No Offer",i.currency="INR",i.scroll_depth=m||0,i.horizontal_position=_||0,processServerEvent(i),r.add(o)}t.delete(o)},500);t.set(o,e)}}else t.has(o)&&(clearTimeout(t.get(o)),t.delete(o))})},e),o=document.querySelectorAll("#product_list_ui > li[data-pid]");
64o&&o.forEach(e=>n.observe(e));const a=document.getElementById("product_list_ui");if(a){const e={childList:!0};new MutationObserver(e=>{e.forEach(e=>{"childList"===e.type&&e.addedNodes.forEach(e=>{1===e.nodeType&&e.hasAttribute("data-pid")&&n.observe(e)})})}).observe(a,e)}}()),$(".three-column-browse .pd-gray-bg").click(function(){let e=$(this).parents(".three-column-browse").data("pid"),t=$(this).parents(".three-column-browse").data("cat"),r=$(this).parents(".three-column-browse").data("pname"),n=($(this).parents(".three-column-browse").data("position"),$(this).find(".strike-price").data("price")||$(this).find(".new-price").data("price")),o=$(this).find(".offers-wrapper").text().trim(),a=$(this).find(".new-price").text().trim(),i={_eventId:"plp_product_clicked"};i.product_id=e||"",i.product_name=r||"",i.product_category=t||"",i.product_price=n||0,i.product_selling_price=parsePrice(a)||0,i.offer_name=o||"",e&&(setTimeout(function(){trackGA("BsUI","browse_page","plp_product_clicked "+e+" hovered")},500),processServerEvent(i))}),$(".three-column-browse .p-image, .three-column-browse .p-name").click(function(){let e=$(this).parents(".three-column-browse").data("pid"),t=$(this).parents(".three-column-browse").data("cat"),r=$(this).parents(".three-column-browse").data("pname"),n=($(this).parents(".three-column-browse").data("position"),$(this).parents(".pd-gray-bg").find(".strike-price").data("price")||$(this).parents(".pd-gray-bg").find(".new-price").data("price")),o=$(this).parents(".pd-gray-bg").find(".offers-wrapper").text(),a=$(this).parents(".pd-gray-bg").find("#total_quantity_discount_amount_").data("discount"),i=$(this).parents(".pd-gray-bg").find(".new-price").data("price"),c={};c["Product Id"]=e?e+"":"",c["Product Name"]=r||"",c["Category Name"]=t||"",c.MRP=n?parsePrice(n):0,c["Selling Price"]=i?parsePrice(i):0,c.discount=a?parsePrice(a):0,c["Offer Name"]=o||"",c.Currency="INR",processClientEvent("Product Clicked",c)}),hoverEventWithCancelTimer(function(){let e=$(this).parents(".three-column-browse").data("pid"),t=$(this).parents(".three-column-browse").data("cat"),r=$(this).parents(".three-column-browse").data("pname"),n=$(this).parents(".three-column-browse").data("position"),o=$(this).parents(".three-column-browse").find(".strike-price").data("price")||$(this).parents(".three-column-browse").find(".new-price").data("price"),a=$(this).parents(".three-column-browse").find(".offers-wrapper").text(),i=$(this).parents(".three-column-browse").find("#total_quantity_discount_amount_").data("discount");trackGA("BsUI","browse_page","plp_product_wishlist_"+e+"_hovered");let c={_eventId:"plp_product_hovered",button_hovered:"wishlist"};c.product_id=e,c.product_category=t,c.product_name=r,c.product_position=n,c.price=parsePrice(o),c.discount=a,c.save_amount=parsePrice(i),processServerEvent(c)},".three-column-browse .wishlist",500),hoverEventWithCancelTimer(function(){let e=$(this).parents(".three-column-browse").data("pid"),t=$(this).parents(".three-column-browse").data("cat"),r=$(this).parents(".three-column-browse").data("pname"),n=$(this).parents(".three-column-browse").data("position"),o=$(this).parents(".three-column-browse").find(".strike-price").data("price")||$(this).parents(".three-column-browse").find(".new-price").data("price"),a=$(this).parents(".three-column-browse").find(".offers-wrapper").text(),i=$(this).parents(".three-column-browse").find("#total_quantity_discount_amount_").data("discount");trackGA("BsUI","browse_page","plp_product_tahbtn_"+e+"_hovered");let c={_eventId:"plp_product_hovered",button_hovered:"try_at_home"};c.product_id=e,c.product_category=t,c.product_name=r,c.product_position=n,c.price=parsePrice(o),c.discount=a,c.save_amount=parsePrice(i),processServerEvent(c)},".homeTryOnBrowseButton.tah-btn",500),hoverEventWithCancelTimer(function(){let e=$(this).parents(".three-column-browse").data("pid"),t=$(this).parents(".three-column-browse").data("cat"),r=$(this).parents(".three-column-browse").data("pname"),n=$(this).parents(".three-column-browse").data("position"),o=$(this).parents(".three-column-browse").find(".strike-price").data("price")||$(this).parents(".three-column-browse").find(".new-price").data("price"),a=$(this).parents(".three-column-browse").find(".offers-wrapper").text(),i=$(this).parents(".three-column-browse").find("#total_quantity_discount_amount_").data("discount");trackGA("BsUI","browse_page","plp_product_videocall_"+e+"_hovered");let c={_eventId:"plp_product_hovered",button_hovered:"video_call"};c.product_id=e,c.product_category=t,c.product_name=r,c.product_position=n,c.price=parsePrice(o),c.discount=a,c.save_amount=parsePrice(i),processServerEvent(c)},".homeTryOnBrowseButton.video-btn",500),hoverEventWithCancelTimer(function(){let e=$(this).parents(".three-column-browse").data("pid"),t=$(this).parents(".three-column-browse").data("cat"),r=$(this).parents(".three-column-browse").data("pname"),n=$(this).parents(".three-column-browse").data("position"),o=$(this).parents(".three-column-browse").find(".strike-price").data("price")||$(this).parents(".three-column-browse").find(".new-price").data("price"),a=$(this).parents(".three-column-browse").find(".offers-wrapper").text(),i=$(this).parents(".three-column-browse").find("#total_quantity_discount_amount_").data("discount");trackGA("BsUI","browse_page","plp_product_playbtn_"+e+"_hovered");let c={_eventId:"plp_product_hovered",button_hovered:"play_button"};c.product_id=e,c.product_category=t,c.product_name=r,c.product_position=n,c.price=parsePrice(o),c.discount=a,c.save_amount=parsePrice(i),processServerEvent(c)},".bvideo-icon2",500),$(".three-column-browse .wishlist").click(function(){let e=$(this).parents(".three-column-browse").data("pid");$(this).parents(".three-column-browse").data("cat"),$(this).parents(".three-column-browse").data("pname"),$(this).parents(".three-column-browse").data("position"),$(this).parents(".three-column-browse").find(".strike-price").data("price")||$(this).parents(".three-column-browse").find(".new-price").data("price"),$(this).parents(".three-column-browse").find(".offers-wrapper").text(),$(this).parents(".three-column-browse").find("#total_quantity_discount_amount_").data("discount");trackGA("BsUI","browse_page","plp_product_wishlist_"+e+"_clicked")}),$(".homeTryOnBrowseButton.video-btn").click(function(){let e=$(this).parents(".three-column-browse").data("pid"),t=$(this).parents(".three-column-browse").data("cat"),r=$(this).parents(".three-column-browse").data("pname"),n=($(this).parents(".three-column-browse").data("position"),$(this).parents(".three-column-browse").find(".strike-price").data("price")||$(this).parents(".three-column-browse").find(".new-price").data("price")),o=$(this).parents(".three-column-browse").data("sellingprice"),a=$(this).parents(".three-column-browse").find(".offers-wrapper").text(),i=$(this).parents(".three-column-browse").find("#total_quantity_discount_amount_").data("discount");trackGA("BsUI","browse_page","plp_product_videocall_"+e+"_clicked");let c={};c["Product Id"]=e?e+"":"",c["Product Name"]=r||"",c["Category Name"]=t||"",c.MRP=n?parsePrice(n):0,c["Selling Price"]=o?parsePrice(o):0,c["Offer Name"]=a||"",c.Discount=i||0,c.Currency="INR",c["Error Flag"]=parsePrice(activeVideoCallCount)===parsePrice(videoCallTahMaxDesigns)?"Cart can have maximum 10 items! Please remove additional products or move to wishlist.":"",processClientEvent("Added to Video Call Cart",c)}),$(".bvideo-icon2").click(function(){let e=$(this).parents(".three-column-browse").data("pid");$(this).parents(".three-column-browse").data("cat"),$(this).parents(".three-column-browse").data("pname"),$(this).parents(".three-column-browse").data("position"),$(this).parents(".three-column-browse").find(".strike-price").data("price")||$(this).parents(".three-column-browse").find(".new-price").data("price"),$(this).parents(".three-column-browse").find(".offers-wrapper").text(),$(this).parents(".three-column-browse").find("#total_quantity_discount_amount_").data("discount");trackGA("BsUI","browse_page","plp_product_playbtn_"+e+"_clicked")}),$(".filter-block .filter-item").click(function(e){let t=$(this).data("tagcategory"),r=$(this).data("displayname");trackGA("BsUI","browse_page","plp_customise_filter "+t+" - "+r+" clicked"),applyFilterEvent("Filter Applied",getSelectedFiltersObj(".filter-block .block",e))}),$("#scrollTop a").click(function(){trackGA("BsUI","browse_page","plp_scroll_to_top_button_clicked")}),$("body").on("click","#fc_frame",function(){trackGA("BsUI","browse_page","plp_chat_icon_clicked")}),$("body").on("click",".tah-link",function(){trackGA("BsUI","browse_page","plp_book_appointment_clicked")}),$("body").on("click",".tah-sticky-wrapper .icon-close",function(){trackGA("BsUI","browse_page","plp_book_appointment_clicked")}),$("body").on("click",".tah-vc-link",function(){trackGA("BsUI","browse_page","plp_book_videocall_clicked"),processClientEvent("Video Call Cart CTA clicked",{})}),$("body").on("click",".tah-vc-sticky-wrapper .icon-close",function(){trackGA("BsUI","browse_page","plp_book_videocall_clicked")}),"home"===PAGE_TYPE){const onIntersectionHome=(e,t)=>
64{e.forEach(e=>{if(e.isIntersecting){let t={};n&&n.forEach((r,n)=>{e.target===r&&(t._eventId="bs_homepage_offer_banner_viewed",t.banner_name=e.target.querySelector("a")&&e.target.querySelector("a").querySelector("img")&&e.target.querySelector("a").querySelector("img").getAttribute("alt"))}),e.target===o&&(t._eventId="bs_homepage_gms_banner_viewed",t.gms_banner_type="strip_banner"),e.target===a&&(t._eventId="bs_homepage_gms_banner_viewed",t.gms_banner_type="bottom_banner"),e.target===i&&(t._eventId="bs_homepage_category_section_viewed"),e.target===c&&(t._eventId="bs_homepage_collection_section_viewed"),e.target===s&&(t._eventId="bs_homepage_trending_section_viewed"),e.target===d&&(t._eventId="bs_homepage_gift_card_viewed"),e.target===l&&(t._eventId="bs_homepage_design_led_jewellery_viewed"),e.target===p&&(t._eventId="bs_hompage_YTvideosection_viewed"),u&&u.forEach((r,n)=>{e.target===r&&(t._eventId="bs_homepage_reelssection_viewed",t.reel_category=r.querySelector("a")&&r.querySelector("a").dataset.eventname,t.product_name=r.querySelector("a")&&r.querySelector("a").getAttribute("href"))}),_&&_.forEach((r,n)=>{e.target===r&&(t._eventId="bs_homepage_clipcard_viewed",t.card_id=r.querySelector(".clip-card-title").textContent,t.product_name=r.querySelector(".clip-card-image").querySelector("img").getAttribute("alt"))}),e.target===m&&(t._eventId="bs_homepage_editorial_section_viewed"),e.target===h&&(t._eventId="bs_homepage_store_locator_viewed"),e.target===b&&(t._eventId="bs_homepage_bluestone_promise_viewed"),e.target===v&&(t._eventId="bs_homepage_newsection_viewed "),processServerEvent(t),webengageObserverHome&&webengageObserverHome.unobserve(e.target)}})};webengageObserverHome=new IntersectionObserver(onIntersectionHome,{root:null,threshold:.6});const e=document.querySelector(".bg-banner-section");e&&webengageObserverHome.observe(e);const t=document.querySelector(".carousel-section");t&&webengageObserverHome.observe(t);const r=document.querySelector(".spotlight-section");r&&webengageObserverHome.observe(r);const n=document.querySelectorAll(".carousel-section .swiper-slide");n&&n.forEach((e,t)=>{webengageObserverHome.observe(e)});const o=document.querySelector(".strip-section");o&&webengageObserverHome.observe(o);const a=document.querySelector(".static-banner-section")[0];a&&webengageObserverHome.observe(a);const i=document.querySelector(".square-menu-section");i&&webengageObserverHome.observe(i);const c=document.querySelector(".collection-section");c&&webengageObserverHome.observe(c);const s=document.querySelector(".trending-section");s&&webengageObserverHome.observe(s);const d=document.querySelector(".giftcard-section");d&&webengageObserverHome.observe(d);const l=document.querySelector(".round-menu-image-section");l&&webengageObserverHome.observe(l);const p=document.querySelector(".video-section");p&&webengageObserverHome.observe(p);const u=document.querySelectorAll(".reels-section .collection-item");u&&u.forEach((e,t)=>{webengageObserverHome.observe(e)});const _=document.querySelectorAll(".clip-cards-section .clip-card");_&&_.forEach((e,t)=>{webengageObserverHome.observe(e)});const m=document.querySelector(".editorial-section");m&&webengageObserverHome.observe(m);const h=document.querySelectorAll(".static-banner-section")[1];h&&webengageObserverHome.observe(h);const b=document.querySelector(".round-icon-section");b&&webengageObserverHome.observe(b);const v=document.querySelector(".info-card-section");v&&webengageObserverHome.observe(v)}if("goldmine"===PAGE_TYPE){let e={_eventId:"gmp_page_viewed"};trackGA("BsUI","Gold Mine Page","gmp_page_viewed"),processServerEvent(e);const t="#goldmineForm #gmsStart";hoverEventWithCancelTimer(function(){let e={_eventId:"gmp_start_now_hovered"};trackGA("BsUI","Gold Mine Page","gmp_start_now_hovered"),processServerEvent(e)},t,500),$(t).click(function(){let e={_eventId:"gmp_start_now_clicked"};e.monthly_amount_entered=sanitizeInput($("#goldmineForm #amount").val(),"number"),e.email_id_entered=sanitizeInput($("#goldmineForm #Email").val(),"email"),trackGA("NewHome","Clicked","gmp_start_now_clicked"),processServerEvent(e)});const r=".gms-click-to-pay";hoverEventWithCancelTimer(function(){let e={_eventId:"gmp_click_to_pay_hovered"};trackGA("BsUI","Gold Mine Page","gmp_click_to_pay_hovered"),processServerEvent(e)},r,500),$(r).click(function(){let e={_eventId:"gmp_click_to_pay_clicked"};trackGA("NewHome","Clicked","gmp_start_now_clicked"),processServerEvent(e)}),$("#gmsNonLoggedInLpSubmit").click(function(){let e={_eventId:"gmp_click_to_pay_clicked",button_clicked:"get_details"};e.gold_mine_plan_id=sanitizeInput($("#gmsPlanID").val(),"planid"),trackGA("NewHome","Clicked","gmp_btn_clicked_get_details"),processServerEvent(e)});const n=".calculator-btn";hoverEventWithCancelTimer(function(){let e={_eventId:"gmp_check_button_hovered"};trackGA("BsUI","Gold Mine Page","gmp_check_button_hovered"),processServerEvent(e)},n,500),$(n).click(function(){let e={_eventId:"gmp_check_button_clicked"};e.monthly_amount_entered=sanitizeInput($("#gms_calc").val(),"number"),trackGA("NewHome","Clicked","gmp_check_button_clicked"),processServerEvent(e)}),$("#rangeSlider").on("change",function(){let e={_eventId:"gmp_slide_bar_clicked"};e.monthly_amount_entered=sanitizeInput($(this).val(),"number"),trackGA("NewHome","Clicked","gmp_slide_bar_clicked"),processServerEvent(e)})}if("collections"===PAGE_TYPE&&trackGA("BsUI","Gold Mine Page","allcoll_page_viewed"),"browsingHistory"===PAGE_TYPE){let e=parseInt($(".total-designs").text())||0;processClientEvent("Recently Viewed Page Viewed",{"Recently Viewed Item Count":e}),setTimeout(function(){facebookRecentlyViewedOpened()},1e3)}}),$("body").on("click",".middle-filters .store",function(){let e=$("#browsePincodeValue").text(),t={};t["Pincode Value"]=e,processClientEvent("Designs In Store Button Clicked",t)});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.