!function(e){var t={};function n(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};e[o].call(s.exports,s,s.exports,n);s.l=!0;return s.exports}n.m=e;n.c=t;n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})};n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})};n.t=function(e,t){1&t&&(e=n(e));if(8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);n.r(o);Object.defineProperty(o,"default",{enumerable:!0,value:e});if(2&t&&"string"!=typeof e)for(var s in e)n.d(o,s,function(t){return e[t]}.bind(null,s));return o};n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};n.d(t,"a",t);return t};n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};n.p="//static.hsappstatic.net/HubspotToolsMenu/static-1.143/";n(n.s=3)}([function(e,t){e.exports="//static.hsappstatic.net/HubspotToolsMenu/static-1.143/js/sprocket_white.svg"},function(e,t){e.exports="//static.hsappstatic.net/HubspotToolsMenu/static-1.143/js/sprocket_orange.svg"},function(e,t){e.exports="//static.hsappstatic.net/HubspotToolsMenu/static-1.143/css/toolsmenu.css"},function(e,t,n){"use strict";n.r(t);const o="HS_SPROCKET_MENU_LOCAL_OVERRIDE",s="https://local.hsappstatic.net/HubspotToolsMenu/static/js/index.js",i=()=>Array.from(document.body.getElementsByTagName("script")).some(e=>e.src===s),r=()=>!(!window.localStorage.getItem(o)&&1)&&!i(),a=()=>{const e=document.createElement("script");e.src=s;e.onload=()=>{setTimeout(()=>{const e=new Event("DOMContentLoaded");document.dispatchEvent(e)},100)};document.body.appendChild(e)};r()&&a();var l=n(0),c=n.n(l),d=n(1),p=n.n(d),u=n(2),h=n.n(u);class m{constructor(e){this.baseUrl=this.getHsBaseUrl(e.app_hs_base_url);this.cpBaseUrl=this.getHsBaseUrl(e.cp_hs_base_url);this.contentId=e.dynamic_page_id&&"0"!==e.dynamic_page_id&&"null"!==e.dynamic_page_id?e.dynamic_page_id:e.page_id;this.categoryId=e.category_id;this.contentGroupId=e.content_group_id;this.portalId=e.portal_id;this.environments={PRODUCTION:1,STAGING:2};this.isCustomerPortal=!0===e.is_customer_portal;this.cmsEnvironment=this.getCmsEnvironmentFromCookie();this.permissionObj={}}getHsBaseUrl(e){return window.localStorage.getItem("HS_LOCAL_TESTING")?e.replace(/[^/](\w+?)(?=\.)/,"local"):e}createElementFromHTML(e){const t=document.createElement("div");t.innerHTML=e.trim();return t.firstChild}jsonp(e,t){window.jsonpHandler=e=>{t(e)};const n=`${e}${-1!==e.indexOf("?")?"&":"?"}callback=jsonpHandler`,o=document.createElement("script");o.type="text/javascript";o.referrerPolicy="no-referrer-when-downgrade";o.async=!0;o.src=n;document.getElementsByTagName("head")[0].appendChild(o)}httpGet(e,t){const n=new XMLHttpRequest;n.withCredentials=!0;n.onreadystatechange=function(){4===this.readyState&&200===this.status&&t(JSON.parse(this.responseText))};n.open("GET",e,!0);n.send()}showToolsMenuIfAuthor(){if(window.location!==window.parent.location)return;if(-1!==window.location.pathname.indexOf("_hcms/preview/template"))return;let e,t=this.contentId,n=!1;if(this.isCustomerPortal)e="customer-portal";else if(window.location.pathname.endsWith("_hcms/mem/login"))e="content-membership";else if(this.contentId&&this.contentGroupId)e=7===this.categoryId?"blog-listing-pages":6===this.categoryId?"knowledge-articles":"blog-posts";else if(this.contentGroupId){e=6===this.categoryId?"knowledge-bases":"blogs";t=this.contentGroupId}else{n=!0;e="landing-pages"}const o=`${this.baseUrl}/content-tools-menu/api/v1/tools-menu/has-permission?portalId=${this.portalId}`;this.jsonp(o,o=>{if(o.has_permission){const o=`${this.cpBaseUrl}/content-tools-menu/api/v1/tools-menu/permissions?portalId=${this.portalId}`;this.httpGet(o,o=>{this.permissionObj=o;"content-membership"===e?this.getContentMembershipCookie(e,this.portalId):this.getAppLinks(e,t,this.portalId);n&&this.setupDeferredPrefetchingOfEditorAssets(e)})}})}getContentMembershipCookie(e,t){this.jsonp(`${this.baseUrl}/content-tools-menu/api/v1/content/validate-hubspot-user?redirect_url=${window.location.href}&portalId=${t}`,e=>{if(e&&e.verified){const t=this.getUrlParameter("redirect_url");window.location.href=t||e.redirectUrl||window.location.origin}})}getAppLinks(e,t,n){this.jsonp(`${this.baseUrl}/content-tools-menu/api/v1/tools-menu/${e}/${t}/actions?portalId=${n}`,e=>{e.actions&&e.strings&&this.showAppLinks(e.actions,e.strings)})}showAppLinks(e,t){const n=[].slice.call(document.querySelectorAll("[data-menu-id]")).filter(e=>!!e.getAttribute("data-menu-id").trim()),o=n.length>0?n[0]:null;if(null!==o){const n=o.getAttribute("data-menu-id").trim();e.push([t.EDIT_NAVIGATION_MENU,`${this.baseUrl}/menus/${this.portalId}/edit/${n}`])}let s="";e.forEach(e=>{s+=`