; (self.AMP=self.AMP||[]).push({m:0,v:"2305252018001",n:"amp-social-share",ev:"0.1",l:!0,f:function(t,e){!function(){function e(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function a(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}var r;function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t){return(o="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})(t)}function s(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}var l=Array.isArray,c=Object.prototype;function u(t,e){void 0===e&&(e=t.hasAttribute("hidden")),e?t.removeAttribute("hidden"):t.setAttribute("hidden","")}c.hasOwnProperty,c.toString;var h=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(t)}catch(t){return e}}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var v=self.__AMP_LOG;function m(t,e){throw new Error("failed to call initLogConstructor")}function d(t){return v.user||(v.user=p()),function(t,e){return e&&e.ownerDocument.defaultView!=t}(v.user.win,t)?v.userForEmbed||(v.userForEmbed=p()):v.user}function p(t){return m()}function g(t,e,a,r,n,i,o,s,l,c,u){return t}function b(t,e,a,r,n,i,o,s,l,c,u){return d().assert(t,e,a,r,n,i,o,s,l,c,u)}function w(t,e){return x(t=function(t){return t.__AMP_TOP||(t.__AMP_TOP=t)}(t),e)}function k(t,e){var a,r,n=(a=y(t),(r=y(a)).isSingleDoc()?r.win:r);return L(n,e)?x(n,e):null}function y(t){return t.nodeType?(a=t,e=(a.ownerDocument||a).defaultView,w(e,"ampdoc")).getAmpDoc(t):t;var e,a}function x(t,e){g(L(t,e));var a=function(t){var e=t.__AMP_SERVICES;return e||(e=t.__AMP_SERVICES={}),e}(t)[e];return a.obj||(g(a.ctor),g(a.context),a.obj=new a.ctor(a.context),g(a.obj),a.context=null,a.resolve&&a.resolve(a.obj)),a.obj}function L(t,e){var a=t.__AMP_SERVICES&&t.__AMP_SERVICES[e];return!(!a||!a.ctor)}var O={"twitter":{"shareEndpoint":"https://twitter.com/intent/tweet","defaultParams":{"text":"TITLE","url":"CANONICAL_URL"}},"facebook":{"shareEndpoint":"https://www.facebook.com/dialog/share","defaultParams":{"href":"CANONICAL_URL"}},"pinterest":{"shareEndpoint":"https://www.pinterest.com/pin/create/button/","defaultParams":{"url":"CANONICAL_URL","description":"TITLE"}},"linkedin":{"shareEndpoint":"https://www.linkedin.com/shareArticle","defaultParams":{"url":"CANONICAL_URL","mini":"true"}},"gplus":{"obsolete":!0},"email":{"bindings":["recipient"],"shareEndpoint":"mailto:RECIPIENT","defaultParams":{"subject":"TITLE","body":"CANONICAL_URL","recipient":""}},"tumblr":{"shareEndpoint":"https://www.tumblr.com/share/link","defaultParams":{"name":"TITLE","url":"CANONICAL_URL"}},"whatsapp":{"shareEndpoint":"https://api.whatsapp.com/send","defaultParams":{"text":"TITLE - CANONICAL_URL"}},"line":{"shareEndpoint":"https://social-plugins.line.me/lineit/share","defaultParams":{"text":"TITLE","url":"CANONICAL_URL"}},"sms":{"shareEndpoint":"sms:","defaultParams":{"body":"TITLE - CANONICAL_URL"}},"system":{"shareEndpoint":"navigator-share:","defaultParams":{"text":"TITLE","url":"CANONICAL_URL"}}};new Set(["c","v","a","ad"]);var z="amp-social-share",C=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}(y,t);var o,c,p=(o=y,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=i(o);if(c){var a=i(this).constructor;t=Reflect.construct(e,arguments,a)}else t=e.apply(this,arguments);return s(this,t)});function y(t){var e;return(e=p.call(this,t)).w7=null,e.Ct={},e.Ss=null,e.k7=null,e.h=null,e.y7=null,e}y.prerenderAllowed=function(){return!0};var x=y.prototype;return x.isLayoutSupported=function(){return!0},x.buildCallback=function(){var t=this,e=this.element,a=b(e.getAttribute("type"),"The type attribute is required. %s",e);b(!/\s/.test(a),"Space characters are not allowed in type attribute value. %s",e),this.Ss=w(this.win,"platform");var r="share"in this.win.navigator;if("system"===a){if(!r)return void u(e,!1)}else if(r&&this.win.document.querySelectorAll("amp-social-share[type=system][data-mode=replace]").length)return void u(e,!1);var n=O[a]||{};if(n.obsolete)return u(e,!1),void d().warn(z,"Skipping obsolete share button ".concat(a));this.w7=b(e.getAttribute("data-share-endpoint")||n.shareEndpoint,"The data-share-endpoint attribute is required. %s",e),Object.assign(this.Ct,n.defaultParams,function(t,e,a){var r=t.dataset,n={},i=/^param(.+)/;for(var o in r){var s=o.match(i);s&&(n[s[1][0].toLowerCase()+s[1].substr(1)]=r[o])}return n}(e)),this.y7=n.bindings,e.setAttribute("role","button"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0"),e.getAttribute("aria-label")||e.setAttribute("aria-label","Share by ".concat(a)),e.addEventListener("click",(function(){return t.qs()})),e.addEventListener("keydown",this.x7.bind(this)),e.classList.add("amp-social-share-".concat(a))},x.layoutCallback=function(){var t=this;if(!this.w7)return r||(r=Promise.resolve(void 0));var e=function(t,e,a){if(!e)return t;var r=t.split("#",2),n=r[0].split("?",2);return n[0]+(n[1]?"?".concat(n[1],"&").concat(e):"?".concat(e))+(r[1]?"#".concat(r[1]):"")}(this.w7,function(t){var e,a,r,n=[];for(var i in t){var o=t[i];if(null!=o){o=l(r=o)?r:[r];for(var s=0;s(i=r).length||-1===i.indexOf("noopener",o))&&(n=t.open(e,"_top"))}(this.win,t,r,"resizable,scrollbars,width=640,height=480")},y}(t.BaseElement);t.registerElement("amp-social-share",C,'.amp-social-share-facebook{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.amp-social-share-pinterest{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.amp-social-share-linkedin{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.amp-social-share-email{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.amp-social-share-twitter{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.amp-social-share-tumblr{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.amp-social-share-whatsapp{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.amp-social-share-line{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.amp-social-share-sms{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.amp-social-share-system{background-image:url(\'data:image/svg+xml;charset=utf-8,\')}amp-social-share{background-repeat:no-repeat;background-position:50%;background-size:contain;text-decoration:none;cursor:pointer;position:relative}amp-social-share:focus{outline:2px solid #0389ff;outline-offset:2px}.amp-social-share-twitter{background-color:#1da1f2}.amp-social-share-facebook{background-color:#32529f}.amp-social-share-pinterest{background-color:#e60023}.amp-social-share-linkedin{background-color:#0077b5}.amp-social-share-tumblr{background-color:#3c5a77}.amp-social-share-email{background-color:#000}.amp-social-share-whatsapp{background-color:#25d366}.amp-social-share-line{background-color:#52b448}.amp-social-share-sms{background-color:#ca2b63}.amp-social-share-system{background-color:#000}\n/*# sourceURL=/extensions/amp-social-share/0.1/amp-social-share.css*/')}(); /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */}}); //# sourceMappingURL=amp-social-share-0.1.js.map