and-component-library
Version:
Distribution of AND Web Components
3 lines (2 loc) • 10.2 kB
JavaScript
function t(){}function c(t){return t()}function e(){return Object.create(null)}function n(t){t.forEach(c)}function o(t){return"function"==typeof t}function r(t,c){return t!=t?c==c:t!==c||t&&"object"==typeof t||"function"==typeof t}function i(t,c){t.appendChild(c)}function s(t,c,e){t.insertBefore(c,e||null)}function l(t){t.parentNode.removeChild(t)}function a(t){return document.createElement(t)}function h(t){return document.createTextNode(t)}function f(){return h(" ")}function u(t,c,e){null==e?t.removeAttribute(c):t.getAttribute(c)!==e&&t.setAttribute(c,e)}function d(t,c,e){t.classList[e?"add":"remove"](c)}let g;function p(t){g=t}function m(t){(function(){if(!g)throw new Error("Function called outside component initialization");return g})().$$.on_mount.push(t)}const $=[],_=[],y=[],x=[],w=Promise.resolve();let v=!1;function b(){v||(v=!0,w.then(C))}function z(t){y.push(t)}let M=!1;const k=new Set;function C(){if(!M){M=!0;do{for(let t=0;t<$.length;t+=1){const c=$[t];p(c),L(c.$$)}for(p(null),$.length=0;_.length;)_.pop()();for(let t=0;t<y.length;t+=1){const c=y[t];k.has(c)||(k.add(c),c())}y.length=0}while($.length);for(;x.length;)x.pop()();v=!1,M=!1,k.clear()}}function L(t){if(null!==t.fragment){t.update(),n(t.before_update);const c=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,c),t.after_update.forEach(z)}}const V=new Set;function E(r,i,s,a,h,f,u=[-1]){const d=g;p(r);const m=i.props||{},_=r.$$={fragment:null,ctx:null,props:f,update:t,not_equal:h,bound:e(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:[]),callbacks:e(),dirty:u,skip_bound:!1};let y=!1;if(_.ctx=s?s(r,m,(t,c,...e)=>{const n=e.length?e[0]:c;return _.ctx&&h(_.ctx[t],_.ctx[t]=n)&&(!_.skip_bound&&_.bound[t]&&_.bound[t](n),y&&function(t,c){-1===t.$$.dirty[0]&&($.push(t),b(),t.$$.dirty.fill(0)),t.$$.dirty[c/31|0]|=1<<c%31}(r,t)),c}):[],_.update(),y=!0,n(_.before_update),_.fragment=!!a&&a(_.ctx),i.target){if(i.hydrate){const t=function(t){return Array.from(t.childNodes)}(i.target);_.fragment&&_.fragment.l(t),t.forEach(l)}else _.fragment&&_.fragment.c();i.intro&&((x=r.$$.fragment)&&x.i&&(V.delete(x),x.i(w))),function(t,e,r){const{fragment:i,on_mount:s,on_destroy:l,after_update:a}=t.$$;i&&i.m(e,r),z(()=>{const e=s.map(c).filter(o);l?l.push(...e):n(e),t.$$.on_mount=[]}),a.forEach(z)}(r,i.target,i.anchor),C()}var x,w;p(d)}let A;"function"==typeof HTMLElement&&(A=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,c,e){this[t]=e}$destroy(){!function(t,c){const e=t.$$;null!==e.fragment&&(n(e.on_destroy),e.fragment&&e.fragment.d(c),e.on_destroy=e.fragment=null,e.ctx=[])}(this,1),this.$destroy=t}$on(t,c){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(c),()=>{const t=e.indexOf(c);-1!==t&&e.splice(t,1)}}$set(t){var c;this.$$set&&(c=t,0!==Object.keys(c).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});const S="data:image/svg+xml,%3c%3fxml version='1.0' encoding='utf-8'%3f%3e%3csvg xmlns='http://www.w3.org/2000/svg' class='footer__logo' height='30px' width='156px' viewBox='0 0 661.81 126.72' data-cy='footer-logo'%3e %3cpath style='fill:white' d='M370.18%2c22.49c12.33%2c0%2c20.44%2c2.67%2c26.77%2c7.33c9.55%2c7.11%2c15.44%2c18.66%2c15.44%2c31.55s-5.89%2c24.44-15.44%2c31.55 c-6.33%2c4.67-14.44%2c7.33-26.77%2c7.33h-24.44V22.49H370.18L370.18%2c22.49z M391.73%2c44.48c-4.33-5.44-10.67-8.67-19.89-8.67h-11.11 v51.1h11.11c9.22%2c0%2c15.55-3.22%2c19.89-8.66c3.56-4.44%2c5.66-10.44%2c5.66-16.89C397.4%2c54.93%2c395.29%2c48.93%2c391.73%2c44.48z'%3e%3c/path%3e %3cpath style='fill:white' d='M502.15%2c97.25c0%2c9.67-1.67%2c14.14-4.89%2c18.69c-4.89%2c6.78-13.55%2c10.78-23.88%2c10.78 c-10.55%2c0-20.55-4.89-25.89-11.11l9.11-9.44c2.89%2c3.11%2c7.89%2c7.78%2c16.78%2c7.78c4.67%2c0%2c8.55-1.45%2c11-4.33 c2.22-2.45%2c3.33-5.78%2c3.33-12.67v-0.47c-4.33%2c3.33-9%2c4.89-14.44%2c4.89c-8%2c0-15.66-3.55-20.44-9.11 c-4.22-4.89-6.78-11.55-6.78-18.89c0-15.89%2c11.78-28.11%2c26.44-28.11c6.11%2c0%2c11.55%2c2%2c15.78%2c5.44v-4.33h13.88L502.15%2c97.25 L502.15%2c97.25z M487.71%2c65.26c-3-4-7.78-6.66-13.33-6.66c-8.44%2c0-13.89%2c7-13.89%2c14.78c0%2c8.44%2c6.11%2c14.66%2c14.22%2c14.66 c5.44%2c0%2c10.22-2.67%2c13-6.67V65.26z'%3e%3c/path%3e %3cpath style='fill:white' d='M522.04%2c21.31c4.89%2c0%2c8.84%2c3.74%2c8.84%2c8.63s-3.95%2c8.63-8.84%2c8.63s-8.84-3.74-8.84-8.63 S517.15%2c21.31%2c522.04%2c21.31z M529.26%2c100.25h-14.44V46.37h14.44V100.25z'%3e%3c/path%3e %3cpath style='fill:white' d='M429.28%2c21.31c4.89%2c0%2c8.84%2c3.74%2c8.84%2c8.63s-3.95%2c8.63-8.84%2c8.63s-8.84-3.74-8.84-8.63 S424.39%2c21.31%2c429.28%2c21.31z M436.5%2c100.25h-14.44V46.37h14.44V100.25z'%3e%3c/path%3e %3cpath style='fill:white' d='M573.59%2c100.25c-1.89%2c0.67-6.22%2c1.11-9%2c1.11c-8.66%2c0-15-2.89-18.66-7.78c-2.78-3.67-4-8.44-4-16.11V58.59 V46.37v-15h14.44v15h15.08v12.22h-15.08v20.55c0%2c3.33%2c0.55%2c5.33%2c1.78%2c6.78c1.44%2c1.67%2c3.78%2c2.66%2c7.33%2c2.66 c2.11%2c0%2c4.89-0.33%2c5.89-0.56L573.59%2c100.25z'%3e%3c/path%3e %3cpath style='fill:white' d='M634.69%2c100.25H620.8v-4.33c-4.44%2c3.78-9.55%2c5.44-15%2c5.44c-8%2c0-15.55-3.55-20.33-9.11 c-4.22-4.89-6.89-11.56-6.89-18.89c0-15.89%2c11.77-28.11%2c26.44-28.11c6.11%2c0%2c11.55%2c2%2c15.77%2c5.44v-4.33h13.89v53.89H634.69z M620.25%2c65.26c-3-4-7.78-6.66-13.33-6.66c-8.44%2c0-13.89%2c7-13.89%2c14.78c0%2c8.44%2c6.11%2c14.66%2c14.22%2c14.66c5.44%2c0%2c10.22-2.67%2c13-6.66 L620.25%2c65.26L620.25%2c65.26z'%3e%3c/path%3e %3cpath style='fill:white' d='M661.81%2c100.25h-14.45V22.49h14.44L661.81%2c100.25z'%3e%3c/path%3e %3crect style='fill:%23FF323C' y='0' width='323.25' height='122.74'%3e%3c/rect%3e %3cpolygon style='fill:white' points='200.51%2c100.25 181.68%2c100.25 141.57%2c53.2 141.57%2c100.25 122.75%2c100.25 122.75%2c22.49 141.57%2c22.49 181.68%2c69.49 181.68%2c22.49 200.51%2c22.49'%3e%3c/polygon%3e %3cpath style='fill:white' d='M261.88%2c22.49h-38.89v18.83h9.92v40.11h-9.92v18.83h38.89c21.44%2c0%2c38.88-17.44%2c38.88-38.88 C300.76%2c39.93%2c283.32%2c22.49%2c261.88%2c22.49z M261.88%2c81.42h-10.14V41.31h10.14c11.06%2c0%2c20.05%2c9%2c20.05%2c20.05 C281.94%2c72.43%2c272.94%2c81.42%2c261.88%2c81.42z'%3e%3c/path%3e %3cpath style='fill:white' d='M61.38%2c22.49c-21.44%2c0-38.88%2c17.44-38.88%2c38.88v38.89h18.83v-9.92h40.11v9.92h18.83V61.37 C100.26%2c39.93%2c82.82%2c22.49%2c61.38%2c22.49z M81.43%2c71.5H41.32V61.36c0-11.06%2c9-20.05%2c20.05-20.05c11.06%2c0%2c20.05%2c8.99%2c20.05%2c20.05 L81.43%2c71.5L81.43%2c71.5z'%3e%3c/path%3e %3c/svg%3e";function F(c){let e;return{c(){e=a("p"),e.textContent=""+c[7],u(e,"class","footer__copyright")},m(t,c){s(t,e,c)},p:t,d(t){t&&l(e)}}}function H(c){let e;return{c(){e=a("p"),e.textContent=""+c[7],u(e,"class","footer__copyright")},m(t,c){s(t,e,c)},p:t,d(t){t&&l(e)}}}function N(c){let e,n,o,r,g,p,m,$,_,y,x,w,v=!c[6]&&F(c),b=c[6]&&H(c);return{c(){e=a("footer"),n=a("div"),o=a("a"),r=a("img"),p=f(),m=a("p"),$=h(c[3]),_=f(),y=a("slot"),x=f(),v&&v.c(),w=f(),b&&b.c(),this.c=t,u(r,"data-testid","logo"),r.src!==(g=c[2])&&u(r,"src",g),u(r,"alt","Logo"),u(m,"class","footer__caption"),u(o,"id","logo_container"),u(o,"data-testid","logo_container"),u(o,"href",c[1]),u(o,"class","footer__logo-container"),u(o,"target",c[4]),u(n,"class","container footer__container"),d(n,"footer__container--no-links",!c[6]),u(e,"id",c[0]),u(e,"class","footer")},m(t,l){s(t,e,l),i(e,n),i(n,o),i(o,r),i(o,p),i(o,m),i(m,$),i(n,_),i(n,y),i(n,x),v&&v.m(n,null),i(e,w),b&&b.m(e,null),c[8](e)},p(t,[c]){4&c&&r.src!==(g=t[2])&&u(r,"src",g),8&c&&function(t,c){c=""+c,t.wholeText!==c&&(t.data=c)}($,t[3]),2&c&&u(o,"href",t[1]),16&c&&u(o,"target",t[4]),t[6]?v&&(v.d(1),v=null):v?v.p(t,c):(v=F(t),v.c(),v.m(n,null)),64&c&&d(n,"footer__container--no-links",!t[6]),t[6]?b?b.p(t,c):(b=H(t),b.c(),b.m(e,null)):b&&(b.d(1),b=null),1&c&&u(e,"id",t[0])},i:t,o:t,d(t){t&&l(e),v&&v.d(),b&&b.d(),c[8](null)}}}function T(t,c,e){let n,{id:o="and-footer"}=c,r=!1;const i=`© ${(new Date).getFullYear()} AND Digital. All rights reserved.`;let{href:s="https://and.digital/"}=c,{logosrc:l=S}=c,{slogan:a="We accelerate digital capabilities"}=c,{target:h="_top"}=c;const f=()=>{const t=n.querySelector("slot");return t&&t.assignedElements()[0]};return m(async()=>{await(b(),w),(()=>{const t=n.querySelector(".footer__links");e(6,r=t||f()&&"AND-LINKS"===f().tagName)})()}),t.$$set=t=>{"id"in t&&e(0,o=t.id),"href"in t&&e(1,s=t.href),"logosrc"in t&&e(2,l=t.logosrc),"slogan"in t&&e(3,a=t.slogan),"target"in t&&e(4,h=t.target)},[o,s,l,a,h,n,r,i,function(t){_[t?"unshift":"push"](()=>{n=t,e(5,n)})}]}class j extends A{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import url(https://fonts.googleapis.com/css2?family=Poppins);:root{--step:50}a{color:currentColor;text-decoration:none}.container{max-width:1200px;padding:1em;margin-left:auto;margin-right:auto;cursor:pointer}.footer{box-sizing:border-box;margin:0;padding:0;background:#323232;padding:5rem 0;color:#F7FAFC;font-family:poppins;font-size:100%}.footer:nth-of-type(2),.footer:nth-of-type(3){padding:1rem 0}.footer__logo-container{flex-shrink:0}.footer__container>*+*{margin-top:3rem}.footer__container--no-links{align-items:center;justify-content:space-between}.footer__caption{font-size:0.8rem}.footer__copyright{text-align:center;margin-top:5rem}@media(min-width: 992px){.footer__container{display:flex}.footer__container>*+*{margin-top:0;margin-left:3rem}}</style>",E(this,{target:this.shadowRoot},T,N,r,{id:0,href:1,logosrc:2,slogan:3,target:4}),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),C()))}static get observedAttributes(){return["id","href","logosrc","slogan","target"]}get id(){return this.$$.ctx[0]}set id(t){this.$set({id:t}),C()}get href(){return this.$$.ctx[1]}set href(t){this.$set({href:t}),C()}get logosrc(){return this.$$.ctx[2]}set logosrc(t){this.$set({logosrc:t}),C()}get slogan(){return this.$$.ctx[3]}set slogan(t){this.$set({slogan:t}),C()}get target(){return this.$$.ctx[4]}set target(t){this.$set({target:t}),C()}}customElements.define("and-footer",j);export default j;
//# sourceMappingURL=Footer.js.map