/*! For license information please see main.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(["globals"],e):"object"==typeof exports?exports.masterPage=e():t.masterPage=e()}(this,(function(globals){var $w=globals.$w,$ns=globals.$ns,console=(globals.$wixContext,globals.$widget,globals.console);globals.elementorySupport,globals.generateWebMethodUrl;return function(){"use strict";var t={n:function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},d:function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e);var r=$ns["wix-window"],n=t.n(r),o=$ns["wix-location"],a=t.n(o),i=($ns["wix-search"],$ns["wix-fetch"]),c=t.n(i);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(){l=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,a=Object.create(o.prototype),i=new I(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return k()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=S(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=p(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function y(){}var v={};c(v,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(_([])));g&&g!==e&&r.call(g,o)&&(v=g);var w=y.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,a,i,c){var l=p(t[o],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return n("throw",t,i,c)}))}c(l.arg)}var o;this._invoke=function(t,r){function a(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(a,a):a()}}function S(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=p(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=y,c(w,"constructor",y),c(y,"constructor",d),d.displayName=c(y,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,i,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(x.prototype),c(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new x(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(w),c(w,i,"Generator"),c(w,o,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function s(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function p(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){s(a,n,o,i,c,"next",t)}function c(t){s(a,n,o,i,c,"throw",t)}i(void 0)}))}}return $w.onReady((function(){var t=null,e=0,r=-1;function o(){$w("#vectorImage12").show(),$w("#vectorImage39").hide(),$w("#hedearSearchInput").value="",$w("#searchstrip").collapse(),$w("#autocompleteRepeater").data=[],$w("#autocompleteRepeater").collapse()}function i(){$w("#autocompleteRepeater").forEachItem((function(t,e,n){n==r?(t("#text201").html='<p class="font_7" style="background:#dddddd;padding:10px;font-size:16px;color:#333333;">'+e.query+"</p>",$w("#hedearSearchInput").value=e.query):t("#text201").html='<p class="font_7" style="background:#F5C24F;padding:10px;font-size:16px;color:#333333;">'+e.query+"</p>"}))}function u(){if($w("#hedearSearchInput").value.length>0&&$w("#hedearSearchInput").value.trim().length>0){var t=$w("#hedearSearchInput").value.trim();a().to("/all-recipes?search="+encodeURIComponent(t)),o()}}$w("#autocompleteRepeater").onItemReady((function(t,e,n){t("#text201").html='<p class="font_7" style="background:#F5C24F;padding:10px;font-size:16px;color:#333333;">'+e.query+"</p>",t("#container8").onMouseIn((function(t){r=n,i()})),t("#container8").onClick((function(){r=n,i(),u()}))})),$w("#hedearSearchInput").onKeyPress(function(){var n=p(l().mark((function n(o){var a;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:a=o.key,t&&clearTimeout(t),t=setTimeout(p(l().mark((function t(){var n,o;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=a,t.next="Enter"===t.t0?3:"ArrowDown"===t.t0?5:"ArrowUp"===t.t0?7:9;break;case 3:return u(),t.abrupt("break",25);case 5:return $w("#autocompleteRepeater").collapsed||(++r>=$w("#autocompleteRepeater").data.length&&(r=0),i()),t.abrupt("break",25);case 7:return $w("#autocompleteRepeater").collapsed||(--r<0&&(r=$w("#autocompleteRepeater").data.length-1),i()),t.abrupt("break",25);case 9:if(!($w("#hedearSearchInput").value.trim().length>0)){t.next=22;break}return n=$w("#hedearSearchInput").value.trim(),t.next=13,c().fetch("https://"+self.location.hostname+"/_api/search-services-sitesearch/v1/autocomplete/federated",{headers:{accept:"application/json, text/plain, */*","content-type":"application/json",Authorization:self.elementorySupport.options.headers.Authorization},body:JSON.stringify({metaSiteId:"430f7f41-2438-4137-8294-d3602483f258",query:n,limit:4,includeSeoHidden:!1,language:"en"}),method:"POST",mode:"cors",credentials:"include"});case 13:return o=t.sent,t.next=16,o.json();case 16:o=t.sent,console.log(o),(o=o.results.filter((function(t){return"public/blog/posts"==t.documentType}))[0]).values.length>0?(o.values.forEach((function(t,r){t._id=e.toString(),e++})),$w("#autocompleteRepeater").data=o.values,$w("#autocompleteRepeater").expand()):(r=-1,$w("#autocompleteRepeater").data=[],$w("#autocompleteRepeater").collapse()),t.next=25;break;case 22:r=-1,$w("#autocompleteRepeater").data=[],$w("#autocompleteRepeater").collapse();case 25:case"end":return t.stop()}}),t)}))),100);case 3:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()),$w("#"+("Desktop"===n().formFactor?"column55":"mobileBox9")).onClick((function(t){$w("#searchstrip").collapsed?($w("#vectorImage12").hide(),$w("#vectorImage39").show(),$w("#hedearSearchInput").value="",$w("#searchstrip").expand(),$w("#hedearSearchInput").focus()):($w("#vectorImage12").show(),$w("#vectorImage39").hide(),o())}))})),e}()})); //# sourceMappingURL=https://bundler.wix-code.com/430f7f41-2438-4137-8294-d3602483f258/e56214ad-936c-49ed-92cb-426da54a68ee/e1eb1892-7b60-48b4-be03-9b7a4fbca547/pages/masterPage.js.map?get-app-def-id-from-package-name=false&disable-yarn-pnp-mode=false&bundler-traffic-to-aws=false