/*! For license information please see app.js.LICENSE.txt */ (()=>{var e,t={410:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var n=0;ns});var a,l,c,s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,i=[{key:"get",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.checkInit(),r(e._props[t])?e._props[t]:(null!==n&&(e._props[t]=n),n)}},{key:"has",value:function(t){return e._props&&void 0!==e._props[t]}},{key:"set",value:function(t,n){e.checkInit(),e._props[t]=n}},{key:"increment",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.checkInit(),void 0===e._props[t]?(e._props[t]=n,n):"number"==typeof e._props[t]?++e._props[t]:-1}},{key:"checkInit",value:function(){e._props||(e._props={})}}],(n=null)&&o(t.prototype,n),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();a=s,c=void 0,(l=i(l="_props"))in a?Object.defineProperty(a,l,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[l]=c},553:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var n=0;n10&&clearInterval(r)}),250)}},{key:"setRun",value:function(){var e=window.innerWidth,t=this.defs,n=t.startAt,r=t.endAt;this.defs.vW=e,this.defs.runAction=n?vw>=n&&e<=r:e<=r}},{key:"startRun",value:function(){"setheight"===this.defs.action&&this.setHeight()}},{key:"setHeight",value:function(){var e=this.defs,t=e.els,n=e.setHeight,r=e.vW<=767?65:95,o=r;this.$(t).each((function(){r+=this.offsetHeight;var e=i(this).data("wrap-hero-add");e&&(r+=parseInt(e))})),r>o&&this.$(n).css("height",r+"px")}},{key:"extendDefs",value:function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}}])&&o(t.prototype,n),a&&o(t,a),Object.defineProperty(t,"prototype",{writable:!1}),e}(),l=n(464),c=n(884),s=n(622),u=n(400),f=n(769),p=n(232);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defs={wrapper:"pometer",rotateTime:1e3,trigger:document.getElementById("pon-rate"),pos:!1,pVal:0},this.$=jQuery,t instanceof Object&&this.extendDefs(this.defs,arguments[0]),this.dispatcher=u.t.getDispatcher()}var t,n,r;return t=e,n=[{key:"init",value:function(){var e=document.getElementById(this.defs.wrapper);if(this.$(e).length){e.innerHTML='

The Pinch of Nometer

'+(this.defs.pos?"Rated":"Rate this plate")+'
Ponometer arrow
12345
';var t=document.getElementById("pometer-bg");this.rotate(t,1)}}},{key:"rotate",value:function(e,t){var n=this;this.$(e).addClass("blur"),this.$(e).css({WebkitTransform:"rotate("+t+"deg)"}),this.$(e).css({"-moz-transform":"rotate("+t+"deg)"}),t<360&&setTimeout((function(){n.rotate(e,t+2)}),0),t>=360&&(this.$(e).removeClass("blur"),this.showNumbers())}},{key:"showNumbers",value:function(){var e=this;if(document.getElementById("pometer-rating").classList.add("active"),e.allowRate(),e.defs.pos){var t=document.getElementById("pometer-arrow");if(e.defs.pVal){var n="pos-"+e.defs.pVal;t.classList.add(n)}}}},{key:"allowRate",value:function(){for(var e=document.getElementById("pometer-rating"),t=e.getElementsByClassName("rater"),n=document.getElementById("pometer-arrow"),r=document.getElementById("pon-rate").getAttribute("data-recipeid"),o=r?parseInt(r):null,i=this,a=this.dispatcher,l=0;l0&&void 0!==arguments[0]?arguments[0]:{})}}],n&&S(t.prototype,n),r&&S(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),k=n(811);function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function C(e,t){for(var n=0;n6)return console.log("stopWC",t),void e.preventDefault();if(String(parseInt(t)).length===t.length&&t.length>3&&!/[\.]/.test(t))return console.log("stopWoC",t),void e.preventDefault();"backspace"===n&&(t=t.substring(0,t.length-1)),x(this,G,t),L(this,se,ge).call(this)}else e.preventDefault()}function ge(){var e=this.convert(N(this,G));(Number(e)&&!isNaN(e)||(e="",N(this,q).find("sub").length))&&(N(this,q).html(""+e+"Lbs"),N(this,ee).show())}function be(e){var t=M(e.currentTarget),n=t.hasClass("active");N(this,F).removeClass("active"),n||t.addClass("active"),t.get(0)===N(this,K).get(0)?x(this,W,N(this,K)):x(this,W,N(this,Y)),this.selectedInputUnit=N(this,W).text(),L(this,se,ge).call(this)}function we(e){var t=null;t=M(e.currentTarget).hasClass("weight-conv-panel-sendbar-lnk-current")?N(this,B).data("input-current"):N(this,B).data("input-goal"),this.dispatcher.dispatch(p.e.CLICK_WEIGHTCONVERTER_PANEL_SEND_VALUE,{triggerOriginal:N(this,Z),targetInput:t,valueLbs:N(this,U)})}function Se(e){this.dispatcher.dispatch(p.e.CLICK_WEIGHTCONVERTER_PANEL_CLOSE,{triggerOriginal:N(this,Z)})}function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function ke(e,t){for(var n=0;nHERE"),ze[p.e.CLICK_RATE_HINT_GUEST]='Hi! To rate this tip, please login or sign up HERE"),ze[p.e.HINT_RATED]="Thank you for your vote!",ze[p.e.CLICK_RATE_HINT_ALREADY_RATED]="Thank you! You can only rate a Tip once.",ze[p.e.CLICK_FAVE_GUEST]='Hi! To save your favourite recipes and manage your own recipe lists, please login or sign up HERE"),ze[p.e.INITIALZED_POMETER]="Use the “Pinch of Nometer” to rate this recipe.",ze[p.e.CLICK_ADD_RECIPE_DOTS]="Add this recipe to an existing recipe list or create a new one",ze[p.e.CLICK_ADD_RECIPE_DOTS_GUEST]='Hi! To manage your own recipe lists, please login or sign up HERE"),ze[p.e.FORM_SUBMIT_INVALID]="Form cannot yet be submitted. Please check you have completed all fields correctly.",ze[p.e.NEWSLETTER_SUBMITTED]="Yes! You’re in the cool club! We will be in touch soon with news.",ze[p.e.FILTER_MAX_INGREDIENTS_REACHED]="You reached the max amount of items you can select in this list.",ze[p.e.FILTER_SORT_UNAVAILABLE]="No recipes to sort",ze[p.e.BOOK_NOT_OWNED]='Have you got your copy of
Pinch of Nom: Quick & Easy?
Click here to update your preferences.',ze[p.e.CHANGE_PREFS_PHONE]='Please update your `Preferences` with your mobile number if you would like us to contact you with exciting news and recipes via WhatsApp.',ze[p.e.DOWNLOAD_STARTED]="Download starting...",ze[p.e.DOWNLOAD_SUCCESS]="Download complete! Check your downloads folder.",ze[p.e.DOWNLOAD_FAILED]="Download failed. Please try again.",ze[p.e.DOWNLOAD_FAILED_SSL]="Download may have failed due to security settings. Please check your browser's download bar.";var Qe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dispatcher=u.t.getDispatcher(),this.$=jQuery,k.Z.log("DownloadManager initialized"),this.init()}var t,n,r;return t=e,(n=[{key:"init",value:function(){var e=this,t=this.$(".pon-download-trigger");k.Z.log("Found download triggers:",t.length),t.on("click",(function(t){if(k.Z.log("Download button clicked",{element:this,href:e.$(this).attr("href"),attachmentId:e.$(this).data("attachment-id")}),!e.isAjaxSupported())return k.Z.log("AJAX not supported, using fallback"),!0;t.preventDefault(),e.handleDownload(this)}))}},{key:"handleDownload",value:function(e){var t=this.$(e),n=t.data("attachment-id"),r=t.data("nonce"),o=t.attr("href");if(k.Z.log("handleDownload called",{attachmentId:n,nonce:r,directUrl:o,isAjaxSupported:this.isAjaxSupported()}),t.addClass("downloading"),!this.isAjaxSupported())return k.Z.log("Falling back to direct browser download"),this.dispatcher.dispatch(p.e.DOWNLOAD_STARTED,{type:"info"}),setTimeout((function(){t.removeClass("downloading")}),2e3),!0;this.dispatcher.dispatch(p.e.DOWNLOAD_STARTED,{type:"info"}),k.Z.log("Using iframe download method with secure proxy URL"),this.performDownload(o,t)}},{key:"isAjaxSupported",value:function(){return window.XMLHttpRequest&&this.dispatcher&&"function"==typeof this.$.ajax}},{key:"performDownload",value:function(e,t){k.Z.log("performDownload started",{url:e,protocol:window.location.protocol,hostname:window.location.hostname});var n=this.$("