!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 n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},d:function(e,n){for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},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 n=$ns["wix-location"],o=t.n(n),a=$ns["wix-data"],i=t.n(a),r=($ns["wix-users"],$ns["wix-stores"],$ns["wix-window-frontend"],$ns["wix-window"]),u=t.n(r);$ns["wix-location-frontend"];function l(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,a=function(){};return{s:a,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return r=t.done,t},e:function(t){u=!0,i=t},f:function(){try{r||null==n.return||n.return()}finally{if(u)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}return $w.onReady((function(){var t;t=o().query.lightbox,u().openLightbox(t)})),i().query("Repeaters-CPACDigital").eq("sort1","menu-c4").descending("sortDate").find().then((function(t){t.totalCount>0&&($w("#repeater153").data=t.items,$w("#repeater152").data=t.items),$w("#repeater153").onItemReady((function(t,e,n){t("#button458").link=e.primaryActionButtonUrl,t("#button458").label=e.primaryActionButtonText,t("#button458").target="_self"})),$w("#repeater152").onItemReady((function(t,e,n){t("#button454").link=e.primaryActionButtonUrl,t("#button454").label=e.primaryActionButtonText,t("#button454").target="_self"}))})).catch((function(t){console.log("Query failed: ",t)})),$w.onReady((function(){$w("#c4menu").onClick((function(){$w("#c4menu").collapse(),$w("#box5569").expand(),$w("#box5565").expand(),$w("#c4menuclose").expand()})),$w("#c4menuclose").onClick((function(){$w("#c4menuclose").collapse(),$w("#box5569").collapse(),$w("#box5565").collapse(),$w("#c4menu").expand()}))})),i().query("Foundation-Repeaters").eq("sort","menu-foundation").descending("sortDate").find().then((function(t){t.totalCount>0&&($w("#repeater150").data=t.items,$w("#repeater151").data=t.items),$w("#repeater150").onItemReady((function(t,e,n){t("#button446").link=e.primaryActionButtonUrl,t("#button446").label=e.primaryActionButtonText,t("#button446").target="_self"})),$w("#repeater151").onItemReady((function(t,e,n){t("#button448").link=e.primaryActionButtonUrl,t("#button448").label=e.primaryActionButtonText,t("#button448").target="_self"}))})).catch((function(t){console.log("Query failed: ",t)})),$w.onReady((function(){$w("#cpacfndmenu").onClick((function(){$w("#cpacfndmenu").collapse(),$w("#box5554").expand(),$w("#box5560").expand(),$w("#cpacfndmenuclose").expand()})),$w("#cpacfndmenuclose").onClick((function(){$w("#cpacfndmenuclose").collapse(),$w("#box5554").collapse(),$w("#box5560").collapse(),$w("#cpacfndmenu").expand()}))})),$w.onReady((function(){console.log("Page is ready"),"Mobile"===u().formFactor?(console.log("This is a mobile view"),$w("#box5423").collapse(),$w("#box5461").collapse()):($w("#box5423").expand(),$w("#box5461").expand())})),$w.onReady((function(){console.log("Page is ready"),"Mobile"===u().formFactor?(console.log("This is a mobile view"),$w("#box5472").collapse()):$w("#box5472").expand()})),$w.onReady((function(){$w("#button395").onClick((function(){$w("#button395").collapse(),$w("#box5423").collapse(),$w("#button394").expand()})),$w("#button393").onClick((function(){$w("#button393").collapse(),$w("#section253").expand()})),$w("#button394").onClick((function(){$w("#button394").collapse(),$w("#box5423").expand(),$w("#button395").expand()}))})),$w.onReady((function(){$w("#button444").onClick((function(){$w("#button444").collapse(),$w("#section253").expand()})),$w("#button409").onClick((function(){$w("#button409").collapse(),$w("#box5461").collapse(),$w("#button408").expand()})),$w("#button408").onClick((function(){$w("#button408").collapse(),$w("#box5461").expand(),$w("#button409").expand()}))})),$w.onReady((function(){$w("#button445").onClick((function(){$w("#button445").collapse(),$w("#section253").expand()})),$w("#button416").onClick((function(){$w("#button416").collapse(),$w("#box5472").collapse(),$w("#button415").expand()})),$w("#button415").onClick((function(){$w("#button415").collapse(),$w("#box5472").expand(),$w("#button416").expand()}))})),$w.onReady((function(){$w("#button384").onClick((function(t,$w){$w("#section253").collapse(),$w("#button390").expand(),$w("#button393").expand()})),$w("#button390").onClick((function(t,$w){$w("#section253").expand(),$w("#button390").collapse()}))})),$w.onReady((function(){$w("#button384").onClick((function(t,$w){$w("#section253").collapse(),$w("#button442").expand(),$w("#button444").expand()})),$w("#button442").onClick((function(t,$w){$w("#section253").expand(),$w("#button442").collapse()}))})),$w.onReady((function(){$w("#button384").onClick((function(){$w("#section253").collapse(),$w("#button443").expand(),$w("#button445").expand()})),$w("#button443").onClick((function(){$w("#section253").expand(),$w("#button443").collapse()}))})),$w.onReady((function(){var t;t=new Date,i().query("Repeaters-CPACDigital").eq("sort1","topnews-feature").le("postDate",t).descending("sortDate").find().then((function(e){var n=e.items.filter((function(e){var n=e.removeDate?new Date(e.removeDate):null;return!n||n>=t}));if(n.length>0){var o=n[0];$w("#button124").label="Top News: "+o.primaryTitle+" →",$w("#button124").link=o.primaryActionButtonUrl,$w("#text564").text=o.primaryTitle,$w("#imageX446").src=o.primaryMedia,$w("#text565").text=o.primarySubTitle,$w("#button321").label=o.primaryActionButtonText,$w("#button321").link=o.primaryActionButtonUrl}else console.error("No top news found.")})).catch((function(t){console.error("Query failed: ",t)}))})),$w("#section89").onMouseIn((function(t){$w("#box5224").expand(),$w("#box265").collapse()})),$w("#section89").onMouseOut((function(t){$w("#box5224").collapse(),$w("#box265").expand()})),$w.onReady((function(){i().query("Blog/Posts").limit(5).find().then((function(t){t.totalCount>0&&($w("#repeater119").data=t.items),$w("#repeater119").onItemReady((function(t,e,n){t("#text539").text=e.mainCategory,t("#text538").text=e.title,t("#button287").link="https://www.cpac.org"+e.postPageUrl,t("#button287").target="_self",t("#imageX427").src=e.coverImage,t("#imageX427").fitMode="fill",t("#imageX427").alt="CPAC",t("#imageX427").tooltip="CPAC",t("#imageX427").clickAction="none"}))})),$w("#repeater119").show()})),$w.onReady((function(){i().query("Statements").eq("publish","YES").descending("date1").limit(5).find().then((function(t){t.totalCount>0&&($w("#repeater97").data=t.items),$w("#repeater97").onItemReady((function(t,e,n){t("#text451").text=e.text21,t("#button221").link="https://www.cpac.org/us/statements/"+e.date+"/"+e.pageSlug,t("#button221").label=e.buttonText,t("#button221").target="_self",t("#imageX383").src=e.featuredImage,t("#imageX383").fitMode="fill",t("#imageX383").alt="CPAC",t("#imageX383").tooltip="CPAC",t("#imageX383").clickAction="none"}))})),$w("#repeater97").show()})),$w.onReady((function(){i().query("Repeaters-CPACDigital").eq("primarySubTitle","CPAC Live").descending("sortDate").limit(1).find().then((function(t){t.totalCount>0&&($w("#text543").text=t.items[0].title,$w("#button289").link=t.items[0].primaryActionButtonUrl,$w("#button289").label="Watch Now →")}))})),$w.onReady((function(){i().query("Repeaters-CPACDigital").contains("sort1","cpacpluscpacnow").descending("sortDate").limit(10).find().then((function(t){t.totalCount>0&&($w("#repeater120").data=t.items),$w("#repeater120").onItemReady((function(t,e,n){t("#text545").text=e.primaryTitle,t("#button290").link=e.primaryActionButtonUrl,t("#button290").target="_self",t("#imageX429").src=e.primaryMedia,t("#imageX429").fitMode="fill",t("#imageX429").alt="CPAC",t("#imageX429").tooltip="CPAC",t("#imageX429").clickAction="none"}))})),$w("#repeater119").show()})),$w.onReady((function(){var t;t=new Date,i().query("Repeaters-CPACDigital").contains("sort1","happeningnow").le("postDate",t).descending("sortDate").find().then((function(e){var n,o=[],a=l(e.items);try{for(a.s();!(n=a.n()).done;){var i=n.value,r=i.removeDate?new Date(i.removeDate):null;if((!r||r>=t)&&o.push(i),5===o.length)break}}catch(t){a.e(t)}finally{a.f()}o.length>0&&($w("#repeater96").data=o),$w("#repeater96").onItemReady((function(t,e,n){t("#videoPlayer4").src=e.primaryVideo})),$w("#repeater96").show()})).catch((function(t){console.error("Query failed: ",t)}))})),$w.onReady((function(){var t;t=new Date,i().query("Repeaters-CPACDigital").contains("sort1","47updates").le("postDate",t).descending("sortDate").find().then((function(e){var n,o=[],a=l(e.items);try{for(a.s();!(n=a.n()).done;){var i=n.value,r=i.removeDate?new Date(i.removeDate):null;if((!r||r>=t)&&o.push(i),5===o.length)break}}catch(t){a.e(t)}finally{a.f()}o.length>0&&($w("#repeater161").data=o),$w("#repeater161").onItemReady((function(t,e,n){t("#text718").text=e.primaryTitle,t("#text717").text=e.primarySubTitle,t("#button509").label=e.primaryActionButtonText,t("#button509").link=e.primaryActionButtonUrl})),$w("#repeater161").show()})).catch((function(t){console.error("Query failed: ",t)}))})),$w("#input24").onChange((function(){var t="https://go.cpac.org/l/1034983/2024-04-11/q3lr?email="+$w("#input24").value;$w("#button211").link=t,console.log("CPAC link updated to:",t)})),$w.onReady((function(){function t(t){var e=t.getHours(),n=t.getMinutes(),o=e>=12?"PM":"AM";return(e=(e%=12)||12)+":"+(n=n<10?"0"+n:n)+" "+o}var e=new Date,n=t(e);$w("#text648").text=n,setInterval((function(){e=new Date,n=t(e),$w("#text648").text=n}),6e4)})),$w.onReady((function(){!function(){var t,e="";switch((t=(new Date).getHours())>=6&&t<12?"morning":t>=12&&t<17?"afternoon":t>=17&&t<20?"evening":"night"){case"morning":e="Good Morning, Conservatives!";break;case"afternoon":e="Good Afternoon, Conservatives!";break;case"evening":e="Good Evening, Conservatives!";break;case"night":e="Good Night, Conservatives!"}$w("#text647").text=e}()})),$w.onReady((function(){var t=new Date("2024-11-05T00:00:00Z");function e(){var e=new Date,n=t.getTime()-e.getTime(),o=Math.ceil(n/864e5);$w("#text649").text="".concat(o)}e(),setInterval(e,864e5)})),$w.onReady((function(){var t;t=new Date,i().query("Repeaters-CPACDigital").eq("sort1","topnews-feature").le("postDate",t).descending("sortDate").find().then((function(e){var n=e.items.filter((function(e){var n=e.removeDate?new Date(e.removeDate):null;return!n||n>=t}));if(n.length>0){var o=n[0];$w("#button432").label="Top News: "+o.primaryTitle+" →",$w("#button432").link=o.primaryActionButtonUrl,$w("#text658").text=o.primaryTitle,$w("#imageX492").src=o.primaryMedia,$w("#text657").text=o.primarySubTitle,$w("#button429").label=o.primaryActionButtonText,$w("#button429").link=o.primaryActionButtonUrl}else console.error("No top news found.")})).catch((function(t){console.error("Query failed: ",t)})),$w("#section247").onMouseIn((function(t){$w("#box5527").expand(),$w("#box5528").collapse()})),$w("#section247").onMouseOut((function(t){$w("#box5527").collapse(),$w("#box5528").expand()}))})),$w("#input25").onChange((function(){var t="https://go.conservative.org/l/1034983/2024-04-12/q73n?email="+$w("#input25").value;$w("#button306").link=t,console.log("Conservative link updated to:",t)})),$w.onReady((function(){i().query("Blog/Posts").contains("arraystring","NCJ: CHT: CRF: CLA: CCA: CASM").limit(5).find().then((function(t){t.totalCount>0&&($w("#repeater122").data=t.items),$w("#repeater122").onItemReady((function(t,e,n){t("#text539").text=e.mainCategory,t("#text538").text=e.title,t("#button287").link="https://www.cpac.org"+e.postPageUrl,t("#button287").target="_self",t("#imageX427").src=e.coverImage,t("#imageX427").fitMode="fill",t("#imageX427").alt="CPAC",t("#imageX427").tooltip="CPAC",t("#imageX427").clickAction="none"}))})),$w("#repeater119").show()})),$w.onReady((function(){i().query("Statements").eq("publish","YES").contains("arraystring","NCJ: CHT: CRF: CLA: CCA: CASM").limit(5).find().then((function(t){t.totalCount>0&&($w("#repeater123").data=t.items),$w("#repeater123").onItemReady((function(t,e,n){t("#text451").text=e.text21,t("#button221").link="https://www.cpac.org/us/statements/"+e.date+"/"+e.pageSlug,t("#button221").target="_self",t("#imageX383").src=e.featuredImage,t("#imageX383").fitMode="fill",t("#imageX383").alt="CPAC",t("#imageX383").tooltip="CPAC",t("#imageX383").clickAction="none"}))})),$w("#repeater97").show()})),e}()})); //# sourceMappingURL=https://bundler.wix-code.com/05ddef10-84fd-45b3-b362-3b4bc2189226/61697724-ec4b-4785-8e7f-fce35a993aa7/d536322f-6594-4b04-8a28-4fc414c5e3a3/pages/masterPage.js.map?get-app-def-id-from-package-name=false&disable-yarn-pnp-mode=false&bundler-traffic-to-aws=false