webpackJsonp([30],{1336:function(e,n,t){"use strict";function a(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function i(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!==typeof n&&"function"!==typeof n?e:n}function r(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(n,"__esModule",{value:!0});var o=t(3),l=t.n(o),c=t(341),s=(t.n(c),t(342)),u=t(343),m=(t.n(u),t(1642)),h=function(){function e(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(n,t,a){return t&&e(n.prototype,t),a&&e(n,a),n}}(),d=function(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(['\n        {\n      entries(section:landingPage, slug:"realtor-','"){\n        ...on LandingPageRealtor{\n          id\n          title\n          heading\n          description{\n            content\n          }\n          image {\n            filename\n          }\n          realtor2Or3Toggle\n          realtorRich1{\n            content\n          }\n          realtorRich2{\n            content\n          }\n          metaTitle\n          metaDescription\n          metaImage{\n            url\n          }\n          realtorBlocks{\n            heading\n            description {\n              content\n            }\n            linkText\n            linksTo\n          }\n        }\n    }\n    globals{\n        landingPageNav{\n          outboundLink\n          description {\n            content\n          }\n        }\n    }\n}\n    '],['\n        {\n      entries(section:landingPage, slug:"realtor-','"){\n        ...on LandingPageRealtor{\n          id\n          title\n          heading\n          description{\n            content\n          }\n          image {\n            filename\n          }\n          realtor2Or3Toggle\n          realtorRich1{\n            content\n          }\n          realtorRich2{\n            content\n          }\n          metaTitle\n          metaDescription\n          metaImage{\n            url\n          }\n          realtorBlocks{\n            heading\n            description {\n              content\n            }\n            linkText\n            linksTo\n          }\n        }\n    }\n    globals{\n        landingPageNav{\n          outboundLink\n          description {\n            content\n          }\n        }\n    }\n}\n    ']),p=function(e){function n(e){a(this,n);var t=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.state={},t}return r(n,e),h(n,[{key:"render",value:function(){var e=this,n=Object(s.b)(d,this.props.slug),t=l.a.Fragment;return l.a.createElement("div",{className:"offsetNav"},l.a.createElement("div",{className:"landing-page pb-6"},l.a.createElement(u.Query,{query:n},function(n){var a=n.loading,i=n.error,r=n.data;return a?"":i?"":l.a.createElement("div",null,r.entries?l.a.createElement("div",null,l.a.createElement(m.a,{isRealtor:!0,data:r.globals,showHours:!0}),l.a.createElement(c.Helmet,null,l.a.createElement("meta",{name:"title",content:r.entries[0].metaTitle}),l.a.createElement("meta",{name:"description",content:r.entries[0].metaDescription}),l.a.createElement("meta",{name:"image",content:"https://s3-us-west-2.amazonaws.com/solarity-website-20180924123425848200000001/img/"+r.entries[0].metaImage.url}),l.a.createElement("meta",{property:"og:title",content:r.entries[0].metaTitle}),l.a.createElement("meta",{property:"og:description",content:r.entries[0].metaDescription}),l.a.createElement("meta",{property:"og:image",content:"https://s3-us-west-2.amazonaws.com/solarity-website-20180924123425848200000001/img/"+r.entries[0].metaImage.url}),l.a.createElement("script",{type:"text/javascript"},"\n                            console.log('preventing default script..');\n                            $('.mix-button-1').on('click', function(event){\n                              event.preventDefault();\n                              console.log('test default prevented');\n                              console.log('logging click');\n                              var link = $(this).attr('href');\n                              var text = $(this).text();\n\n                              mixpanel.track(\n                                  \"Link clicked then followed - LP\",\n                                  {\n                                    \"page\": \""+e.props.slug+'",\n                                    "link url": link,\n                                    "button text": text,\n                                  }\n                              );\n                              window.location = link;\n\n\n                            });\n\n                          ')),l.a.createElement("div",{className:"landing-page-hero",style:{backgroundImage:'url("https://s3-us-west-2.amazonaws.com/solarity-website-20180924123425848200000001/img/'+r.entries[0].image[0].filename+'")'}},r.entries[0].realtor2Or3Toggle?l.a.createElement("div",{className:"grid full-width landing-top-offset pb-4"},l.a.createElement("div",{className:"grid1of1"},l.a.createElement(t,null,l.a.createElement("div",{className:"fontSize0 richText white z-helper",dangerouslySetInnerHTML:{__html:r.entries[0].description.content}}))),l.a.createElement("div",{className:"grid1of2"},l.a.createElement(t,null,l.a.createElement("div",{className:"fontSize0 richText white z-helper",dangerouslySetInnerHTML:{__html:r.entries[0].realtorRich1.content}}))),l.a.createElement("div",{className:"grid1of2"},l.a.createElement(t,null,l.a.createElement("div",{className:"fontSize0 richText white z-helper",dangerouslySetInnerHTML:{__html:r.entries[0].realtorRich2.content}})))):l.a.createElement("div",{className:"grid full-width landing-top-offset"},l.a.createElement("div",{className:"grid1of2"},l.a.createElement(t,null,l.a.createElement("div",{className:"fontSize0 richText white z-helper",dangerouslySetInnerHTML:{__html:r.entries[0].description.content}}))),l.a.createElement("div",{className:"grid1of2"},l.a.createElement(t,null,l.a.createElement("div",{className:"fontSize0 richText white z-helper",dangerouslySetInnerHTML:{__html:r.entries[0].realtorRich1.content}}))))),l.a.createElement("div",{className:"container--md stripe_3 clearfix pb-6"},l.a.createElement(c.Helmet,null,l.a.createElement("script",{type:"text/javascript"},"\n\n                              function updateViewportDimensions() {\n                                var w=window,d=document,e=d.documentElement,g=d.getElementsByTagName('body')[0],x=w.innerWidth||e.clientWidth||g.clientWidth,y=w.innerHeight||e.clientHeight||g.clientHeight;\n                                return { width:x,height:y };\n                              }\n                              // setting the viewport width\n                              var viewport = updateViewportDimensions();\n\n\n\n                              var waitForFinalEvent = (function () {\n                                var timers = {};\n                                return function (callback, ms, uniqueId) {\n                                  if (!uniqueId) { uniqueId = \"Don't call this twice without a uniqueId\"; }\n                                  if (timers[uniqueId]) { clearTimeout (timers[uniqueId]); }\n                                  timers[uniqueId] = setTimeout(callback, ms);\n                                };\n                              })();\n\n                              // how long to wait before deciding the resize has stopped, in ms. Around 50-100 should work ok.\n                              var timeToWaitForLast = 100;\n\n                              $(window).resize(function () {\n\n                                  // if we're on the home page, we wait the set amount (in function above) then fire the function\n                                  waitForFinalEvent( function() {\n\n                                // update the viewport, in case the window size has changed\n                                viewport = updateViewportDimensions();\n\n                                // change the selector and the max width\n                                thereCanBeOnlyOneHeight('.match-h2-height',0);\n                                  thereCanBeOnlyOneHeight('.match-desc-height',0);\n\n\n\n                                  }, timeToWaitForLast, \"resize-id\");\n                              });\n\n                              // onload\n                              $(function(){\n                                // change the selector and the max width\n                                thereCanBeOnlyOneHeight('.match-h2-height',0);\n                                  thereCanBeOnlyOneHeight('.match-desc-height',0);\n\n                              });\n\n                              function thereCanBeOnlyOneHeight(these,max){\n                                  var the_one = 0;\n                              //    console.log(max);\n                                  $(these).each(function(){\n                                     $(this).css('height', 'auto');\n                                      if(viewport.width > max){\n                                          the_one = $(this).height() > the_one ? $(this).height() : the_one;\n                                      }\n                                  });\n                                  if(viewport.width > max){\n                                      $(these).each(function(){\n                                          $(this).height(the_one + 20);\n                                      });\n                                  }\n                              }\n\n                            ")),l.a.createElement("div",{className:"grid1of2 clearfix pb-4"},l.a.createElement("div",{className:"inner_2 clearfix"},l.a.createElement("h2",{className:"match-h2-height"},r.entries[0].realtorBlocks[0].heading),l.a.createElement(t,null,l.a.createElement("div",{className:"fontSize0 richText match-desc-height",dangerouslySetInnerHTML:{__html:r.entries[0].realtorBlocks[0].description.content}})),l.a.createElement("a",{className:"button button-primary mix-button-1",href:r.entries[0].realtorBlocks[0].linksTo},r.entries[0].realtorBlocks[0].linkText))),l.a.createElement("div",{className:"grid1of2 clearfix pb-4"},l.a.createElement("div",{className:"inner_2 clearfix"},l.a.createElement("h2",{className:"match-h2-height"},r.entries[0].realtorBlocks[1].heading),l.a.createElement(t,null,l.a.createElement("div",{className:"fontSize0 richText match-desc-height",dangerouslySetInnerHTML:{__html:r.entries[0].realtorBlocks[1].description.content}})),l.a.createElement("a",{className:"button button-primary mix-button-1",href:r.entries[0].realtorBlocks[1].linksTo},r.entries[0].realtorBlocks[1].linkText))))):"")})))}}]),n}(o.Component);n.default=p},1642:function(e,n,t){"use strict";function a(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function i(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!==typeof n&&"function"!==typeof n?e:n}function r(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}var o=t(3),l=t.n(o),c=t(341),s=(t.n(c),t(163)),u=t.n(s),m=function(){function e(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(n,t,a){return t&&e(n.prototype,t),a&&e(n,a),n}}(),h=function(e){function n(e){a(this,n);var t=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.anchorClick=t.anchorClick.bind(t),t}return r(n,e),m(n,[{key:"componentDidMount",value:function(){u.a.init("d96d9f1409ced72777048f912ef7591e")}},{key:"anchorClick",value:function(){this.props.handleClickScrollRates(),u.a.track("Scroll Rates Calculator Button - LP",{})}},{key:"render",value:function(){var e=this,n=this.props.data.landingPageNav;return l.a.createElement("div",{role:"navigation"},l.a.createElement("header",{className:"landing-nav clearfix"},l.a.createElement("div",{className:"grid"},l.a.createElement(c.Helmet,null,l.a.createElement("script",{type:"text/javascript"},"\n              //console.log('preventing default script..');\n              $('.landing-nav-home').on('click', function(event){\n                \n                //console.log('test default prevented');\n                //console.log('logging click');\n                var link = $(this).attr('href');\n                var text = $(this).text();\n                \n                mixpanel.track(\n                    \"Landing page home clicked - LP\",\n                    {\n                      \"link url\": link,\n                      \"button text\": text,\n                      \"usedCalculator\": \""+this.props.usedCalc+'",\n                      "clickedScrollRates": "'+this.props.clickedScrollRates+'"\n                    }\n                );\n                \n                \n                \n              });\n              \n            ')),l.a.createElement("a",{className:"landing-nav-home inline-block pull-left",target:"_blank",href:"https://www.solaritycu.org/"+this.props.queryString},l.a.createElement("img",{className:"logo pt-2",src:"/img/logo.svg",alt:"Solarity Logo"})),!0===this.props.isRealtor?"":l.a.createElement("a",{className:"button button-primary inline-block mt-2 pull-right",onClick:function(){return e.anchorClick()},href:"#calc"},"Calculate Your Rate"),this.props.showHours?l.a.createElement("div",{className:"inline-block pull-right pt-2"},l.a.createElement("div",null,l.a.createElement(c.Helmet,null,l.a.createElement("script",{type:"text/javascript"},"\n                  //console.log('preventing default script..');\n                  $('.landing-nav-phone').on('click', function(event){\n                    event.preventDefault();\n                    //console.log('test default prevented');\n                    //console.log('logging click');\n                    var link = $(this).attr('href');\n                    var text = $(this).text();\n                    \n                    mixpanel.track(\n                        \"Landing page contact phone clicked - LP\",\n                        {\n                          \"link url\": link,\n                          \"button text\": text,\n                          \"usedCalculator\": \""+this.props.usedCalc+'",\n                          "clickedScrollRates": "'+this.props.clickedScrollRates+'"\n                        }\n                    );\n                    window.location = link;\n                    \n                    \n                  });\n                  \n                ')),l.a.createElement("a",{className:"colorBrandSecondary fontSize2 fontMedium pb-1 landing-nav-phone",href:"tel:"+n.outboundLink},n.outboundLink)),l.a.createElement("div",{className:"pb-1 realtor-hours-override",dangerouslySetInnerHTML:{__html:n.description.content}})):"")))}}]),n}(o.Component);n.a=h}});
//# sourceMappingURL=30.7053faa2.chunk.js.map