diff --git a/0812f034-5e8354b69da97fc59d70.js b/0812f034-5e8354b69da97fc59d70.js new file mode 100644 index 0000000..5183d6c --- /dev/null +++ b/0812f034-5e8354b69da97fc59d70.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"Pc+3":function(e,t,n){"use strict";n.r(t),n.d(t,"Decoration",(function(){return zt})),n.d(t,"DecorationSet",(function(){return qt})),n.d(t,"EditorView",(function(){return hn})),n.d(t,"__endComposition",(function(){return an})),n.d(t,"__parseFromClipboard",(function(){return cn})),n.d(t,"__serializeForClipboard",(function(){return dn}));var o=n("b/sn"),i=n("byeC"),s=n("uSMm");const r=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},l=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let d=null;const c=function(e,t,n){let o=d||(d=document.createRange());return o.setEnd(e,null==n?e.nodeValue.length:n),o.setStart(e,t||0),o},a=function(e,t,n,o){return n&&(u(e,t,n,o,-1)||u(e,t,n,o,1))},h=/^(img|br|input|textarea|hr)$/i;function u(e,t,n,o,i){for(;;){if(e==n&&t==o)return!0;if(t==(i<0?0:f(e))){let n=e.parentNode;if(!n||1!=n.nodeType||m(e)||h.test(e.nodeName)||"false"==e.contentEditable)return!1;t=r(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?f(e):0}}}function f(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function p(e,t,n){for(let o=0==t,i=t==f(e);o||i;){if(e==n)return!0;let t=r(e);if(!(e=e.parentNode))return!1;o=o&&0==t,i=i&&t==f(e)}}function m(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const g=function(e){return e.focusNode&&a(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function y(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const b="undefined"!=typeof navigator?navigator:null,v="undefined"!=typeof document?document:null,w=b&&b.userAgent||"",S=/Edge\/(\d+)/.exec(w),D=/MSIE \d/.exec(w),N=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(w),O=!!(D||N||S),C=D?document.documentMode:N?+N[1]:S?+S[1]:0,M=!O&&/gecko\/(\d+)/i.test(w);M&&(/Firefox\/(\d+)/.exec(w)||[0,0])[1];const x=!O&&/Chrome\/(\d+)/.exec(w),k=!!x,T=x?+x[1]:0,E=!O&&!!b&&/Apple Computer/.test(b.vendor),P=E&&(/Mobile\/\w+/.test(w)||!!b&&b.maxTouchPoints>2),A=P||!!b&&/Mac/.test(b.platform),V=/Android \d/.test(w),R=!!v&&"webkitFontSmoothing"in v.documentElement.style,B=R?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function F(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function z(e,t){return"number"==typeof e?e:e[t]}function I(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,o=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*o}}function L(e,t,n){let o=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let r=n||e.dom;r;r=l(r)){if(1!=r.nodeType)continue;let e=r,n=e==s.body,l=n?F(s):I(e),d=0,c=0;if(t.topl.bottom-z(o,"bottom")&&(c=t.bottom-l.bottom+z(i,"bottom")),t.leftl.right-z(o,"right")&&(d=t.right-l.right+z(i,"right")),d||c)if(n)s.defaultView.scrollBy(d,c);else{let n=e.scrollLeft,o=e.scrollTop;c&&(e.scrollTop+=c),d&&(e.scrollLeft+=d);let i=e.scrollLeft-n,s=e.scrollTop-o;t={left:t.left-i,top:t.top-s,right:t.right-i,bottom:t.bottom-s}}if(n)break}}function q(e){let t=[],n=e.ownerDocument;for(let o=e;o&&(t.push({dom:o,top:o.scrollTop,left:o.scrollLeft}),e!=n);o=l(o));return t}function $(e,t){for(let n=0;n=l){r=Math.max(h.bottom,r),l=Math.min(h.top,l);let e=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(s=a+1)}}return n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,o=document.createRange();for(let i=0;i=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,o):!n||i&&1==n.nodeType?{node:e,offset:s}:W(n,o)}function _(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function H(e,t){let n,o=e.dom.ownerDocument,i=0;if(o.caretPositionFromPoint)try{let e=o.caretPositionFromPoint(t.left,t.top);e&&({offsetNode:n,offset:i}=e)}catch(c){}if(!n&&o.caretRangeFromPoint){let e=o.caretRangeFromPoint(t.left,t.top);e&&({startContainer:n,startOffset:i}=e)}let s,r=(e.root.elementFromPoint?e.root:o).elementFromPoint(t.left,t.top);if(!r||!e.dom.contains(1!=r.nodeType?r.parentNode:r)){let n=e.dom.getBoundingClientRect();if(!_(t,n))return null;if(r=function e(t,n,o){let i=t.childNodes.length;if(i&&o.topt.top&&i++}n==e.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(s=function(e,t,n,o){let i=-1;for(let s=t;s!=e.dom;){let t=e.docView.nearestDesc(s,!0);if(!t)return null;if(t.node.isBlock&&t.parent){let e=t.dom.getBoundingClientRect();if(e.left>o.left||e.top>o.top)i=t.posBefore;else{if(!(e.right-1?i:e.docView.posFromDOM(t,n,1)}(e,n,i,t))}null==s&&(s=function(e,t,n){let{node:o,offset:i}=W(t,n),s=-1;if(1==o.nodeType&&!o.firstChild){let e=o.getBoundingClientRect();s=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(o,i,s)}(e,r,t));let d=e.docView.nearestDesc(r,!0);return{pos:s,inside:d?d.posAtStart-d.border:-1}}function G(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const U=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function j(e,t,n){let{node:o,offset:i,atom:s}=e.docView.domFromPos(t,n<0?-1:1),r=R||M;if(3==o.nodeType){if(!r||!U.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){let e=i,t=i,s=n<0?1:-1;return n<0&&!i?(t++,s=-1):n>=0&&i==o.nodeValue.length?(e--,s=1):n<0?e--:t++,J(G(c(o,e,t),1),s<0)}{let e=G(c(o,i,i),n);if(M&&i&&/\s/.test(o.nodeValue[i-1])&&i=0)}if(null==s&&i&&(n<0||i==f(o))){let e=o.childNodes[i-1],t=3==e.nodeType?c(e,f(e)-(r?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return J(G(t,1),!1)}if(null==s&&i=0)}function J(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function X(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Y(e,t,n){let o=e.state,i=e.root.activeElement;o!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{o!=t&&e.updateState(o),i!=e.dom&&i&&i.focus()}}const Q=/[\u0590-\u08ac]/;let Z=null,ee=null,te=!1;function ne(e,t,n){return Z==t&&ee==n?te:(Z=t,ee=n,te="up"==n||"down"==n?function(e,t,n){let o=t.selection,i="up"==n?o.$from:o.$to;return Y(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.dom;break}t=n.dom.parentNode}let o=j(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=c(e,0,e.nodeValue.length).getClientRects()}for(let e=0;ei.top+1&&("up"==n?o.top-i.top>2*(i.bottom-o.top):i.bottom-o.bottom>2*(o.bottom-i.top)))return!1}}return!0})}(e,t,n):function(e,t,n){let{$head:o}=t.selection;if(!o.parent.isTextblock)return!1;let i=o.parentOffset,s=!i,r=i==o.parent.content.size,l=e.domSelection();return Q.test(o.parent.textContent)&&l.modify?Y(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:s,anchorOffset:r}=e.domSelectionRange(),d=l.caretBidiLevel;l.modify("move",n,"character");let c=o.depth?e.docView.domAfterPos(o.before()):e.dom,{focusNode:a,focusOffset:h}=e.domSelectionRange(),u=a&&!c.contains(1==a.nodeType?a:a.parentNode)||t==a&&i==h;try{l.collapse(s,r),t&&(t!=s||i!=r)&&l.extend&&l.extend(t,i)}catch(f){}return null!=d&&(l.caretBidiLevel=d),u}):"left"==n||"backward"==n?s:r}(e,t,n))}class oe{constructor(e,t,n,o){this.parent=e,this.children=t,this.dom=n,this.contentDOM=o,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){o=!1;break}if(t.previousSibling)break}if(null==o&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){o=!0;break}if(t.nextSibling)break}}return(null==o?n>0:o)?this.posAtEnd:this.posAtStart}nearestDesc(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(let n=!0,o=e;o;o=o.parentNode){let i,s=this.getDesc(o);if(s&&(!t||s.node)){if(!n||!(i=s.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return s;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;te||t instanceof ae){i=e-s;break}s=n}if(i)return this.children[o].domFromPos(i-this.children[o].border,t);for(;o&&!(n=this.children[o-1]).size&&n instanceof ie&&n.side>=0;o--);if(t<=0){let e,n=!0;for(;e=o?this.children[o-1]:null,e&&e.dom.parentNode!=this.contentDOM;o--,n=!1);return e&&t&&n&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?r(e.dom)+1:0}}{let e,n=!0;for(;e=o2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=n,l=0;;l++){let n=this.children[l],d=s+n.size;if(-1==o&&e<=d){let i=s+n.border;if(e>=i&&t<=d-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=s;for(let t=l;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){o=r(n.dom)+1;break}e-=n.size}-1==o&&(o=0)}if(o>-1&&(d>t||l==this.children.length-1)){t=d;for(let e=l+1;e3&&void 0!==arguments[3]&&arguments[3],i=Math.min(e,t),s=Math.max(e,t);for(let r=0,a=0;ra&&st){let e=l;l=d,d=e}let n=document.createRange();n.setEnd(d.node,d.offset),n.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,o=0;o=n:en){let o=n+i.border,r=s-i.border;if(e>=o&&t<=r)return this.dirty=e==n||t==s?2:1,void(e!=o||t!=r||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(e-o,t-o):i.dirty=3);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=s}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirtyi?i.parent?i.parent.posBeforeChild(i):void 0:o)),!t.type.spec.raw){if(1!=s.nodeType){let e=document.createElement("span");e.appendChild(s),s=e}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class se extends oe{constructor(e,t,n,o){super(e,[],t,null),this.textDOM=n,this.text=o}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class re extends oe{constructor(e,t,n,o){super(e,[],n,o),this.mark=t}static create(e,t,n,o){let s=o.nodeViews[t.type.name],r=s&&s(t,o,n);return r&&r.dom||(r=i.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t,n))),new re(e,t,r.dom,r.contentDOM||r.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty0&&(i=De(i,0,e,n));for(let r=0;rl?l.parent?l.parent.posBeforeChild(l):void 0:r,n,o),a=c&&c.dom,h=c&&c.contentDOM;if(t.isText)if(a){if(3!=a.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else a=document.createTextNode(t.text);else a||({dom:a,contentDOM:h}=i.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t)));h||t.isText||"BR"==a.nodeName||(a.hasAttribute("contenteditable")||(a.contentEditable="false"),t.type.spec.draggable&&(a.draggable=!0));let u=a;return a=ye(a,n,t),c?l=new he(e,t,n,o,a,h||null,u,c,s,r+1):t.isText?new ce(e,t,n,o,a,u,s):new le(e,t,n,o,a,h||null,u,s,r+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>i.Fragment.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&be(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,o=t,s=e.composing?this.localCompositionInfo(e,t):null,r=s&&s.pos>-1?s:null,l=s&&s.pos<0,d=new we(this,r&&r.node,e);!function(e,t,n,o){let i=t.locals(e),s=0;if(0==i.length){for(let n=0;ns;)l.push(i[r++]);let u=s+a.nodeSize;if(a.isText){let e=u;r!e.inline):l.slice();o(a,f,t.forChild(s,a),h),s=u}}(this.node,this.innerDeco,(t,s,r)=>{t.spec.marks?d.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!r&&d.syncToMarks(s==this.node.childCount?i.Mark.none:this.node.child(s).marks,n,e),d.placeWidget(t,e,o)},(t,i,r,c)=>{let a;d.syncToMarks(t.marks,n,e),d.findNodeMatch(t,i,r,c)||l&&e.state.selection.from>o&&e.state.selection.to-1&&d.updateNodeAt(t,i,r,a,e)||d.updateNextNode(t,i,r,e,c)||d.addNode(t,i,r,e,o),o+=t.nodeSize}),d.syncToMarks([],n,e),this.node.isTextblock&&d.addTextblockHacks(),d.destroyRest(),(d.changed||2==this.dirty)&&(r&&this.protectLocalComposition(e,r),function e(t,n,o){let i=t.firstChild,s=!1;for(let r=0;rt+this.node.content.size)return null;let s=e.domSelectionRange(),r=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=f(e)}else{if(!(1==e.nodeType&&t=n){let e=l=0&&e+t.length+l>=n)return l+e;if(n==o&&d.length>=o+t.length-l&&d.slice(o-l,o-l+t.length)==t)return o}}return-1}(this.node.content,e,n-t,i-t);return o<0?null:{node:r,pos:o,text:e}}return{node:r,pos:-1,text:""}}protectLocalComposition(e,t){let{node:n,pos:o,text:i}=t;if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let r=new se(this,s,n,i);e.input.compositionNodes.push(r),this.children=De(this.children,o,o+i.length,e,r)}update(e,t,n,o){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,o),!0)}updateInner(e,t,n,o){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(be(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=me(this.dom,this.nodeDOM,pe(this.outerDeco,this.node,t),pe(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function de(e,t,n,o,i){return ye(o,t,e),new le(void 0,e,t,n,o,o,o,i,0)}class ce extends le{constructor(e,t,n,o,i,s,r){super(e,t,n,o,i,null,s,r,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,o){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let o=this.node.cut(e,t),i=document.createTextNode(o.text);return new ce(this.parent,o,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class ae extends oe{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class he extends le{constructor(e,t,n,o,i,s,r,l,d,c){super(e,t,n,o,i,s,r,d,c),this.spec=l}update(e,t,n,o){if(3==this.dirty)return!1;if(this.spec.update){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,o),i}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,o){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}const ue=function(e){e&&(this.nodeName=e)};ue.prototype=Object.create(null);const fe=[new ue];function pe(e,t,n){if(0==e.length)return fe;let o=n?fe[0]:new ue,i=[o];for(let s=0;s0;){let l;for(;;)if(o){let e=n.children[o-1];if(!(e instanceof re)){l=e,o--;break}n=e,o=e.children.length}else{if(n==t)break e;o=n.parent.children.indexOf(n),n=n.parent}let d=l.node;if(d){if(d!=e.child(i-1))break;--i,s.set(l,i),r.push(l)}}return{index:i,matched:s,matches:r.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n>1,s=Math.min(i,e.length);for(;o-1)o>this.index&&(this.changed=!0,this.destroyBetween(this.index,o)),this.top=this.top.children[this.index];else{let o=re.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,o),this.top=o,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,o){let i,s=-1;if(o>=this.preMatch.index&&(i=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,n))s=this.top.children.indexOf(i,this.index);else for(let r=this.index,l=Math.min(this.top.children.length,r+5);r=n||a<=t?s.push(d):(cn&&s.push(d.slice(n-c,d.size,o)))}return s}function Ne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.domSelectionRange(),i=e.state.doc;if(!n.focusNode)return null;let s=e.docView.nearestDesc(n.focusNode),r=s&&0==s.size,l=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(l<0)return null;let d,c,a=i.resolve(l);if(g(n)){for(d=a;s&&!s.node;)s=s.parent;let e=s.node;if(s&&e.isAtom&&o.NodeSelection.isSelectable(e)&&s.parent&&(!e.isInline||!p(n.focusNode,n.focusOffset,s.dom))){let e=s.posBefore;c=new o.NodeSelection(l==e?a:i.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;d=i.resolve(t)}if(!c){c=Re(e,d,a,"pointer"==t||e.state.selection.head1&&void 0!==arguments[1]&&arguments[1],n=e.state.selection;if(Ae(e,n),Oe(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&k){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&a(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Pe(e);else{let i,s,{anchor:r,head:l}=n;!Me||n instanceof o.TextSelection||(n.$from.parent.inlineContent||(i=xe(e,n.from)),n.empty||n.$from.parent.inlineContent||(s=xe(e,n.to))),e.docView.setSelection(r,l,e.root,t),Me&&(i&&Te(i),s&&Te(s)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Ee(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Me=E||k&&T<63;function xe(e,t){let{node:n,offset:o}=e.docView.domFromPos(t,0),i=o{n.anchorNode==o&&n.anchorOffset==i||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{Oe(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")},20))})}function Pe(e){let t=e.domSelection(),n=document.createRange(),o=e.cursorWrapper.dom,i="IMG"==o.nodeName;i?n.setEnd(o.parentNode,r(o)+1):n.setEnd(o,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&O&&C<=11&&(o.disabled=!0,o.disabled=!1)}function Ae(e,t){if(t instanceof o.NodeSelection){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ve(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ve(e)}function Ve(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Re(e,t,n,i){return e.someProp("createSelectionBetween",o=>o(e,t,n))||o.TextSelection.between(t,n,i)}function Be(e){return!(e.editable&&!e.hasFocus())&&Fe(e)}function Fe(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function ze(e,t){let{$anchor:n,$head:i}=e.selection,s=t>0?n.max(i):n.min(i),r=s.parent.inlineContent?s.depth?e.doc.resolve(t>0?s.after():s.before()):null:s;return r&&o.Selection.findFrom(r,t)}function Ie(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Le(e,t,n){let i=e.state.selection;if(!(i instanceof o.TextSelection)){if(i instanceof o.NodeSelection&&i.node.isInline)return Ie(e,new o.TextSelection(t>0?i.$to:i.$from));{let n=ze(e.state,t);return!!n&&Ie(e,n)}}if(!i.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=ze(e.state,t);return!!(n&&n instanceof o.NodeSelection)&&Ie(e,n)}if(!(A&&n.indexOf("m")>-1)){let n,s=i.$head,r=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!r||r.isText)return!1;let l=t<0?s.pos-r.nodeSize:s.pos;return!!(r.isAtom||(n=e.docView.descAt(l))&&!n.contentDOM)&&(o.NodeSelection.isSelectable(r)?Ie(e,new o.NodeSelection(t<0?e.state.doc.resolve(s.pos-r.nodeSize):s)):!!R&&Ie(e,new o.TextSelection(e.state.doc.resolve(t<0?l:l+r.nodeSize))))}}function qe(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function $e(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Ke(e){let t=e.domSelectionRange(),n=t.focusNode,o=t.focusOffset;if(!n)return;let i,s,l=!1;for(M&&1==n.nodeType&&o0){if(1!=n.nodeType)break;{let e=n.childNodes[o-1];if($e(e))i=n,s=--o;else{if(3!=e.nodeType)break;n=e,o=n.nodeValue.length}}}else{if(_e(n))break;{let t=n.previousSibling;for(;t&&$e(t);)i=n.parentNode,s=r(t),t=t.previousSibling;if(t)n=t,o=qe(n);else{if(n=n.parentNode,n==e.dom)break;o=0}}}l?He(e,n,o):i&&He(e,i,s)}function We(e){let t=e.domSelectionRange(),n=t.focusNode,o=t.focusOffset;if(!n)return;let i,s,l=qe(n);for(;;)if(o{e.state==i&&Ce(e)},50)}function Ge(e,t,n){let i=e.state.selection;if(i instanceof o.TextSelection&&!i.empty||n.indexOf("s")>-1)return!1;if(A&&n.indexOf("m")>-1)return!1;let{$from:s,$to:r}=i;if(!s.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=ze(e.state,t);if(n&&n instanceof o.NodeSelection)return Ie(e,n)}if(!s.parent.inlineContent){let n=t<0?s:r,l=i instanceof o.AllSelection?o.Selection.near(n,t):o.Selection.findFrom(n,t);return!!l&&Ie(e,l)}return!1}function Ue(e,t){if(!(e.state.selection instanceof o.TextSelection))return!0;let{$head:n,$anchor:i,empty:s}=e.state.selection;if(!n.sameParent(i))return!0;if(!s)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let r=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(r&&!r.isText){let o=e.state.tr;return t<0?o.delete(n.pos-r.nodeSize,n.pos):o.delete(n.pos,n.pos+r.nodeSize),e.dispatch(o),!0}return!1}function je(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Je(e,t){let n=t.keyCode,o=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||A&&72==n&&"c"==o?Ue(e,-1)||Ke(e):46==n||A&&68==n&&"c"==o?Ue(e,1)||We(e):13==n||27==n||(37==n||A&&66==n&&"c"==o?Le(e,-1,o)||Ke(e):39==n||A&&70==n&&"c"==o?Le(e,1,o)||We(e):38==n||A&&80==n&&"c"==o?Ge(e,-1,o)||Ke(e):40==n||A&&78==n&&"c"==o?function(e){if(!E||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;je(e,n,"true"),setTimeout(()=>je(e,n,"false"),20)}return!1}(e)||Ge(e,1,o)||We(e):o==(A?"m":"c")&&(66==n||73==n||89==n||90==n))}function Xe(e,t){e.someProp("transformCopied",e=>{t=e(t)});let n=[],{content:o,openStart:s,openEnd:r}=t;for(;s>1&&r>1&&1==o.childCount&&1==o.firstChild.childCount;){s--,r--;let e=o.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),o=e.content}let l=e.someProp("clipboardSerializer")||i.DOMSerializer.fromSchema(e.state.schema),d=rt(),c=d.createElement("div");c.appendChild(l.serializeFragment(o,{document:d}));let a,h=c.firstChild,u=0;for(;h&&1==h.nodeType&&(a=it[h.nodeName.toLowerCase()]);){for(let e=a.length-1;e>=0;e--){let t=d.createElement(a[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),u++}h=c.firstChild}return h&&1==h.nodeType&&h.setAttribute("data-pm-slice",`${s} ${r}${u?" -"+u:""} ${JSON.stringify(n)}`),{dom:c,text:e.someProp("clipboardTextSerializer",e=>e(t))||t.content.textBetween(0,t.content.size,"\n\n")}}function Ye(e,t,n,o,s){let r,l,d=s.parent.type.spec.code;if(!n&&!t)return null;let c=t&&(o||d||!n);if(c){if(e.someProp("transformPastedText",e=>{t=e(t,d||o)}),d)return t?new i.Slice(i.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):i.Slice.empty;let n=e.someProp("clipboardTextParser",e=>e(t,s,o));if(n)l=n;else{let n=s.marks(),{schema:o}=e.state,l=i.DOMSerializer.fromSchema(o);r=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=r.appendChild(document.createElement("p"));e&&t.appendChild(l.serializeNode(o.text(e,n)))})}}else e.someProp("transformPastedHTML",e=>{n=e(n)}),r=function(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,o=rt().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);(n=i&&it[i[1].toLowerCase()])&&(e=n.map(e=>"<"+e+">").join("")+e+n.map(e=>"").reverse().join(""));if(o.innerHTML=e,n)for(let s=0;s0&&r.firstChild;i--)r=r.firstChild;if(!l){let t=e.someProp("clipboardParser")||e.someProp("domParser")||i.DOMParser.fromSchema(e.state.schema);l=t.parseSlice(r,{preserveWhitespace:!(!c&&!h),context:s,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Qe.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(h)l=function(e,t){if(!e.size)return e;let n,o=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(d){return e}let{content:s,openStart:r,openEnd:l}=e;for(let c=n.length-2;c>=0;c-=2){let e=o.nodes[n[c]];if(!e||e.hasRequiredAttrs())break;s=i.Fragment.from(e.create(n[c+1],s)),r++,l++}return new i.Slice(s,r,l)}(ot(l,+h[1],+h[2]),h[4]);else if(l=i.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o,s=t.node(n).contentMatchAt(t.index(n)),r=[];if(e.forEach(e=>{if(!r)return;let t,n=s.findWrapping(e.type);if(!n)return r=null;if(t=r.length&&o.length&&et(n,o,e,r[r.length-1],0))r[r.length-1]=t;else{r.length&&(r[r.length-1]=tt(r[r.length-1],o.length));let t=Ze(e,n);r.push(t),s=s.matchType(t.type),o=n}}),r)return i.Fragment.from(r)}return e}(l.content,s),!0),l.openStart||l.openEnd){let e=0,t=0;for(let n=l.content.firstChild;e{l=e(l)}),l}const Qe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Ze(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(let o=t.length-1;o>=n;o--)e=t[o].create(null,i.Fragment.from(e));return e}function et(e,t,n,o,s){if(s=n&&(d=t<0?l.contentMatchAt(0).fillBefore(d,e.childCount>1||r<=s).append(d):d.append(l.contentMatchAt(l.childCount).fillBefore(i.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,l.copy(d))}function ot(e,t,n){return t{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>ft(e,t))})}function ft(e,t){return e.someProp("handleDOMEvents",n=>{let o=n[t.type];return!!o&&(o(e,t)||t.defaultPrevented)})}function pt(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function mt(e){return{left:e.clientX,top:e.clientY}}function gt(e,t,n,o,i){if(-1==o)return!1;let s=e.state.doc.resolve(o);for(let r=s.depth+1;r>0;r--)if(e.someProp(t,t=>r>s.depth?t(e,n,s.nodeAfter,s.before(r),i,!0):t(e,n,s.node(r),s.before(r),i,!1)))return!0;return!1}function yt(e,t,n){e.focused||e.focus();let o=e.state.tr.setSelection(t);"pointer"==n&&o.setMeta("pointer",!0),e.dispatch(o)}function bt(e,t,n,i,s){return gt(e,"handleClickOn",t,n,i)||e.someProp("handleClick",n=>n(e,t,i))||(s?function(e,t){if(-1==t)return!1;let n,i,s=e.state.selection;s instanceof o.NodeSelection&&(n=s.node);let r=e.state.doc.resolve(t);for(let l=r.depth+1;l>0;l--){let e=l>r.depth?r.nodeAfter:r.node(l);if(o.NodeSelection.isSelectable(e)){i=n&&s.$from.depth>0&&l>=s.$from.depth&&r.before(s.$from.depth+1)==s.$from.pos?r.before(s.$from.depth):r.before(l);break}}return null!=i&&(yt(e,o.NodeSelection.create(e.state.doc,i),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),i=n.nodeAfter;return!!(i&&i.isAtom&&o.NodeSelection.isSelectable(i))&&(yt(e,new o.NodeSelection(n),"pointer"),!0)}(e,n))}function vt(e,t,n,o){return gt(e,"handleDoubleClickOn",t,n,o)||e.someProp("handleDoubleClick",n=>n(e,t,o))}function wt(e,t,n,i){return gt(e,"handleTripleClickOn",t,n,i)||e.someProp("handleTripleClick",n=>n(e,t,i))||function(e,t,n){if(0!=n.button)return!1;let i=e.state.doc;if(-1==t)return!!i.inlineContent&&(yt(e,o.TextSelection.create(i,0,i.content.size),"pointer"),!0);let s=i.resolve(t);for(let r=s.depth+1;r>0;r--){let t=r>s.depth?s.nodeAfter:s.node(r),n=s.before(r);if(t.inlineContent)yt(e,o.TextSelection.create(i,n+1,n+1+t.content.size),"pointer");else{if(!o.NodeSelection.isSelectable(t))continue;yt(e,o.NodeSelection.create(i,n),"pointer")}return!0}}(e,n,i)}function St(e){return kt(e)}dt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!Ot(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!V||!k||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!P||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",t=>t(e,n))||Je(e,n)?n.preventDefault():ht(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",t=>t(e,y(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},dt.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},dt.keypress=(e,t)=>{let n=t;if(Ot(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||A&&n.metaKey)return;if(e.someProp("handleKeyPress",t=>t(e,n)))return void n.preventDefault();let i=e.state.selection;if(!(i instanceof o.TextSelection&&i.$from.sameParent(i.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",n=>n(e,i.$from.pos,i.$to.pos,t))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const Dt=A?"metaKey":"ctrlKey";lt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let o=St(e),i=Date.now(),s="singleClick";i-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,o=t.y-e.clientY;return n*n+o*o<100}(n,e.input.lastClick)&&!n[Dt]&&("singleClick"==e.input.lastClick.type?s="doubleClick":"doubleClick"==e.input.lastClick.type&&(s="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:s};let r=e.posAtCoords(mt(n));r&&("singleClick"==s?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Nt(e,r,n,!!o)):("doubleClick"==s?vt:wt)(e,r.pos,r.inside,n)?n.preventDefault():ht(e,"pointer"))};class Nt{constructor(e,t,n,i){let s,r;if(this.view=e,this.pos=t,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[Dt],this.allowDefault=n.shiftKey,t.inside>-1)s=e.state.doc.nodeAt(t.inside),r=t.inside;else{let n=e.state.doc.resolve(t.pos);s=n.parent,r=n.depth?n.before():0}const l=i?null:n.target,d=l?e.docView.nearestDesc(l,!0):null;this.target=d?d.dom:null;let{selection:c}=e.state;(0==n.button&&s.type.spec.draggable&&!1!==s.type.spec.selectable||c instanceof o.NodeSelection&&c.from<=r&&c.to>r)&&(this.mightDrag={node:s,pos:r,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!M||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ht(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Ce(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(mt(e))),this.updateAllowDefault(e),this.allowDefault||!t?ht(this.view,"pointer"):bt(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||E&&this.mightDrag&&!this.mightDrag.node.isAtom||k&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(yt(this.view,o.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):ht(this.view,"pointer")}move(e){this.updateAllowDefault(e),ht(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function Ot(e,t){return!!e.composing||!!(E&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}lt.touchstart=e=>{e.input.lastTouch=Date.now(),St(e),ht(e,"pointer")},lt.touchmove=e=>{e.input.lastTouch=Date.now(),ht(e,"pointer")},lt.contextmenu=e=>St(e);const Ct=V?5e3:-1;function Mt(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>kt(e),t))}function xt(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function kt(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(V&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),xt(e),t||e.docView&&e.docView.dirty){let t=Ne(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}dt.compositionstart=dt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>!1===e.type.spec.inclusive)))e.markCursor=e.state.storedMarks||n.marks(),kt(e,!0),e.markCursor=null;else if(kt(e),M&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,o=t.focusOffset;n&&1==n.nodeType&&0!=o;){let t=o<0?n.lastChild:n.childNodes[o-1];if(!t)break;if(3==t.nodeType){e.domSelection().collapse(t,t.nodeValue.length);break}n=t,o=-1}}e.input.composing=!0}Mt(e,Ct)},dt.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,Mt(e,20))};const Tt=O&&C<15||P&&B<604;function Et(e,t,n,o){let s=Ye(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",t=>t(e,o,s||i.Slice.empty)))return!0;if(!s)return!1;let r=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(s),l=r?e.state.tr.replaceSelectionWith(r,e.input.shiftKey):e.state.tr.replaceSelection(s);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}lt.copy=dt.cut=(e,t)=>{let n=t,o=e.state.selection,i="cut"==n.type;if(o.empty)return;let s=Tt?null:n.clipboardData,r=o.content(),{dom:l,text:d}=Xe(e,r);s?(n.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",d)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let o=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),o.removeAllRanges(),o.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}(e,l),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},dt.paste=(e,t)=>{let n=t;if(e.composing&&!V)return;let o=Tt?null:n.clipboardData;o&&Et(e,o.getData("text/plain"),o.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,o=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout(()=>{e.focus(),o.parentNode&&o.parentNode.removeChild(o),n?Et(e,o.value,null,t):Et(e,o.textContent,o.innerHTML,t)},50)}(e,n)};class Pt{constructor(e,t){this.slice=e,this.move=t}}const At=A?"altKey":"ctrlKey";lt.dragstart=(e,t)=>{let n=t,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let s=e.state.selection,r=s.empty?null:e.posAtCoords(mt(n));if(r&&r.pos>=s.from&&r.pos<=(s instanceof o.NodeSelection?s.to-1:s.to));else if(i&&i.mightDrag)e.dispatch(e.state.tr.setSelection(o.NodeSelection.create(e.state.doc,i.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(o.NodeSelection.create(e.state.doc,t.posBefore)))}let l=e.state.selection.content(),{dom:d,text:c}=Xe(e,l);n.dataTransfer.clearData(),n.dataTransfer.setData(Tt?"Text":"text/html",d.innerHTML),n.dataTransfer.effectAllowed="copyMove",Tt||n.dataTransfer.setData("text/plain",c),e.dragging=new Pt(l,!n[At])},lt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},dt.dragover=dt.dragenter=(e,t)=>t.preventDefault(),dt.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let l=e.posAtCoords(mt(n));if(!l)return;let d=e.state.doc.resolve(l.pos),c=r&&r.slice;c?e.someProp("transformPasted",e=>{c=e(c)}):c=Ye(e,n.dataTransfer.getData(Tt?"Text":"text/plain"),Tt?null:n.dataTransfer.getData("text/html"),!1,d);let a=!(!r||n[At]);if(e.someProp("handleDrop",t=>t(e,n,c||i.Slice.empty,a)))return void n.preventDefault();if(!c)return;n.preventDefault();let h=c?Object(s.dropPoint)(e.state.doc,d.pos,c):d.pos;null==h&&(h=d.pos);let u=e.state.tr;a&&u.deleteSelection();let f=u.mapping.map(h),p=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=u.doc;if(p?u.replaceRangeWith(f,f,c.content.firstChild):u.replaceRange(f,f,c),u.doc.eq(m))return;let g=u.doc.resolve(f);if(p&&o.NodeSelection.isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))u.setSelection(new o.NodeSelection(g));else{let t=u.mapping.map(h);u.mapping.maps[u.mapping.maps.length-1].forEach((e,n,o,i)=>t=i),u.setSelection(Re(e,g,u.doc.resolve(t)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))},lt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Ce(e)},20))},lt.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},lt.beforeinput=(e,t)=>{if(k&&V&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",t=>t(e,y(8,"Backspace"))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let yn in dt)lt[yn]=dt[yn];function Vt(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Rt{constructor(e,t){this.toDOM=e,this.spec=t||Lt,this.side=this.spec.side||0}map(e,t,n,o){let{pos:i,deleted:s}=e.mapResult(t.from+o,this.side<0?-1:1);return s?null:new zt(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof Rt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Vt(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Bt{constructor(e,t){this.attrs=e,this.spec=t||Lt}map(e,t,n,o){let i=e.map(t.from+o,this.spec.inclusiveStart?-1:1)-n,s=e.map(t.to+o,this.spec.inclusiveEnd?1:-1)-n;return i>=s?null:new zt(i,s,this)}valid(e,t){return t.from1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new zt(e,e,new Rt(t,n))}static inline(e,t,n,o){return new zt(e,t,new Bt(n,o))}static node(e,t,n,o){return new zt(e,t,new Ft(n,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Bt}}const It=[],Lt={};class qt{constructor(e,t){this.local=e.length?e:It,this.children=t.length?t:It}static create(e,t){return t.length?Gt(t,e,0,Lt):$t}find(e,t,n){let o=[];return this.findInner(null==e?0:e,null==t?1e9:t,o,0,n),o}findInner(e,t,n,o,i){for(let s=0;s=e&&(!i||i(r.spec))&&n.push(r.copy(r.from+o,r.to+o))}for(let s=0;se){let r=this.children[s]+1;this.children[s+2].findInner(e-r,t-r,n,o+r,i)}}map(e,t,n){return this==$t||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Lt)}mapInner(e,t,n,o,i){let s;for(let r=0;r{let r=s-o-(n-t);for(let d=0;ds+a-e)continue;let c=l[d]+a-e;n>=c?l[d+1]=t<=c?-2:-1:o>=i&&r&&(l[d]+=r,l[d+1]+=r)}e+=r}),a=n.maps[c].map(a,-1)}let d=!1;for(let c=0;c=o.content.size){d=!0;continue}let h=n.map(e[c+1]+s,-1)-i,{index:u,offset:f}=o.content.findIndex(a),p=o.maybeChild(u);if(p&&f==a&&f+p.nodeSize==h){let o=l[c+2].mapInner(n,p,t+1,e[c]+s+1,r);o!=$t?(l[c]=a,l[c+1]=h,l[c+2]=o):(l[c+1]=-2,d=!0)}else d=!0}if(d){let d=Gt(function(e,t,n,o,i,s,r){function l(e,t){for(let s=0;s{let r,l=s+n;if(r=_t(t,e,l)){for(o||(o=this.children.slice());is&&t.to=e){this.children[r]==e&&(n=this.children[r+2]);break}let i=e+1,s=i+t.content.size;for(let r=0;ri&&e.type instanceof Bt){let t=Math.max(i,e.from)-i,n=Math.min(s,e.to)-i;tn.map(e,t,Lt));return Kt.from(n)}forChild(e,t){if(t.isLeaf)return qt.empty;let n=[];for(let o=0;on&&s.to{let l=_t(e,t,r+n);if(l){s=!0;let e=Gt(l,t,n+r+1,o);e!=$t&&i.push(r,r+t.nodeSize,e)}});let r=Wt(s?Ht(e):e,-n).sort(Ut);for(let l=0;l0;)t++;e.splice(t,0,n)}function Xt(e){let t=[];return e.someProp("decorations",n=>{let o=n(e.state);o&&o!=$t&&t.push(o)}),e.cursorWrapper&&t.push(qt.create(e.state.doc,[e.cursorWrapper.deco])),Kt.from(t)}const Yt={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Qt=O&&C<=11;class Zt{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class en{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Zt,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(e=>{for(let t=0;t"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),Qt&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Yt)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Be(this.view)){if(this.suppressingSelectionUpdates)return Ce(this.view);if(O&&C<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&a(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,n=new Set;for(let i=e.focusNode;i;i=l(i))n.add(i);for(let i=e.anchorNode;i;i=l(i))if(n.has(i)){t=i;break}let o=t&&this.view.docView.nearestDesc(t);return o&&o.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let n=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Be(e)&&!this.ignoreSelectionChange(n),s=-1,r=-1,l=!1,d=[];if(e.editable)for(let o=0;o1){let e=d.filter(e=>"BR"==e.nodeName);if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}let c=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&e.input.lastTouch-1||i)&&(s>-1&&(e.docView.markDirty(s,r),function(e){if(tn.has(e))return;if(tn.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)){if(e.requiresGeckoHackNode=M,nn)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),nn=!0}}(e)),this.handleDOMChange(s,r,l,d),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Ce(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;nDate.now()-50?e.input.lastSelectionOrigin:null,n=Ne(e,t);if(n&&!e.state.selection.eq(n)){let o=e.state.tr.setSelection(n);"pointer"==t?o.setMeta("pointer",!0):"key"==t&&o.scrollIntoView(),e.dispatch(o)}return}let l=e.state.doc.resolve(t),d=l.sharedDepth(n);t=l.before(d+1),n=e.state.doc.resolve(n).after(d+1);let c,a,h=e.state.selection,u=function(e,t,n){let o,{node:s,fromOffset:r,toOffset:l,from:d,to:c}=e.docView.parseRange(t,n),a=e.domSelectionRange(),h=a.anchorNode;if(h&&e.dom.contains(1==h.nodeType?h:h.parentNode)&&(o=[{node:h,offset:a.anchorOffset}],g(a)||o.push({node:a.focusNode,offset:a.focusOffset})),k&&8===e.input.lastKeyCode)for(let i=l;i>r;i--){let e=s.childNodes[i-1],t=e.pmViewDesc;if("BR"==e.nodeName&&!t){l=i;break}if(!t||t.size)break}let u=e.state.doc,f=e.someProp("domParser")||i.DOMParser.fromSchema(e.state.schema),p=u.resolve(d),m=null,y=f.parse(s,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:r,to:l,preserveWhitespace:"pre"!=p.parent.type.whitespace||"full",findPositions:o,ruleFromNode:on,context:p});if(o&&null!=o[0].pos){let e=o[0].pos,t=o[1]&&o[1].pos;null==t&&(t=e),m={anchor:e+d,head:t+d}}return{doc:y,sel:m,from:d,to:c}}(e,t,n),f=e.state.doc,p=f.slice(u.from,u.to);8===e.input.lastKeyCode&&Date.now()-100=r?s-o:0,l=s+(l-r),r=s}else if(l=l?s-o:0,r=s+(r-l),l=s}return{start:s,endA:r,endB:l}}(p.content,u.doc.content,u.from,c,a);if((P&&e.input.lastIOSEnter>Date.now()-225||V)&&r.some(e=>"DIV"==e.nodeName||"P"==e.nodeName)&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",t=>t(e,y(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(!m){if(!(s&&h instanceof o.TextSelection&&!h.empty&&h.$head.sameParent(h.$anchor))||e.composing||u.sel&&u.sel.anchor!=u.sel.head){if(u.sel){let t=rn(e,e.state.doc,u.sel);t&&!t.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(t))}return}m={start:h.from,endA:h.to,endB:h.to}}if(k&&e.cursorWrapper&&u.sel&&u.sel.anchor==e.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let e=m.endB-m.start;u.sel={anchor:u.sel.anchor+e,head:u.sel.anchor+e}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?m.start=e.state.selection.from:m.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),O&&C<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>u.from&&"  "==u.doc.textBetween(m.start-u.from-1,m.start-u.from+1)&&(m.start--,m.endA--,m.endB--);let b,v=u.doc.resolveNoCache(m.start-u.from),w=u.doc.resolveNoCache(m.endB-u.from),S=f.resolve(m.start),D=v.sameParent(w)&&v.parent.inlineContent&&S.end()>=m.endA;if((P&&e.input.lastIOSEnter>Date.now()-225&&(!D||r.some(e=>"DIV"==e.nodeName||"P"==e.nodeName))||!D&&v.post(e,y(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>m.start&&function(e,t,n,o,i){if(!o.parent.isTextblock||n-t<=i.pos-o.pos||ln(o,!0,!1)n||ln(r,!0,!1)t(e,y(8,"Backspace"))))return void(V&&k&&e.domObserver.suppressSelectionUpdates());k&&V&&m.endB==m.start&&(e.input.lastAndroidDelete=Date.now()),V&&!D&&v.start()!=w.start()&&0==w.parentOffset&&v.depth==w.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==m.endA&&(m.endB-=2,w=u.doc.resolveNoCache(m.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",(function(t){return t(e,y(13,"Enter"))}))},20));let N,M,x,T=m.start,E=m.endA;if(D)if(v.pos==w.pos)O&&C<=11&&0==v.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ce(e),20)),N=e.state.tr.delete(T,E),M=f.resolve(m.start).marksAcross(f.resolve(m.endA));else if(m.endA==m.endB&&(x=function(e,t){let n,o,s,r=e.firstChild.marks,l=t.firstChild.marks,d=r,c=l;for(let i=0;ie.mark(o.addToSet(e.marks));else{if(0!=d.length||1!=c.length)return null;o=c[0],n="remove",s=e=>e.mark(o.removeFromSet(e.marks))}let a=[];for(let i=0;in(e,T,E,t)))return;N=e.state.tr.insertText(t,T,E)}if(N||(N=e.state.tr.replace(T,E,u.doc.slice(m.start-u.from,m.endB-u.from))),u.sel){let t=rn(e,N.doc,u.sel);t&&!(k&&V&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastAndroidDeletet.content.size?null:Re(e,t.resolve(n.anchor),t.resolve(n.head))}function ln(e,t,n){let o=e.depth,i=t?e.end():e.pos;for(;o>0&&(t||e.indexAfter(o)==e.node(o).childCount);)o--,i++,t=!1;if(n){let t=e.node(o).maybeChild(e.indexAfter(o));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}const dn=Xe,cn=Ye,an=kt;class hn{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new at,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(gn),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=pn(this),fn(this),this.nodeViews=mn(this),this.docView=de(this.state.doc,un(this),Xt(this),this.dom,this),this.domObserver=new en(this,(e,t,n,o)=>sn(this,e,t,n,o)),this.domObserver.start(),function(e){for(let t in lt){let n=lt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!pt(e,t)||ft(e,t)||!e.editable&&t.type in dt||n(e,t)},ct[t]?{passive:!0}:void 0)}E&&e.dom.addEventListener("input",()=>null),ut(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&ut(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(gn),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,o=!1,i=!1;e.storedMarks&&this.composing&&(xt(this),i=!0),this.state=e;let s=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(s||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=mn(this);(function(e,t){let n=0,o=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)o++;return n!=o})(e,this.nodeViews)&&(this.nodeViews=e,o=!0)}(s||t.handleDOMEvents!=this._props.handleDOMEvents)&&ut(this),this.editable=pn(this),fn(this);let r=Xt(this),l=un(this),d=n.plugins==e.plugins||n.doc.eq(e.doc)?e.scrollToSelection>n.scrollToSelection?"to selection":"preserve":"reset",c=o||!this.docView.matchesNode(e.doc,l,r);!c&&e.selection.eq(n.selection)||(i=!0);let h="preserve"==d&&i&&null==this.dom.style.overflowAnchor&&function(e){let t,n,o=e.dom.getBoundingClientRect(),i=Math.max(0,o.top);for(let s=(o.left+o.right)/2,r=i+1;r=i-20){t=o,n=l.top;break}}return{refDOM:t,refTop:n,stack:q(e.dom)}}(this);if(i){this.domObserver.stop();let t=c&&(O||k)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(n.selection,e.selection);if(c){let n=k?this.trackWrites=this.domSelectionRange().focusNode:null;!o&&this.docView.update(e.doc,l,r,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=de(e.doc,l,r,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return a(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Ce(this,t):(Ae(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),"reset"==d?this.dom.scrollTop=0:"to selection"==d?this.scrollToSelection():h&&function(e){let{refDOM:t,refTop:n,stack:o}=e,i=t?t.getBoundingClientRect().top:0;$(o,0==i?0:i-n)}(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",e=>e(this)));else if(this.state.selection instanceof o.NodeSelection){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&L(this,t.getBoundingClientRect(),e)}else L(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;tt.ownerDocument.getSelection()),this._root=t;return e||document}posAtCoords(e){return H(this,e)}coordsAtPos(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)}domAtPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=this.docView.posFromDOM(e,t,n);if(null==o)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,t){return ne(this,t||this.state,e)}destroy(){this.docView&&(!function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Xt(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){ft(e,t)||!lt[t.type]||!e.editable&&t.type in dt||lt[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return E&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom?function(e){let t;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}e.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",n,!0);let o=t.startContainer,i=t.startOffset,s=t.endContainer,r=t.endOffset,l=e.domAtPos(e.state.selection.anchor);return a(l.node,l.offset,s,r)&&([o,i,s,r]=[s,r,o,i]),{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:r}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function un(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e&&(t.class+=" "+n[e]),"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))}),[zt.node(0,e.state.doc.content.size,t)]}function fn(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:zt.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function pn(e){return!e.someProp("editable",t=>!1===t(e.state))}function mn(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function gn(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}}}]); +//# sourceMappingURL=0812f034-5e8354b69da97fc59d70.js.map \ No newline at end of file diff --git a/0812f034-5e8354b69da97fc59d70.js.map b/0812f034-5e8354b69da97fc59d70.js.map new file mode 100644 index 0000000..f4b42d7 --- /dev/null +++ b/0812f034-5e8354b69da97fc59d70.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/smartblock/node_modules/prosemirror-view/dist/index.js"],"names":["domIndex","node","index","previousSibling","parentNode","parent","assignedSlot","nodeType","host","reusedRange","textRange","from","to","range","document","createRange","setEnd","nodeValue","length","setStart","isEquivalentPosition","off","targetNode","targetOff","scanFor","atomElements","dir","nodeSize","hasBlockDesc","test","nodeName","contentEditable","childNodes","isOnEdge","offset","atStart","atEnd","dom","desc","cur","pmViewDesc","isBlock","contentDOM","selectionCollapsed","domSel","focusNode","focusOffset","anchorNode","anchorOffset","keyEvent","keyCode","key","event","createEvent","initEvent","code","nav","navigator","doc","agent","userAgent","ie_edge","exec","ie_upto10","ie_11up","ie","ie_version","documentMode","gecko","_chrome","chrome","chrome_version","safari","vendor","ios","maxTouchPoints","mac","platform","android","webkit","documentElement","style","webkit_version","windowRect","left","right","clientWidth","top","bottom","clientHeight","getSide","value","side","clientRect","rect","getBoundingClientRect","scaleX","width","offsetWidth","scaleY","height","offsetHeight","scrollRectIntoView","view","startDOM","scrollThreshold","someProp","scrollMargin","ownerDocument","elt","atTop","body","bounding","moveX","moveY","defaultView","scrollBy","startX","scrollLeft","startY","scrollTop","dX","dY","scrollStack","stack","push","restoreScrollStack","dTop","i","preventScrollSupported","findOffsetInNode","coords","closest","coordsClosest","dxClosest","rowBot","rowTop","child","firstChild","childIndex","nextSibling","rects","getClientRects","Math","max","min","dx","len","singleRect","inRect","findOffsetInText","posAtCoords","caretPositionFromPoint","pos","offsetNode","_","caretRangeFromPoint","startContainer","startOffset","root","elementFromPoint","contains","box","element","startI","floor","j","p","draggable","undefined","targetKludge","next","lastChild","state","content","size","outside","docView","nearestDesc","posBefore","posAfter","posFromDOM","posFromCaret","bias","posFromElement","inside","posAtStart","border","target","BIDI","coordsAtPos","atom","domFromPos","supportEmptyRange","takeSide","flattenV","rectBefore","rectAfter","resolve","inlineContent","before","flattenH","after","ignoreForCoords","x","y","withFlushedState","f","viewState","active","activeElement","updateState","focus","maybeRTL","cachedState","cachedDir","cachedResult","endOfTextblock","sel","selection","$pos","$from","$to","nearest","boxes","endOfTextblockVertical","$head","isTextblock","parentOffset","domSelection","textContent","modify","oldNode","oldOff","domSelectionRange","oldBidiLevel","caretBidiLevel","parentDOM","depth","domAfterPos","newNode","newOff","result","collapse","extend","endOfTextblockHorizontal","ViewDesc","children","this","dirty","widget","mark","outerDeco","innerDeco","destroy","posBeforeChild","domBefore","domAfter","posAtEnd","compareDocumentPosition","search","onlyNodes","arguments","first","nodeDOM","getDesc","scan","localPosFromDOM","end","descAt","prev","curPos","TrailingHackViewDesc","WidgetViewDesc","enter","domAtom","base","fromOffset","toOffset","childBase","parseRange","emptyChildAt","RangeError","anchor","head","force","setSelection","anchorDOM","headDOM","getSelection","brKludge","domSelExtended","tmp","removeAllRanges","addRange","mutation","type","startInside","endInside","contentLost","markDirty","level","self","toDOM","spec","raw","wrap","createElement","appendChild","classList","add","super","eq","ignore","stop","stopEvent","ignoreSelection","CompositionViewDesc","textDOM","text","mut","oldValue","MarkViewDesc","inline","custom","nodeViews","name","renderSpec","reparseInView","attrs","contentElement","copy","create","nodes","replaceNodes","NodeViewDesc","updateChildren","descObj","isText","createTextNode","hasAttribute","applyOuterDeco","CustomNodeViewDesc","TextViewDesc","rule","whitespace","preserveWhitespace","getContent","empty","sameOuterDeco","isLeaf","composition","composing","localCompositionInfo","localComposition","compositionInChild","updater","ViewTreeUpdater","deco","onWidget","onNode","locals","childCount","forChild","decoIndex","restNode","parentIndex","widgets","sort","compareSide","splice","cutAt","cut","isInline","filter","d","slice","iterDeco","insideNode","marks","syncToMarks","none","placeWidget","compIndex","findNodeMatch","findIndexWithChild","updateNodeAt","updateNextNode","addNode","addTextblockHacks","destroyRest","changed","protectLocalComposition","renderDescs","descs","written","childDOM","rm","insertBefore","trackWrites","oldCSS","cssText","window","getComputedStyle","listStyle","iosHacks","textNode","nearbyTextNode","textPos","frag","childStart","str","found","lastIndexOf","findTextInFragment","_ref2","topNode","removeChild","input","compositionNodes","sameMarkup","updateInner","updateOuterDeco","needsWrap","oldDOM","patchOuterDeco","computeOuterDeco","remove","removeAttribute","isAtom","docViewDesc","skip","pmIsDeco","inParent","n","update","selectNode","deselectNode","ignoreMutation","OuterDecoLevel","prototype","Object","noDeco","val","class","outerDOM","prevComputed","curComputed","curDOM","toLowerCase","patchAttributes","setAttribute","prevList","split","Boolean","curList","indexOf","m","prop","removeProperty","a","b","lock","preMatch","parentDesc","curDesc","descI","fI","matched","Map","matches","outer","set","reverse","start","destroyBetween","keep","maxKeep","matchesMark","spanning","pop","markDesc","targetDesc","matchesNode","e","has","domNode","get","nextDOM","matchesWidget","requiresGeckoHackNode","addHackNode","matchesHack","className","alt","hack","replacement","selectionFromDOM","origin","inWidget","$anchor","nearestDescNode","isSelectable","selectionBetween","editorOwnsSelection","editable","hasFocus","hasSelection","selectionToDOM","syncNodeSelection","mouseDown","allowDefault","curSel","domObserver","currentSelection","delayedSelectionSync","setCurSelection","disconnectSelection","cursorWrapper","selectCursorWrapper","resetEditableFrom","resetEditableTo","brokenSelectBetweenUneditable","temporarilyEditableNear","resetEditable","visible","removeClassOnSelectionChange","connectSelection","setEditable","wasDraggable","removeEventListener","hideSelectionGuard","addEventListener","setTimeout","img","disabled","lastSelectedViewDesc","clearNodeSelection","between","hasFocusAndSelection","moveSelectionBlock","$side","$start","findFrom","apply","dispatch","tr","scrollIntoView","selectHorizontally","mods","textOffset","nodeBefore","nodeAfter","nodePos","nodeLen","isIgnorable","skipIgnoredNodesLeft","moveNode","moveOffset","isBlockNode","setSelFocus","skipIgnoredNodesRight","selectVertically","beyond","near","stopNativeHorizontalDelete","sameParent","nextNode","delete","switchEditable","captureKeyDown","ctrlKey","metaKey","altKey","shiftKey","getMods","safariDownArrowBug","serializeForClipboard","context","openStart","openEnd","defaultAttrs","serializer","fromSchema","schema","detachedDoc","serializeFragment","wrappers","wrapMap","wrapper","JSON","stringify","textBetween","parseFromClipboard","html","plainText","$context","inCode","asText","replace","parsed","forEach","block","serializeNode","metas","firstTag","map","join","innerHTML","querySelector","readHTML","querySelectorAll","replaceChild","restoreReplacedSpaces","contextNode","sliceData","getAttribute","parser","parseSlice","ruleFromNode","inlineParents","array","parse","hasRequiredAttrs","addContext","closeSlice","maxOpen","fragment","lastWrap","match","contentMatchAt","inLast","findWrapping","addToSibling","closeRight","wrapped","withWrappers","matchType","normalizeSiblings","isolating","sibling","inner","append","fill","fillBefore","closeRange","thead","tbody","tfoot","caption","colgroup","col","td","th","_detachedDoc","implementation","createHTMLDocument","handlers","editHandlers","passiveHandlers","touchstart","touchmove","InputState","lastKeyCode","lastKeyCodeTime","lastClick","time","lastSelectionOrigin","lastSelectionTime","lastIOSEnter","lastIOSEnterFallbackTimeout","lastFocus","lastTouch","lastAndroidDelete","composingTimeout","compositionEndedAt","domChangeCount","eventHandlers","setSelectionOrigin","Date","now","ensureListeners","currentHandlers","runCustomHandler","handler","defaultPrevented","eventBelongsToView","bubbles","eventCoords","clientX","clientY","runHandlerOnContext","propName","updateSelection","focused","setMeta","handleSingleClick","selectedNode","selectAt","selectClickedNode","selectClickedLeaf","handleDoubleClick","handleTripleClick","button","defaultTripleClick","forceDOMFlush","endComposition","keydown","_event","inOrNearComposition","forceFlush","preventDefault","keyup","keypress","charCode","String","fromCharCode","insertText","selectNodeModifier","mousedown","flushed","click","dy","isNear","done","MouseDown","targetPos","mightDrag","startDoc","nodeAt","selectable","addAttr","setUneditable","up","bind","move","updateAllowDefault","abs","buttons","timeStamp","contextmenu","timeoutComposition","scheduleComposeEnd","delay","clearTimeout","clearComposition","timestampFromCustomEvent","markParentsDirty","forceUpdate","flushingSoon","compositionstart","compositionupdate","flush","storedMarks","some","inclusive","markCursor","compositionend","brokenClipboardAPI","doPaste","singleNode","sliceSingleNode","replaceSelectionWith","replaceSelection","data","clipboardData","clearData","setData","selectNodeContents","blur","captureCopy","deleteSelection","paste","getData","capturePaste","Dragging","dragCopyModifier","dragstart","dataTransfer","effectAllowed","dragging","dragend","dragover","dragenter","drop","eventPos","$mouse","insertPos","mapping","isNode","beforeInsert","replaceRangeWith","replaceRange","maps","_from","_to","_newFrom","newTo","relatedTarget","clear","beforeinput","inputType","flushSoon","$cursor","compareObjs","WidgetType","noSpec","span","oldOffset","deleted","mapResult","Decoration","other","InlineType","inclusiveStart","inclusiveEnd","NodeType","findIndex","DecorationSet","local","decorations","buildTree","predicate","findInner","childOff","options","mapInner","newLocal","mapped","valid","onRemove","oldChildren","baseOffset","moved","oldStart","oldEnd","newStart","newEnd","dSize","mustRebuild","fromLocal","toLocal","childOffset","childNode","maybeChild","built","gather","mapAndGatherRemainingDecorations","byPos","mapChildren","addInner","takeSpansForNode","moveSpans","withoutNulls","concat","removeInner","removed","dec","localSet","DecorationGroup","removeOverlap","localsInner","is","members","mappedDecos","member","sorted","spans","hasNulls","localStart","subtree","working","insertAhead","viewDecorations","observeOptions","childList","characterData","characterDataOldValue","attributes","attributeOldValue","useCharData","SelectionState","DOMObserver","handleDOMChange","queue","observer","onCharData","suppressingSelectionUpdates","MutationObserver","mutations","removedNodes","prevValue","onSelectionChange","takeRecords","observe","take","disconnect","container","ancestors","Set","newSel","ignoreSelectionChange","typeOver","added","registerMutation","brs","readSel","scrollToSelection","cssChecked","whiteSpace","cssCheckWarned","console","checkCSS","attributeName","addedNodes","Array","call","WeakMap","parseRule","readDOMChange","$before","shared","sharedDepth","preferredPos","preferredSide","from_","to_","find","topMatch","topOpen","findPositions","parseBetween","compare","change","findDiffStart","endA","endB","findDiffEnd","adjust","findDiff","resolveSelection","nextSel","resolveNoCache","$fromA","inlineChange","old","$newStart","$newEnd","skipClosingAndOpening","$next","looksLikeJoin","suppressSelectionUpdates","markChange","chFrom","chTo","marksAcross","curMarks","prevMarks","removeFromSet","addToSet","updated","isMarkChange","addMark","removeMark","ensureMarks","parsedSel","fromEnd","mayOpen","indexAfter","__serializeForClipboard","__parseFromClipboard","__endComposition","EditorView","place","props","_root","mounted","prevDirectPlugins","pluginViews","_props","directPlugins","plugins","checkStateComponent","mount","getEditable","updateCursorWrapper","buildNodeViews","computeDocDeco","passive","initInput","updatePluginViews","handleDOMEvents","prevProps","updateStateInner","redraw","updateSel","pluginsChanged","nA","nB","changedNodeViews","scroll","updateDoc","oldScrollPos","overflowAnchor","refDOM","refTop","innerHeight","localRect","storeScrollPos","forceSelUpdate","sel1","sel2","selectionContextChanged","chromeKludge","anchorInRightPlace","_ref","newRefTop","resetScrollPos","prevState","pluginView","destroyPluginViews","plugin","parentElement","setActive","stored","preventScroll","focusPreventScroll","cached","getPrototypeOf","destroyInput","dispatchEvent","dispatchTransaction","shadowRoot","deepActiveElement","read","stopImmediatePropagation","getTargetRanges","execCommand","endContainer","endOffset","currentAnchor","domAtPos","safariShadowSelectionRange","contenteditable","translate","attr","obj","hasOwnProperty","filterTransaction","appendTransaction"],"mappings":"6FAAA,uVAGA,MAAMA,EAAW,SAAUC,GACzB,IAAK,IAAIC,EAAQ,GAAIA,IAEnB,KADAD,EAAOA,EAAKE,iBACD,OAAOD,GAGhBE,EAAa,SAAUH,GAC3B,IAAII,EAASJ,EAAKK,cAAgBL,EAAKG,WACvC,OAAOC,GAA6B,IAAnBA,EAAOE,SAAiBF,EAAOG,KAAOH,GAEzD,IAAII,EAAc,KAIlB,MAAMC,EAAY,SAAUT,EAAMU,EAAMC,GACtC,IAAIC,EAAQJ,IAAgBA,EAAcK,SAASC,eAGnD,OAFAF,EAAMG,OAAOf,EAAY,MAANW,EAAaX,EAAKgB,UAAUC,OAASN,GACxDC,EAAMM,SAASlB,EAAMU,GAAQ,GACtBE,GAKHO,EAAuB,SAAUnB,EAAMoB,EAAKC,EAAYC,GAC5D,OAAOD,IAAeE,EAAQvB,EAAMoB,EAAKC,EAAYC,GAAY,IAAMC,EAAQvB,EAAMoB,EAAKC,EAAYC,EAAW,KAE7GE,EAAe,gCACrB,SAASD,EAAQvB,EAAMoB,EAAKC,EAAYC,EAAWG,GACjD,OAAS,CACP,GAAIzB,GAAQqB,GAAcD,GAAOE,EAAW,OAAO,EACnD,GAAIF,IAAQK,EAAM,EAAI,EAAIC,EAAS1B,IAAQ,CACzC,IAAII,EAASJ,EAAKG,WAClB,IAAKC,GAA6B,GAAnBA,EAAOE,UAAiBqB,EAAa3B,IAASwB,EAAaI,KAAK5B,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sourcesContent":["import { TextSelection, NodeSelection, Selection, AllSelection } from 'prosemirror-state';\nimport { DOMSerializer, Fragment, Mark, Slice, DOMParser } from 'prosemirror-model';\nimport { dropPoint } from 'prosemirror-transform';\nconst domIndex = function (node) {\n for (var index = 0;; index++) {\n node = node.previousSibling;\n if (!node) return index;\n }\n};\nconst parentNode = function (node) {\n let parent = node.assignedSlot || node.parentNode;\n return parent && parent.nodeType == 11 ? parent.host : parent;\n};\nlet reusedRange = null;\n// Note that this will always return the same range, because DOM range\n// objects are every expensive, and keep slowing down subsequent DOM\n// updates, for some reason.\nconst textRange = function (node, from, to) {\n let range = reusedRange || (reusedRange = document.createRange());\n range.setEnd(node, to == null ? node.nodeValue.length : to);\n range.setStart(node, from || 0);\n return range;\n};\n// Scans forward and backward through DOM positions equivalent to the\n// given one to see if the two are in the same place (i.e. after a\n// text node vs at the end of that text node)\nconst isEquivalentPosition = function (node, off, targetNode, targetOff) {\n return targetNode && (scanFor(node, off, targetNode, targetOff, -1) || scanFor(node, off, targetNode, targetOff, 1));\n};\nconst atomElements = /^(img|br|input|textarea|hr)$/i;\nfunction scanFor(node, off, targetNode, targetOff, dir) {\n for (;;) {\n if (node == targetNode && off == targetOff) return true;\n if (off == (dir < 0 ? 0 : nodeSize(node))) {\n let parent = node.parentNode;\n if (!parent || parent.nodeType != 1 || hasBlockDesc(node) || atomElements.test(node.nodeName) || node.contentEditable == \"false\") return false;\n off = domIndex(node) + (dir < 0 ? 0 : 1);\n node = parent;\n } else if (node.nodeType == 1) {\n node = node.childNodes[off + (dir < 0 ? -1 : 0)];\n if (node.contentEditable == \"false\") return false;\n off = dir < 0 ? nodeSize(node) : 0;\n } else {\n return false;\n }\n }\n}\nfunction nodeSize(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;\n}\nfunction isOnEdge(node, offset, parent) {\n for (let atStart = offset == 0, atEnd = offset == nodeSize(node); atStart || atEnd;) {\n if (node == parent) return true;\n let index = domIndex(node);\n node = node.parentNode;\n if (!node) return false;\n atStart = atStart && index == 0;\n atEnd = atEnd && index == nodeSize(node);\n }\n}\nfunction hasBlockDesc(dom) {\n let desc;\n for (let cur = dom; cur; cur = cur.parentNode) if (desc = cur.pmViewDesc) break;\n return desc && desc.node && desc.node.isBlock && (desc.dom == dom || desc.contentDOM == dom);\n}\n// Work around Chrome issue https://bugs.chromium.org/p/chromium/issues/detail?id=447523\n// (isCollapsed inappropriately returns true in shadow dom)\nconst selectionCollapsed = function (domSel) {\n return domSel.focusNode && isEquivalentPosition(domSel.focusNode, domSel.focusOffset, domSel.anchorNode, domSel.anchorOffset);\n};\nfunction keyEvent(keyCode, key) {\n let event = document.createEvent(\"Event\");\n event.initEvent(\"keydown\", true, true);\n event.keyCode = keyCode;\n event.key = event.code = key;\n return event;\n}\nfunction deepActiveElement(doc) {\n let elt = doc.activeElement;\n while (elt && elt.shadowRoot) elt = elt.shadowRoot.activeElement;\n return elt;\n}\nconst nav = typeof navigator != \"undefined\" ? navigator : null;\nconst doc = typeof document != \"undefined\" ? document : null;\nconst agent = nav && nav.userAgent || \"\";\nconst ie_edge = /Edge\\/(\\d+)/.exec(agent);\nconst ie_upto10 = /MSIE \\d/.exec(agent);\nconst ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(agent);\nconst ie = !!(ie_upto10 || ie_11up || ie_edge);\nconst ie_version = ie_upto10 ? document.documentMode : ie_11up ? +ie_11up[1] : ie_edge ? +ie_edge[1] : 0;\nconst gecko = !ie && /gecko\\/(\\d+)/i.test(agent);\ngecko && +(/Firefox\\/(\\d+)/.exec(agent) || [0, 0])[1];\nconst _chrome = !ie && /Chrome\\/(\\d+)/.exec(agent);\nconst chrome = !!_chrome;\nconst chrome_version = _chrome ? +_chrome[1] : 0;\nconst safari = !ie && !!nav && /Apple Computer/.test(nav.vendor);\n// Is true for both iOS and iPadOS for convenience\nconst ios = safari && (/Mobile\\/\\w+/.test(agent) || !!nav && nav.maxTouchPoints > 2);\nconst mac = ios || (nav ? /Mac/.test(nav.platform) : false);\nconst android = /Android \\d/.test(agent);\nconst webkit = !!doc && \"webkitFontSmoothing\" in doc.documentElement.style;\nconst webkit_version = webkit ? +(/\\bAppleWebKit\\/(\\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;\nfunction windowRect(doc) {\n return {\n left: 0,\n right: doc.documentElement.clientWidth,\n top: 0,\n bottom: doc.documentElement.clientHeight\n };\n}\nfunction getSide(value, side) {\n return typeof value == \"number\" ? value : value[side];\n}\nfunction clientRect(node) {\n let rect = node.getBoundingClientRect();\n // Adjust for elements with style \"transform: scale()\"\n let scaleX = rect.width / node.offsetWidth || 1;\n let scaleY = rect.height / node.offsetHeight || 1;\n // Make sure scrollbar width isn't included in the rectangle\n return {\n left: rect.left,\n right: rect.left + node.clientWidth * scaleX,\n top: rect.top,\n bottom: rect.top + node.clientHeight * scaleY\n };\n}\nfunction scrollRectIntoView(view, rect, startDOM) {\n let scrollThreshold = view.someProp(\"scrollThreshold\") || 0,\n scrollMargin = view.someProp(\"scrollMargin\") || 5;\n let doc = view.dom.ownerDocument;\n for (let parent = startDOM || view.dom;; parent = parentNode(parent)) {\n if (!parent) break;\n if (parent.nodeType != 1) continue;\n let elt = parent;\n let atTop = elt == doc.body;\n let bounding = atTop ? windowRect(doc) : clientRect(elt);\n let moveX = 0,\n moveY = 0;\n if (rect.top < bounding.top + getSide(scrollThreshold, \"top\")) moveY = -(bounding.top - rect.top + getSide(scrollMargin, \"top\"));else if (rect.bottom > bounding.bottom - getSide(scrollThreshold, \"bottom\")) moveY = rect.bottom - bounding.bottom + getSide(scrollMargin, \"bottom\");\n if (rect.left < bounding.left + getSide(scrollThreshold, \"left\")) moveX = -(bounding.left - rect.left + getSide(scrollMargin, \"left\"));else if (rect.right > bounding.right - getSide(scrollThreshold, \"right\")) moveX = rect.right - bounding.right + getSide(scrollMargin, \"right\");\n if (moveX || moveY) {\n if (atTop) {\n doc.defaultView.scrollBy(moveX, moveY);\n } else {\n let startX = elt.scrollLeft,\n startY = elt.scrollTop;\n if (moveY) elt.scrollTop += moveY;\n if (moveX) elt.scrollLeft += moveX;\n let dX = elt.scrollLeft - startX,\n dY = elt.scrollTop - startY;\n rect = {\n left: rect.left - dX,\n top: rect.top - dY,\n right: rect.right - dX,\n bottom: rect.bottom - dY\n };\n }\n }\n if (atTop) break;\n }\n}\n// Store the scroll position of the editor's parent nodes, along with\n// the top position of an element near the top of the editor, which\n// will be used to make sure the visible viewport remains stable even\n// when the size of the content above changes.\nfunction storeScrollPos(view) {\n let rect = view.dom.getBoundingClientRect(),\n startY = Math.max(0, rect.top);\n let refDOM, refTop;\n for (let x = (rect.left + rect.right) / 2, y = startY + 1; y < Math.min(innerHeight, rect.bottom); y += 5) {\n let dom = view.root.elementFromPoint(x, y);\n if (!dom || dom == view.dom || !view.dom.contains(dom)) continue;\n let localRect = dom.getBoundingClientRect();\n if (localRect.top >= startY - 20) {\n refDOM = dom;\n refTop = localRect.top;\n break;\n }\n }\n return {\n refDOM: refDOM,\n refTop: refTop,\n stack: scrollStack(view.dom)\n };\n}\nfunction scrollStack(dom) {\n let stack = [],\n doc = dom.ownerDocument;\n for (let cur = dom; cur; cur = parentNode(cur)) {\n stack.push({\n dom: cur,\n top: cur.scrollTop,\n left: cur.scrollLeft\n });\n if (dom == doc) break;\n }\n return stack;\n}\n// Reset the scroll position of the editor's parent nodes to that what\n// it was before, when storeScrollPos was called.\nfunction resetScrollPos(_ref) {\n let {\n refDOM,\n refTop,\n stack\n } = _ref;\n let newRefTop = refDOM ? refDOM.getBoundingClientRect().top : 0;\n restoreScrollStack(stack, newRefTop == 0 ? 0 : newRefTop - refTop);\n}\nfunction restoreScrollStack(stack, dTop) {\n for (let i = 0; i < stack.length; i++) {\n let {\n dom,\n top,\n left\n } = stack[i];\n if (dom.scrollTop != top + dTop) dom.scrollTop = top + dTop;\n if (dom.scrollLeft != left) dom.scrollLeft = left;\n }\n}\nlet preventScrollSupported = null;\n// Feature-detects support for .focus({preventScroll: true}), and uses\n// a fallback kludge when not supported.\nfunction focusPreventScroll(dom) {\n if (dom.setActive) return dom.setActive(); // in IE\n if (preventScrollSupported) return dom.focus(preventScrollSupported);\n let stored = scrollStack(dom);\n dom.focus(preventScrollSupported == null ? {\n get preventScroll() {\n preventScrollSupported = {\n preventScroll: true\n };\n return true;\n }\n } : undefined);\n if (!preventScrollSupported) {\n preventScrollSupported = false;\n restoreScrollStack(stored, 0);\n }\n}\nfunction findOffsetInNode(node, coords) {\n let closest,\n dxClosest = 2e8,\n coordsClosest,\n offset = 0;\n let rowBot = coords.top,\n rowTop = coords.top;\n for (let child = node.firstChild, childIndex = 0; child; child = child.nextSibling, childIndex++) {\n let rects;\n if (child.nodeType == 1) rects = child.getClientRects();else if (child.nodeType == 3) rects = textRange(child).getClientRects();else continue;\n for (let i = 0; i < rects.length; i++) {\n let rect = rects[i];\n if (rect.top <= rowBot && rect.bottom >= rowTop) {\n rowBot = Math.max(rect.bottom, rowBot);\n rowTop = Math.min(rect.top, rowTop);\n let dx = rect.left > coords.left ? rect.left - coords.left : rect.right < coords.left ? coords.left - rect.right : 0;\n if (dx < dxClosest) {\n closest = child;\n dxClosest = dx;\n coordsClosest = dx && closest.nodeType == 3 ? {\n left: rect.right < coords.left ? rect.right : rect.left,\n top: coords.top\n } : coords;\n if (child.nodeType == 1 && dx) offset = childIndex + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0);\n continue;\n }\n }\n if (!closest && (coords.left >= rect.right && coords.top >= rect.top || coords.left >= rect.left && coords.top >= rect.bottom)) offset = childIndex + 1;\n }\n }\n if (closest && closest.nodeType == 3) return findOffsetInText(closest, coordsClosest);\n if (!closest || dxClosest && closest.nodeType == 1) return {\n node,\n offset\n };\n return findOffsetInNode(closest, coordsClosest);\n}\nfunction findOffsetInText(node, coords) {\n let len = node.nodeValue.length;\n let range = document.createRange();\n for (let i = 0; i < len; i++) {\n range.setEnd(node, i + 1);\n range.setStart(node, i);\n let rect = singleRect(range, 1);\n if (rect.top == rect.bottom) continue;\n if (inRect(coords, rect)) return {\n node,\n offset: i + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0)\n };\n }\n return {\n node,\n offset: 0\n };\n}\nfunction inRect(coords, rect) {\n return coords.left >= rect.left - 1 && coords.left <= rect.right + 1 && coords.top >= rect.top - 1 && coords.top <= rect.bottom + 1;\n}\nfunction targetKludge(dom, coords) {\n let parent = dom.parentNode;\n if (parent && /^li$/i.test(parent.nodeName) && coords.left < dom.getBoundingClientRect().left) return parent;\n return dom;\n}\nfunction posFromElement(view, elt, coords) {\n let {\n node,\n offset\n } = findOffsetInNode(elt, coords),\n bias = -1;\n if (node.nodeType == 1 && !node.firstChild) {\n let rect = node.getBoundingClientRect();\n bias = rect.left != rect.right && coords.left > (rect.left + rect.right) / 2 ? 1 : -1;\n }\n return view.docView.posFromDOM(node, offset, bias);\n}\nfunction posFromCaret(view, node, offset, coords) {\n // Browser (in caretPosition/RangeFromPoint) will agressively\n // normalize towards nearby inline nodes. Since we are interested in\n // positions between block nodes too, we first walk up the hierarchy\n // of nodes to see if there are block nodes that the coordinates\n // fall outside of. If so, we take the position before/after that\n // block. If not, we call `posFromDOM` on the raw node/offset.\n let outside = -1;\n for (let cur = node;;) {\n if (cur == view.dom) break;\n let desc = view.docView.nearestDesc(cur, true);\n if (!desc) return null;\n if (desc.node.isBlock && desc.parent) {\n let rect = desc.dom.getBoundingClientRect();\n if (rect.left > coords.left || rect.top > coords.top) outside = desc.posBefore;else if (rect.right < coords.left || rect.bottom < coords.top) outside = desc.posAfter;else break;\n }\n cur = desc.dom.parentNode;\n }\n return outside > -1 ? outside : view.docView.posFromDOM(node, offset, 1);\n}\nfunction elementFromPoint(element, coords, box) {\n let len = element.childNodes.length;\n if (len && box.top < box.bottom) {\n for (let startI = Math.max(0, Math.min(len - 1, Math.floor(len * (coords.top - box.top) / (box.bottom - box.top)) - 2)), i = startI;;) {\n let child = element.childNodes[i];\n if (child.nodeType == 1) {\n let rects = child.getClientRects();\n for (let j = 0; j < rects.length; j++) {\n let rect = rects[j];\n if (inRect(coords, rect)) return elementFromPoint(child, coords, rect);\n }\n }\n if ((i = (i + 1) % len) == startI) break;\n }\n }\n return element;\n}\n// Given an x,y position on the editor, get the position in the document.\nfunction posAtCoords(view, coords) {\n let doc = view.dom.ownerDocument,\n node,\n offset = 0;\n if (doc.caretPositionFromPoint) {\n try {\n // Firefox throws for this call in hard-to-predict circumstances (#994)\n let pos = doc.caretPositionFromPoint(coords.left, coords.top);\n if (pos) ({\n offsetNode: node,\n offset\n } = pos);\n } catch (_) {}\n }\n if (!node && doc.caretRangeFromPoint) {\n let range = doc.caretRangeFromPoint(coords.left, coords.top);\n if (range) ({\n startContainer: node,\n startOffset: offset\n } = range);\n }\n let elt = (view.root.elementFromPoint ? view.root : doc).elementFromPoint(coords.left, coords.top);\n let pos;\n if (!elt || !view.dom.contains(elt.nodeType != 1 ? elt.parentNode : elt)) {\n let box = view.dom.getBoundingClientRect();\n if (!inRect(coords, box)) return null;\n elt = elementFromPoint(view.dom, coords, box);\n if (!elt) return null;\n }\n // Safari's caretRangeFromPoint returns nonsense when on a draggable element\n if (safari) {\n for (let p = elt; node && p; p = parentNode(p)) if (p.draggable) node = undefined;\n }\n elt = targetKludge(elt, coords);\n if (node) {\n if (gecko && node.nodeType == 1) {\n // Firefox will sometimes return offsets into nodes, which\n // have no actual children, from caretPositionFromPoint (#953)\n offset = Math.min(offset, node.childNodes.length);\n // It'll also move the returned position before image nodes,\n // even if those are behind it.\n if (offset < node.childNodes.length) {\n let next = node.childNodes[offset],\n box;\n if (next.nodeName == \"IMG\" && (box = next.getBoundingClientRect()).right <= coords.left && box.bottom > coords.top) offset++;\n }\n }\n // Suspiciously specific kludge to work around caret*FromPoint\n // never returning a position at the end of the document\n if (node == view.dom && offset == node.childNodes.length - 1 && node.lastChild.nodeType == 1 && coords.top > node.lastChild.getBoundingClientRect().bottom) pos = view.state.doc.content.size;\n // Ignore positions directly after a BR, since caret*FromPoint\n // 'round up' positions that would be more accurately placed\n // before the BR node.\n else if (offset == 0 || node.nodeType != 1 || node.childNodes[offset - 1].nodeName != \"BR\") pos = posFromCaret(view, node, offset, coords);\n }\n if (pos == null) pos = posFromElement(view, elt, coords);\n let desc = view.docView.nearestDesc(elt, true);\n return {\n pos,\n inside: desc ? desc.posAtStart - desc.border : -1\n };\n}\nfunction singleRect(target, bias) {\n let rects = target.getClientRects();\n return !rects.length ? target.getBoundingClientRect() : rects[bias < 0 ? 0 : rects.length - 1];\n}\nconst BIDI = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n// Given a position in the document model, get a bounding box of the\n// character at that position, relative to the window.\nfunction coordsAtPos(view, pos, side) {\n let {\n node,\n offset,\n atom\n } = view.docView.domFromPos(pos, side < 0 ? -1 : 1);\n let supportEmptyRange = webkit || gecko;\n if (node.nodeType == 3) {\n // These browsers support querying empty text ranges. Prefer that in\n // bidi context or when at the end of a node.\n if (supportEmptyRange && (BIDI.test(node.nodeValue) || (side < 0 ? !offset : offset == node.nodeValue.length))) {\n let rect = singleRect(textRange(node, offset, offset), side);\n // Firefox returns bad results (the position before the space)\n // when querying a position directly after line-broken\n // whitespace. Detect this situation and and kludge around it\n if (gecko && offset && /\\s/.test(node.nodeValue[offset - 1]) && offset < node.nodeValue.length) {\n let rectBefore = singleRect(textRange(node, offset - 1, offset - 1), -1);\n if (rectBefore.top == rect.top) {\n let rectAfter = singleRect(textRange(node, offset, offset + 1), -1);\n if (rectAfter.top != rect.top) return flattenV(rectAfter, rectAfter.left < rectBefore.left);\n }\n }\n return rect;\n } else {\n let from = offset,\n to = offset,\n takeSide = side < 0 ? 1 : -1;\n if (side < 0 && !offset) {\n to++;\n takeSide = -1;\n } else if (side >= 0 && offset == node.nodeValue.length) {\n from--;\n takeSide = 1;\n } else if (side < 0) {\n from--;\n } else {\n to++;\n }\n return flattenV(singleRect(textRange(node, from, to), 1), takeSide < 0);\n }\n }\n let $dom = view.state.doc.resolve(pos - (atom || 0));\n // Return a horizontal line in block context\n if (!$dom.parent.inlineContent) {\n if (atom == null && offset && (side < 0 || offset == nodeSize(node))) {\n let before = node.childNodes[offset - 1];\n if (before.nodeType == 1) return flattenH(before.getBoundingClientRect(), false);\n }\n if (atom == null && offset < nodeSize(node)) {\n let after = node.childNodes[offset];\n if (after.nodeType == 1) return flattenH(after.getBoundingClientRect(), true);\n }\n return flattenH(node.getBoundingClientRect(), side >= 0);\n }\n // Inline, not in text node (this is not Bidi-safe)\n if (atom == null && offset && (side < 0 || offset == nodeSize(node))) {\n let before = node.childNodes[offset - 1];\n let target = before.nodeType == 3 ? textRange(before, nodeSize(before) - (supportEmptyRange ? 0 : 1))\n // BR nodes tend to only return the rectangle before them.\n // Only use them if they are the last element in their parent\n : before.nodeType == 1 && (before.nodeName != \"BR\" || !before.nextSibling) ? before : null;\n if (target) return flattenV(singleRect(target, 1), false);\n }\n if (atom == null && offset < nodeSize(node)) {\n let after = node.childNodes[offset];\n while (after.pmViewDesc && after.pmViewDesc.ignoreForCoords) after = after.nextSibling;\n let target = !after ? null : after.nodeType == 3 ? textRange(after, 0, supportEmptyRange ? 0 : 1) : after.nodeType == 1 ? after : null;\n if (target) return flattenV(singleRect(target, -1), true);\n }\n // All else failed, just try to get a rectangle for the target node\n return flattenV(singleRect(node.nodeType == 3 ? textRange(node) : node, -side), side >= 0);\n}\nfunction flattenV(rect, left) {\n if (rect.width == 0) return rect;\n let x = left ? rect.left : rect.right;\n return {\n top: rect.top,\n bottom: rect.bottom,\n left: x,\n right: x\n };\n}\nfunction flattenH(rect, top) {\n if (rect.height == 0) return rect;\n let y = top ? rect.top : rect.bottom;\n return {\n top: y,\n bottom: y,\n left: rect.left,\n right: rect.right\n };\n}\nfunction withFlushedState(view, state, f) {\n let viewState = view.state,\n active = view.root.activeElement;\n if (viewState != state) view.updateState(state);\n if (active != view.dom) view.focus();\n try {\n return f();\n } finally {\n if (viewState != state) view.updateState(viewState);\n if (active != view.dom && active) active.focus();\n }\n}\n// Whether vertical position motion in a given direction\n// from a position would leave a text block.\nfunction endOfTextblockVertical(view, state, dir) {\n let sel = state.selection;\n let $pos = dir == \"up\" ? sel.$from : sel.$to;\n return withFlushedState(view, state, () => {\n let {\n node: dom\n } = view.docView.domFromPos($pos.pos, dir == \"up\" ? -1 : 1);\n for (;;) {\n let nearest = view.docView.nearestDesc(dom, true);\n if (!nearest) break;\n if (nearest.node.isBlock) {\n dom = nearest.dom;\n break;\n }\n dom = nearest.dom.parentNode;\n }\n let coords = coordsAtPos(view, $pos.pos, 1);\n for (let child = dom.firstChild; child; child = child.nextSibling) {\n let boxes;\n if (child.nodeType == 1) boxes = child.getClientRects();else if (child.nodeType == 3) boxes = textRange(child, 0, child.nodeValue.length).getClientRects();else continue;\n for (let i = 0; i < boxes.length; i++) {\n let box = boxes[i];\n if (box.bottom > box.top + 1 && (dir == \"up\" ? coords.top - box.top > (box.bottom - coords.top) * 2 : box.bottom - coords.bottom > (coords.bottom - box.top) * 2)) return false;\n }\n }\n return true;\n });\n}\nconst maybeRTL = /[\\u0590-\\u08ac]/;\nfunction endOfTextblockHorizontal(view, state, dir) {\n let {\n $head\n } = state.selection;\n if (!$head.parent.isTextblock) return false;\n let offset = $head.parentOffset,\n atStart = !offset,\n atEnd = offset == $head.parent.content.size;\n let sel = view.domSelection();\n // If the textblock is all LTR, or the browser doesn't support\n // Selection.modify (Edge), fall back to a primitive approach\n if (!maybeRTL.test($head.parent.textContent) || !sel.modify) return dir == \"left\" || dir == \"backward\" ? atStart : atEnd;\n return withFlushedState(view, state, () => {\n // This is a huge hack, but appears to be the best we can\n // currently do: use `Selection.modify` to move the selection by\n // one character, and see if that moves the cursor out of the\n // textblock (or doesn't move it at all, when at the start/end of\n // the document).\n let {\n focusNode: oldNode,\n focusOffset: oldOff,\n anchorNode,\n anchorOffset\n } = view.domSelectionRange();\n let oldBidiLevel = sel.caretBidiLevel // Only for Firefox\n ;\n\n sel.modify(\"move\", dir, \"character\");\n let parentDOM = $head.depth ? view.docView.domAfterPos($head.before()) : view.dom;\n let {\n focusNode: newNode,\n focusOffset: newOff\n } = view.domSelectionRange();\n let result = newNode && !parentDOM.contains(newNode.nodeType == 1 ? newNode : newNode.parentNode) || oldNode == newNode && oldOff == newOff;\n // Restore the previous selection\n try {\n sel.collapse(anchorNode, anchorOffset);\n if (oldNode && (oldNode != anchorNode || oldOff != anchorOffset) && sel.extend) sel.extend(oldNode, oldOff);\n } catch (_) {}\n if (oldBidiLevel != null) sel.caretBidiLevel = oldBidiLevel;\n return result;\n });\n}\nlet cachedState = null;\nlet cachedDir = null;\nlet cachedResult = false;\nfunction endOfTextblock(view, state, dir) {\n if (cachedState == state && cachedDir == dir) return cachedResult;\n cachedState = state;\n cachedDir = dir;\n return cachedResult = dir == \"up\" || dir == \"down\" ? endOfTextblockVertical(view, state, dir) : endOfTextblockHorizontal(view, state, dir);\n}\n\n// View descriptions are data structures that describe the DOM that is\n// used to represent the editor's content. They are used for:\n//\n// - Incremental redrawing when the document changes\n//\n// - Figuring out what part of the document a given DOM position\n// corresponds to\n//\n// - Wiring in custom implementations of the editing interface for a\n// given node\n//\n// They form a doubly-linked mutable tree, starting at `view.docView`.\nconst NOT_DIRTY = 0,\n CHILD_DIRTY = 1,\n CONTENT_DIRTY = 2,\n NODE_DIRTY = 3;\n// Superclass for the various kinds of descriptions. Defines their\n// basic structure and shared methods.\nclass ViewDesc {\n constructor(parent, children, dom,\n // This is the node that holds the child views. It may be null for\n // descs that don't have children.\n contentDOM) {\n this.parent = parent;\n this.children = children;\n this.dom = dom;\n this.contentDOM = contentDOM;\n this.dirty = NOT_DIRTY;\n // An expando property on the DOM node provides a link back to its\n // description.\n dom.pmViewDesc = this;\n }\n // Used to check whether a given description corresponds to a\n // widget/mark/node.\n matchesWidget(widget) {\n return false;\n }\n matchesMark(mark) {\n return false;\n }\n matchesNode(node, outerDeco, innerDeco) {\n return false;\n }\n matchesHack(nodeName) {\n return false;\n }\n // When parsing in-editor content (in domchange.js), we allow\n // descriptions to determine the parse rules that should be used to\n // parse them.\n parseRule() {\n return null;\n }\n // Used by the editor's event handler to ignore events that come\n // from certain descs.\n stopEvent(event) {\n return false;\n }\n // The size of the content represented by this desc.\n get size() {\n let size = 0;\n for (let i = 0; i < this.children.length; i++) size += this.children[i].size;\n return size;\n }\n // For block nodes, this represents the space taken up by their\n // start/end tokens.\n get border() {\n return 0;\n }\n destroy() {\n this.parent = undefined;\n if (this.dom.pmViewDesc == this) this.dom.pmViewDesc = undefined;\n for (let i = 0; i < this.children.length; i++) this.children[i].destroy();\n }\n posBeforeChild(child) {\n for (let i = 0, pos = this.posAtStart;; i++) {\n let cur = this.children[i];\n if (cur == child) return pos;\n pos += cur.size;\n }\n }\n get posBefore() {\n return this.parent.posBeforeChild(this);\n }\n get posAtStart() {\n return this.parent ? this.parent.posBeforeChild(this) + this.border : 0;\n }\n get posAfter() {\n return this.posBefore + this.size;\n }\n get posAtEnd() {\n return this.posAtStart + this.size - 2 * this.border;\n }\n localPosFromDOM(dom, offset, bias) {\n // If the DOM position is in the content, use the child desc after\n // it to figure out a position.\n if (this.contentDOM && this.contentDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode)) {\n if (bias < 0) {\n let domBefore, desc;\n if (dom == this.contentDOM) {\n domBefore = dom.childNodes[offset - 1];\n } else {\n while (dom.parentNode != this.contentDOM) dom = dom.parentNode;\n domBefore = dom.previousSibling;\n }\n while (domBefore && !((desc = domBefore.pmViewDesc) && desc.parent == this)) domBefore = domBefore.previousSibling;\n return domBefore ? this.posBeforeChild(desc) + desc.size : this.posAtStart;\n } else {\n let domAfter, desc;\n if (dom == this.contentDOM) {\n domAfter = dom.childNodes[offset];\n } else {\n while (dom.parentNode != this.contentDOM) dom = dom.parentNode;\n domAfter = dom.nextSibling;\n }\n while (domAfter && !((desc = domAfter.pmViewDesc) && desc.parent == this)) domAfter = domAfter.nextSibling;\n return domAfter ? this.posBeforeChild(desc) : this.posAtEnd;\n }\n }\n // Otherwise, use various heuristics, falling back on the bias\n // parameter, to determine whether to return the position at the\n // start or at the end of this view desc.\n let atEnd;\n if (dom == this.dom && this.contentDOM) {\n atEnd = offset > domIndex(this.contentDOM);\n } else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM)) {\n atEnd = dom.compareDocumentPosition(this.contentDOM) & 2;\n } else if (this.dom.firstChild) {\n if (offset == 0) for (let search = dom;; search = search.parentNode) {\n if (search == this.dom) {\n atEnd = false;\n break;\n }\n if (search.previousSibling) break;\n }\n if (atEnd == null && offset == dom.childNodes.length) for (let search = dom;; search = search.parentNode) {\n if (search == this.dom) {\n atEnd = true;\n break;\n }\n if (search.nextSibling) break;\n }\n }\n return (atEnd == null ? bias > 0 : atEnd) ? this.posAtEnd : this.posAtStart;\n }\n // Scan up the dom finding the first desc that is a descendant of\n // this one.\n nearestDesc(dom) {\n let onlyNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n for (let first = true, cur = dom; cur; cur = cur.parentNode) {\n let desc = this.getDesc(cur),\n nodeDOM;\n if (desc && (!onlyNodes || desc.node)) {\n // If dom is outside of this desc's nodeDOM, don't count it.\n if (first && (nodeDOM = desc.nodeDOM) && !(nodeDOM.nodeType == 1 ? nodeDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode) : nodeDOM == dom)) first = false;else return desc;\n }\n }\n }\n getDesc(dom) {\n let desc = dom.pmViewDesc;\n for (let cur = desc; cur; cur = cur.parent) if (cur == this) return desc;\n }\n posFromDOM(dom, offset, bias) {\n for (let scan = dom; scan; scan = scan.parentNode) {\n let desc = this.getDesc(scan);\n if (desc) return desc.localPosFromDOM(dom, offset, bias);\n }\n return -1;\n }\n // Find the desc for the node after the given pos, if any. (When a\n // parent node overrode rendering, there might not be one.)\n descAt(pos) {\n for (let i = 0, offset = 0; i < this.children.length; i++) {\n let child = this.children[i],\n end = offset + child.size;\n if (offset == pos && end != offset) {\n while (!child.border && child.children.length) child = child.children[0];\n return child;\n }\n if (pos < end) return child.descAt(pos - offset - child.border);\n offset = end;\n }\n }\n domFromPos(pos, side) {\n if (!this.contentDOM) return {\n node: this.dom,\n offset: 0,\n atom: pos + 1\n };\n // First find the position in the child array\n let i = 0,\n offset = 0;\n for (let curPos = 0; i < this.children.length; i++) {\n let child = this.children[i],\n end = curPos + child.size;\n if (end > pos || child instanceof TrailingHackViewDesc) {\n offset = pos - curPos;\n break;\n }\n curPos = end;\n }\n // If this points into the middle of a child, call through\n if (offset) return this.children[i].domFromPos(offset - this.children[i].border, side);\n // Go back if there were any zero-length widgets with side >= 0 before this point\n for (let prev; i && !(prev = this.children[i - 1]).size && prev instanceof WidgetViewDesc && prev.side >= 0; i--) {}\n // Scan towards the first useable node\n if (side <= 0) {\n let prev,\n enter = true;\n for (;; i--, enter = false) {\n prev = i ? this.children[i - 1] : null;\n if (!prev || prev.dom.parentNode == this.contentDOM) break;\n }\n if (prev && side && enter && !prev.border && !prev.domAtom) return prev.domFromPos(prev.size, side);\n return {\n node: this.contentDOM,\n offset: prev ? domIndex(prev.dom) + 1 : 0\n };\n } else {\n let next,\n enter = true;\n for (;; i++, enter = false) {\n next = i < this.children.length ? this.children[i] : null;\n if (!next || next.dom.parentNode == this.contentDOM) break;\n }\n if (next && enter && !next.border && !next.domAtom) return next.domFromPos(0, side);\n return {\n node: this.contentDOM,\n offset: next ? domIndex(next.dom) : this.contentDOM.childNodes.length\n };\n }\n }\n // Used to find a DOM range in a single parent for a given changed\n // range.\n parseRange(from, to) {\n let base = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n if (this.children.length == 0) return {\n node: this.contentDOM,\n from,\n to,\n fromOffset: 0,\n toOffset: this.contentDOM.childNodes.length\n };\n let fromOffset = -1,\n toOffset = -1;\n for (let offset = base, i = 0;; i++) {\n let child = this.children[i],\n end = offset + child.size;\n if (fromOffset == -1 && from <= end) {\n let childBase = offset + child.border;\n // FIXME maybe descend mark views to parse a narrower range?\n if (from >= childBase && to <= end - child.border && child.node && child.contentDOM && this.contentDOM.contains(child.contentDOM)) return child.parseRange(from, to, childBase);\n from = offset;\n for (let j = i; j > 0; j--) {\n let prev = this.children[j - 1];\n if (prev.size && prev.dom.parentNode == this.contentDOM && !prev.emptyChildAt(1)) {\n fromOffset = domIndex(prev.dom) + 1;\n break;\n }\n from -= prev.size;\n }\n if (fromOffset == -1) fromOffset = 0;\n }\n if (fromOffset > -1 && (end > to || i == this.children.length - 1)) {\n to = end;\n for (let j = i + 1; j < this.children.length; j++) {\n let next = this.children[j];\n if (next.size && next.dom.parentNode == this.contentDOM && !next.emptyChildAt(-1)) {\n toOffset = domIndex(next.dom);\n break;\n }\n to += next.size;\n }\n if (toOffset == -1) toOffset = this.contentDOM.childNodes.length;\n break;\n }\n offset = end;\n }\n return {\n node: this.contentDOM,\n from,\n to,\n fromOffset,\n toOffset\n };\n }\n emptyChildAt(side) {\n if (this.border || !this.contentDOM || !this.children.length) return false;\n let child = this.children[side < 0 ? 0 : this.children.length - 1];\n return child.size == 0 || child.emptyChildAt(side);\n }\n domAfterPos(pos) {\n let {\n node,\n offset\n } = this.domFromPos(pos, 0);\n if (node.nodeType != 1 || offset == node.childNodes.length) throw new RangeError(\"No node after pos \" + pos);\n return node.childNodes[offset];\n }\n // View descs are responsible for setting any selection that falls\n // entirely inside of them, so that custom implementations can do\n // custom things with the selection. Note that this falls apart when\n // a selection starts in such a node and ends in another, in which\n // case we just use whatever domFromPos produces as a best effort.\n setSelection(anchor, head, root) {\n let force = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n // If the selection falls entirely in a child, give it to that child\n let from = Math.min(anchor, head),\n to = Math.max(anchor, head);\n for (let i = 0, offset = 0; i < this.children.length; i++) {\n let child = this.children[i],\n end = offset + child.size;\n if (from > offset && to < end) return child.setSelection(anchor - offset - child.border, head - offset - child.border, root, force);\n offset = end;\n }\n let anchorDOM = this.domFromPos(anchor, anchor ? -1 : 1);\n let headDOM = head == anchor ? anchorDOM : this.domFromPos(head, head ? -1 : 1);\n let domSel = root.getSelection();\n let brKludge = false;\n // On Firefox, using Selection.collapse to put the cursor after a\n // BR node for some reason doesn't always work (#1073). On Safari,\n // the cursor sometimes inexplicable visually lags behind its\n // reported position in such situations (#1092).\n if ((gecko || safari) && anchor == head) {\n let {\n node,\n offset\n } = anchorDOM;\n if (node.nodeType == 3) {\n brKludge = !!(offset && node.nodeValue[offset - 1] == \"\\n\");\n // Issue #1128\n if (brKludge && offset == node.nodeValue.length) {\n for (let scan = node, after; scan; scan = scan.parentNode) {\n if (after = scan.nextSibling) {\n if (after.nodeName == \"BR\") anchorDOM = headDOM = {\n node: after.parentNode,\n offset: domIndex(after) + 1\n };\n break;\n }\n let desc = scan.pmViewDesc;\n if (desc && desc.node && desc.node.isBlock) break;\n }\n }\n } else {\n let prev = node.childNodes[offset - 1];\n brKludge = prev && (prev.nodeName == \"BR\" || prev.contentEditable == \"false\");\n }\n }\n // Firefox can act strangely when the selection is in front of an\n // uneditable node. See #1163 and https://bugzilla.mozilla.org/show_bug.cgi?id=1709536\n if (gecko && domSel.focusNode && domSel.focusNode != headDOM.node && domSel.focusNode.nodeType == 1) {\n let after = domSel.focusNode.childNodes[domSel.focusOffset];\n if (after && after.contentEditable == \"false\") force = true;\n }\n if (!(force || brKludge && safari) && isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset) && isEquivalentPosition(headDOM.node, headDOM.offset, domSel.focusNode, domSel.focusOffset)) return;\n // Selection.extend can be used to create an 'inverted' selection\n // (one where the focus is before the anchor), but not all\n // browsers support it yet.\n let domSelExtended = false;\n if ((domSel.extend || anchor == head) && !brKludge) {\n domSel.collapse(anchorDOM.node, anchorDOM.offset);\n try {\n if (anchor != head) domSel.extend(headDOM.node, headDOM.offset);\n domSelExtended = true;\n } catch (_) {\n // In some cases with Chrome the selection is empty after calling\n // collapse, even when it should be valid. This appears to be a bug, but\n // it is difficult to isolate. If this happens fallback to the old path\n // without using extend.\n // Similarly, this could crash on Safari if the editor is hidden, and\n // there was no selection.\n }\n }\n if (!domSelExtended) {\n if (anchor > head) {\n let tmp = anchorDOM;\n anchorDOM = headDOM;\n headDOM = tmp;\n }\n let range = document.createRange();\n range.setEnd(headDOM.node, headDOM.offset);\n range.setStart(anchorDOM.node, anchorDOM.offset);\n domSel.removeAllRanges();\n domSel.addRange(range);\n }\n }\n ignoreMutation(mutation) {\n return !this.contentDOM && mutation.type != \"selection\";\n }\n get contentLost() {\n return this.contentDOM && this.contentDOM != this.dom && !this.dom.contains(this.contentDOM);\n }\n // Remove a subtree of the element tree that has been touched\n // by a DOM change, so that the next update will redraw it.\n markDirty(from, to) {\n for (let offset = 0, i = 0; i < this.children.length; i++) {\n let child = this.children[i],\n end = offset + child.size;\n if (offset == end ? from <= end && to >= offset : from < end && to > offset) {\n let startInside = offset + child.border,\n endInside = end - child.border;\n if (from >= startInside && to <= endInside) {\n this.dirty = from == offset || to == end ? CONTENT_DIRTY : CHILD_DIRTY;\n if (from == startInside && to == endInside && (child.contentLost || child.dom.parentNode != this.contentDOM)) child.dirty = NODE_DIRTY;else child.markDirty(from - startInside, to - startInside);\n return;\n } else {\n child.dirty = child.dom == child.contentDOM && child.dom.parentNode == this.contentDOM && !child.children.length ? CONTENT_DIRTY : NODE_DIRTY;\n }\n }\n offset = end;\n }\n this.dirty = CONTENT_DIRTY;\n }\n markParentsDirty() {\n let level = 1;\n for (let node = this.parent; node; node = node.parent, level++) {\n let dirty = level == 1 ? CONTENT_DIRTY : CHILD_DIRTY;\n if (node.dirty < dirty) node.dirty = dirty;\n }\n }\n get domAtom() {\n return false;\n }\n get ignoreForCoords() {\n return false;\n }\n}\n// A widget desc represents a widget decoration, which is a DOM node\n// drawn between the document nodes.\nclass WidgetViewDesc extends ViewDesc {\n constructor(parent, widget, view, pos) {\n let self,\n dom = widget.type.toDOM;\n if (typeof dom == \"function\") dom = dom(view, () => {\n if (!self) return pos;\n if (self.parent) return self.parent.posBeforeChild(self);\n });\n if (!widget.type.spec.raw) {\n if (dom.nodeType != 1) {\n let wrap = document.createElement(\"span\");\n wrap.appendChild(dom);\n dom = wrap;\n }\n dom.contentEditable = \"false\";\n dom.classList.add(\"ProseMirror-widget\");\n }\n super(parent, [], dom, null);\n this.widget = widget;\n this.widget = widget;\n self = this;\n }\n matchesWidget(widget) {\n return this.dirty == NOT_DIRTY && widget.type.eq(this.widget.type);\n }\n parseRule() {\n return {\n ignore: true\n };\n }\n stopEvent(event) {\n let stop = this.widget.spec.stopEvent;\n return stop ? stop(event) : false;\n }\n ignoreMutation(mutation) {\n return mutation.type != \"selection\" || this.widget.spec.ignoreSelection;\n }\n destroy() {\n this.widget.type.destroy(this.dom);\n super.destroy();\n }\n get domAtom() {\n return true;\n }\n get side() {\n return this.widget.type.side;\n }\n}\nclass CompositionViewDesc extends ViewDesc {\n constructor(parent, dom, textDOM, text) {\n super(parent, [], dom, null);\n this.textDOM = textDOM;\n this.text = text;\n }\n get size() {\n return this.text.length;\n }\n localPosFromDOM(dom, offset) {\n if (dom != this.textDOM) return this.posAtStart + (offset ? this.size : 0);\n return this.posAtStart + offset;\n }\n domFromPos(pos) {\n return {\n node: this.textDOM,\n offset: pos\n };\n }\n ignoreMutation(mut) {\n return mut.type === 'characterData' && mut.target.nodeValue == mut.oldValue;\n }\n}\n// A mark desc represents a mark. May have multiple children,\n// depending on how the mark is split. Note that marks are drawn using\n// a fixed nesting order, for simplicity and predictability, so in\n// some cases they will be split more often than would appear\n// necessary.\nclass MarkViewDesc extends ViewDesc {\n constructor(parent, mark, dom, contentDOM) {\n super(parent, [], dom, contentDOM);\n this.mark = mark;\n }\n static create(parent, mark, inline, view) {\n let custom = view.nodeViews[mark.type.name];\n let spec = custom && custom(mark, view, inline);\n if (!spec || !spec.dom) spec = DOMSerializer.renderSpec(document, mark.type.spec.toDOM(mark, inline));\n return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom);\n }\n parseRule() {\n if (this.dirty & NODE_DIRTY || this.mark.type.spec.reparseInView) return null;\n return {\n mark: this.mark.type.name,\n attrs: this.mark.attrs,\n contentElement: this.contentDOM || undefined\n };\n }\n matchesMark(mark) {\n return this.dirty != NODE_DIRTY && this.mark.eq(mark);\n }\n markDirty(from, to) {\n super.markDirty(from, to);\n // Move dirty info to nearest node view\n if (this.dirty != NOT_DIRTY) {\n let parent = this.parent;\n while (!parent.node) parent = parent.parent;\n if (parent.dirty < this.dirty) parent.dirty = this.dirty;\n this.dirty = NOT_DIRTY;\n }\n }\n slice(from, to, view) {\n let copy = MarkViewDesc.create(this.parent, this.mark, true, view);\n let nodes = this.children,\n size = this.size;\n if (to < size) nodes = replaceNodes(nodes, to, size, view);\n if (from > 0) nodes = replaceNodes(nodes, 0, from, view);\n for (let i = 0; i < nodes.length; i++) nodes[i].parent = copy;\n copy.children = nodes;\n return copy;\n }\n}\n// Node view descs are the main, most common type of view desc, and\n// correspond to an actual node in the document. Unlike mark descs,\n// they populate their child array themselves.\nclass NodeViewDesc extends ViewDesc {\n constructor(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos) {\n super(parent, [], dom, contentDOM);\n this.node = node;\n this.outerDeco = outerDeco;\n this.innerDeco = innerDeco;\n this.nodeDOM = nodeDOM;\n if (contentDOM) this.updateChildren(view, pos);\n }\n // By default, a node is rendered using the `toDOM` method from the\n // node type spec. But client code can use the `nodeViews` spec to\n // supply a custom node view, which can influence various aspects of\n // the way the node works.\n //\n // (Using subclassing for this was intentionally decided against,\n // since it'd require exposing a whole slew of finicky\n // implementation details to the user code that they probably will\n // never need.)\n static create(parent, node, outerDeco, innerDeco, view, pos) {\n let custom = view.nodeViews[node.type.name],\n descObj;\n let spec = custom && custom(node, view, () => {\n // (This is a function that allows the custom view to find its\n // own position)\n if (!descObj) return pos;\n if (descObj.parent) return descObj.parent.posBeforeChild(descObj);\n }, outerDeco, innerDeco);\n let dom = spec && spec.dom,\n contentDOM = spec && spec.contentDOM;\n if (node.isText) {\n if (!dom) dom = document.createTextNode(node.text);else if (dom.nodeType != 3) throw new RangeError(\"Text must be rendered as a DOM text node\");\n } else if (!dom) {\n ({\n dom,\n contentDOM\n } = DOMSerializer.renderSpec(document, node.type.spec.toDOM(node)));\n }\n if (!contentDOM && !node.isText && dom.nodeName != \"BR\") {\n // Chrome gets confused by
\n if (!dom.hasAttribute(\"contenteditable\")) dom.contentEditable = \"false\";\n if (node.type.spec.draggable) dom.draggable = true;\n }\n let nodeDOM = dom;\n dom = applyOuterDeco(dom, outerDeco, node);\n if (spec) return descObj = new CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM, spec, view, pos + 1);else if (node.isText) return new TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view);else return new NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM, view, pos + 1);\n }\n parseRule() {\n // Experimental kludge to allow opt-in re-parsing of nodes\n if (this.node.type.spec.reparseInView) return null;\n // FIXME the assumption that this can always return the current\n // attrs means that if the user somehow manages to change the\n // attrs in the dom, that won't be picked up. Not entirely sure\n // whether this is a problem\n let rule = {\n node: this.node.type.name,\n attrs: this.node.attrs\n };\n if (this.node.type.whitespace == \"pre\") rule.preserveWhitespace = \"full\";\n if (!this.contentDOM) {\n rule.getContent = () => this.node.content;\n } else if (!this.contentLost) {\n rule.contentElement = this.contentDOM;\n } else {\n // Chrome likes to randomly recreate parent nodes when\n // backspacing things. When that happens, this tries to find the\n // new parent.\n for (let i = this.children.length - 1; i >= 0; i--) {\n let child = this.children[i];\n if (this.dom.contains(child.dom.parentNode)) {\n rule.contentElement = child.dom.parentNode;\n break;\n }\n }\n if (!rule.contentElement) rule.getContent = () => Fragment.empty;\n }\n return rule;\n }\n matchesNode(node, outerDeco, innerDeco) {\n return this.dirty == NOT_DIRTY && node.eq(this.node) && sameOuterDeco(outerDeco, this.outerDeco) && innerDeco.eq(this.innerDeco);\n }\n get size() {\n return this.node.nodeSize;\n }\n get border() {\n return this.node.isLeaf ? 0 : 1;\n }\n // Syncs `this.children` to match `this.node.content` and the local\n // decorations, possibly introducing nesting for marks. Then, in a\n // separate step, syncs the DOM inside `this.contentDOM` to\n // `this.children`.\n updateChildren(view, pos) {\n let inline = this.node.inlineContent,\n off = pos;\n let composition = view.composing ? this.localCompositionInfo(view, pos) : null;\n let localComposition = composition && composition.pos > -1 ? composition : null;\n let compositionInChild = composition && composition.pos < 0;\n let updater = new ViewTreeUpdater(this, localComposition && localComposition.node, view);\n iterDeco(this.node, this.innerDeco, (widget, i, insideNode) => {\n if (widget.spec.marks) updater.syncToMarks(widget.spec.marks, inline, view);else if (widget.type.side >= 0 && !insideNode) updater.syncToMarks(i == this.node.childCount ? Mark.none : this.node.child(i).marks, inline, view);\n // If the next node is a desc matching this widget, reuse it,\n // otherwise insert the widget as a new view desc.\n updater.placeWidget(widget, view, off);\n }, (child, outerDeco, innerDeco, i) => {\n // Make sure the wrapping mark descs match the node's marks.\n updater.syncToMarks(child.marks, inline, view);\n // Try several strategies for drawing this node\n let compIndex;\n if (updater.findNodeMatch(child, outerDeco, innerDeco, i)) ;else if (compositionInChild && view.state.selection.from > off && view.state.selection.to < off + child.nodeSize && (compIndex = updater.findIndexWithChild(composition.node)) > -1 && updater.updateNodeAt(child, outerDeco, innerDeco, compIndex, view)) ;else if (updater.updateNextNode(child, outerDeco, innerDeco, view, i)) ;else {\n // Add it as a new view\n updater.addNode(child, outerDeco, innerDeco, view, off);\n }\n off += child.nodeSize;\n });\n // Drop all remaining descs after the current position.\n updater.syncToMarks([], inline, view);\n if (this.node.isTextblock) updater.addTextblockHacks();\n updater.destroyRest();\n // Sync the DOM if anything changed\n if (updater.changed || this.dirty == CONTENT_DIRTY) {\n // May have to protect focused DOM from being changed if a composition is active\n if (localComposition) this.protectLocalComposition(view, localComposition);\n renderDescs(this.contentDOM, this.children, view);\n if (ios) iosHacks(this.dom);\n }\n }\n localCompositionInfo(view, pos) {\n // Only do something if both the selection and a focused text node\n // are inside of this node\n let {\n from,\n to\n } = view.state.selection;\n if (!(view.state.selection instanceof TextSelection) || from < pos || to > pos + this.node.content.size) return null;\n let sel = view.domSelectionRange();\n let textNode = nearbyTextNode(sel.focusNode, sel.focusOffset);\n if (!textNode || !this.dom.contains(textNode.parentNode)) return null;\n if (this.node.inlineContent) {\n // Find the text in the focused node in the node, stop if it's not\n // there (may have been modified through other means, in which\n // case it should overwritten)\n let text = textNode.nodeValue;\n let textPos = findTextInFragment(this.node.content, text, from - pos, to - pos);\n return textPos < 0 ? null : {\n node: textNode,\n pos: textPos,\n text\n };\n } else {\n return {\n node: textNode,\n pos: -1,\n text: \"\"\n };\n }\n }\n protectLocalComposition(view, _ref2) {\n let {\n node,\n pos,\n text\n } = _ref2;\n // The node is already part of a local view desc, leave it there\n if (this.getDesc(node)) return;\n // Create a composition view for the orphaned nodes\n let topNode = node;\n for (;; topNode = topNode.parentNode) {\n if (topNode.parentNode == this.contentDOM) break;\n while (topNode.previousSibling) topNode.parentNode.removeChild(topNode.previousSibling);\n while (topNode.nextSibling) topNode.parentNode.removeChild(topNode.nextSibling);\n if (topNode.pmViewDesc) topNode.pmViewDesc = undefined;\n }\n let desc = new CompositionViewDesc(this, topNode, node, text);\n view.input.compositionNodes.push(desc);\n // Patch up this.children to contain the composition view\n this.children = replaceNodes(this.children, pos, pos + text.length, view, desc);\n }\n // If this desc must be updated to match the given node decoration,\n // do so and return true.\n update(node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY || !node.sameMarkup(this.node)) return false;\n this.updateInner(node, outerDeco, innerDeco, view);\n return true;\n }\n updateInner(node, outerDeco, innerDeco, view) {\n this.updateOuterDeco(outerDeco);\n this.node = node;\n this.innerDeco = innerDeco;\n if (this.contentDOM) this.updateChildren(view, this.posAtStart);\n this.dirty = NOT_DIRTY;\n }\n updateOuterDeco(outerDeco) {\n if (sameOuterDeco(outerDeco, this.outerDeco)) return;\n let needsWrap = this.nodeDOM.nodeType != 1;\n let oldDOM = this.dom;\n this.dom = patchOuterDeco(this.dom, this.nodeDOM, computeOuterDeco(this.outerDeco, this.node, needsWrap), computeOuterDeco(outerDeco, this.node, needsWrap));\n if (this.dom != oldDOM) {\n oldDOM.pmViewDesc = undefined;\n this.dom.pmViewDesc = this;\n }\n this.outerDeco = outerDeco;\n }\n // Mark this node as being the selected node.\n selectNode() {\n if (this.nodeDOM.nodeType == 1) this.nodeDOM.classList.add(\"ProseMirror-selectednode\");\n if (this.contentDOM || !this.node.type.spec.draggable) this.dom.draggable = true;\n }\n // Remove selected node marking from this node.\n deselectNode() {\n if (this.nodeDOM.nodeType == 1) this.nodeDOM.classList.remove(\"ProseMirror-selectednode\");\n if (this.contentDOM || !this.node.type.spec.draggable) this.dom.removeAttribute(\"draggable\");\n }\n get domAtom() {\n return this.node.isAtom;\n }\n}\n// Create a view desc for the top-level document node, to be exported\n// and used by the view class.\nfunction docViewDesc(doc, outerDeco, innerDeco, dom, view) {\n applyOuterDeco(dom, outerDeco, doc);\n return new NodeViewDesc(undefined, doc, outerDeco, innerDeco, dom, dom, dom, view, 0);\n}\nclass TextViewDesc extends NodeViewDesc {\n constructor(parent, node, outerDeco, innerDeco, dom, nodeDOM, view) {\n super(parent, node, outerDeco, innerDeco, dom, null, nodeDOM, view, 0);\n }\n parseRule() {\n let skip = this.nodeDOM.parentNode;\n while (skip && skip != this.dom && !skip.pmIsDeco) skip = skip.parentNode;\n return {\n skip: skip || true\n };\n }\n update(node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY || this.dirty != NOT_DIRTY && !this.inParent() || !node.sameMarkup(this.node)) return false;\n this.updateOuterDeco(outerDeco);\n if ((this.dirty != NOT_DIRTY || node.text != this.node.text) && node.text != this.nodeDOM.nodeValue) {\n this.nodeDOM.nodeValue = node.text;\n if (view.trackWrites == this.nodeDOM) view.trackWrites = null;\n }\n this.node = node;\n this.dirty = NOT_DIRTY;\n return true;\n }\n inParent() {\n let parentDOM = this.parent.contentDOM;\n for (let n = this.nodeDOM; n; n = n.parentNode) if (n == parentDOM) return true;\n return false;\n }\n domFromPos(pos) {\n return {\n node: this.nodeDOM,\n offset: pos\n };\n }\n localPosFromDOM(dom, offset, bias) {\n if (dom == this.nodeDOM) return this.posAtStart + Math.min(offset, this.node.text.length);\n return super.localPosFromDOM(dom, offset, bias);\n }\n ignoreMutation(mutation) {\n return mutation.type != \"characterData\" && mutation.type != \"selection\";\n }\n slice(from, to, view) {\n let node = this.node.cut(from, to),\n dom = document.createTextNode(node.text);\n return new TextViewDesc(this.parent, node, this.outerDeco, this.innerDeco, dom, dom, view);\n }\n markDirty(from, to) {\n super.markDirty(from, to);\n if (this.dom != this.nodeDOM && (from == 0 || to == this.nodeDOM.nodeValue.length)) this.dirty = NODE_DIRTY;\n }\n get domAtom() {\n return false;\n }\n}\n// A dummy desc used to tag trailing BR or IMG nodes created to work\n// around contentEditable terribleness.\nclass TrailingHackViewDesc extends ViewDesc {\n parseRule() {\n return {\n ignore: true\n };\n }\n matchesHack(nodeName) {\n return this.dirty == NOT_DIRTY && this.dom.nodeName == nodeName;\n }\n get domAtom() {\n return true;\n }\n get ignoreForCoords() {\n return this.dom.nodeName == \"IMG\";\n }\n}\n// A separate subclass is used for customized node views, so that the\n// extra checks only have to be made for nodes that are actually\n// customized.\nclass CustomNodeViewDesc extends NodeViewDesc {\n constructor(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos) {\n super(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos);\n this.spec = spec;\n }\n // A custom `update` method gets to decide whether the update goes\n // through. If it does, and there's a `contentDOM` node, our logic\n // updates the children.\n update(node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY) return false;\n if (this.spec.update) {\n let result = this.spec.update(node, outerDeco, innerDeco);\n if (result) this.updateInner(node, outerDeco, innerDeco, view);\n return result;\n } else if (!this.contentDOM && !node.isLeaf) {\n return false;\n } else {\n return super.update(node, outerDeco, innerDeco, view);\n }\n }\n selectNode() {\n this.spec.selectNode ? this.spec.selectNode() : super.selectNode();\n }\n deselectNode() {\n this.spec.deselectNode ? this.spec.deselectNode() : super.deselectNode();\n }\n setSelection(anchor, head, root, force) {\n this.spec.setSelection ? this.spec.setSelection(anchor, head, root) : super.setSelection(anchor, head, root, force);\n }\n destroy() {\n if (this.spec.destroy) this.spec.destroy();\n super.destroy();\n }\n stopEvent(event) {\n return this.spec.stopEvent ? this.spec.stopEvent(event) : false;\n }\n ignoreMutation(mutation) {\n return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : super.ignoreMutation(mutation);\n }\n}\n// Sync the content of the given DOM node with the nodes associated\n// with the given array of view descs, recursing into mark descs\n// because this should sync the subtree for a whole node at a time.\nfunction renderDescs(parentDOM, descs, view) {\n let dom = parentDOM.firstChild,\n written = false;\n for (let i = 0; i < descs.length; i++) {\n let desc = descs[i],\n childDOM = desc.dom;\n if (childDOM.parentNode == parentDOM) {\n while (childDOM != dom) {\n dom = rm(dom);\n written = true;\n }\n dom = dom.nextSibling;\n } else {\n written = true;\n parentDOM.insertBefore(childDOM, dom);\n }\n if (desc instanceof MarkViewDesc) {\n let pos = dom ? dom.previousSibling : parentDOM.lastChild;\n renderDescs(desc.contentDOM, desc.children, view);\n dom = pos ? pos.nextSibling : parentDOM.firstChild;\n }\n }\n while (dom) {\n dom = rm(dom);\n written = true;\n }\n if (written && view.trackWrites == parentDOM) view.trackWrites = null;\n}\nconst OuterDecoLevel = function (nodeName) {\n if (nodeName) this.nodeName = nodeName;\n};\nOuterDecoLevel.prototype = Object.create(null);\nconst noDeco = [new OuterDecoLevel()];\nfunction computeOuterDeco(outerDeco, node, needsWrap) {\n if (outerDeco.length == 0) return noDeco;\n let top = needsWrap ? noDeco[0] : new OuterDecoLevel(),\n result = [top];\n for (let i = 0; i < outerDeco.length; i++) {\n let attrs = outerDeco[i].type.attrs;\n if (!attrs) continue;\n if (attrs.nodeName) result.push(top = new OuterDecoLevel(attrs.nodeName));\n for (let name in attrs) {\n let val = attrs[name];\n if (val == null) continue;\n if (needsWrap && result.length == 1) result.push(top = new OuterDecoLevel(node.isInline ? \"span\" : \"div\"));\n if (name == \"class\") top.class = (top.class ? top.class + \" \" : \"\") + val;else if (name == \"style\") top.style = (top.style ? top.style + \";\" : \"\") + val;else if (name != \"nodeName\") top[name] = val;\n }\n }\n return result;\n}\nfunction patchOuterDeco(outerDOM, nodeDOM, prevComputed, curComputed) {\n // Shortcut for trivial case\n if (prevComputed == noDeco && curComputed == noDeco) return nodeDOM;\n let curDOM = nodeDOM;\n for (let i = 0; i < curComputed.length; i++) {\n let deco = curComputed[i],\n prev = prevComputed[i];\n if (i) {\n let parent;\n if (prev && prev.nodeName == deco.nodeName && curDOM != outerDOM && (parent = curDOM.parentNode) && parent.nodeName.toLowerCase() == deco.nodeName) {\n curDOM = parent;\n } else {\n parent = document.createElement(deco.nodeName);\n parent.pmIsDeco = true;\n parent.appendChild(curDOM);\n prev = noDeco[0];\n curDOM = parent;\n }\n }\n patchAttributes(curDOM, prev || noDeco[0], deco);\n }\n return curDOM;\n}\nfunction patchAttributes(dom, prev, cur) {\n for (let name in prev) if (name != \"class\" && name != \"style\" && name != \"nodeName\" && !(name in cur)) dom.removeAttribute(name);\n for (let name in cur) if (name != \"class\" && name != \"style\" && name != \"nodeName\" && cur[name] != prev[name]) dom.setAttribute(name, cur[name]);\n if (prev.class != cur.class) {\n let prevList = prev.class ? prev.class.split(\" \").filter(Boolean) : [];\n let curList = cur.class ? cur.class.split(\" \").filter(Boolean) : [];\n for (let i = 0; i < prevList.length; i++) if (curList.indexOf(prevList[i]) == -1) dom.classList.remove(prevList[i]);\n for (let i = 0; i < curList.length; i++) if (prevList.indexOf(curList[i]) == -1) dom.classList.add(curList[i]);\n if (dom.classList.length == 0) dom.removeAttribute(\"class\");\n }\n if (prev.style != cur.style) {\n if (prev.style) {\n let prop = /\\s*([\\w\\-\\xa1-\\uffff]+)\\s*:(?:\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|\\(.*?\\)|[^;])*/g,\n m;\n while (m = prop.exec(prev.style)) dom.style.removeProperty(m[1]);\n }\n if (cur.style) dom.style.cssText += cur.style;\n }\n}\nfunction applyOuterDeco(dom, deco, node) {\n return patchOuterDeco(dom, dom, noDeco, computeOuterDeco(deco, node, dom.nodeType != 1));\n}\nfunction sameOuterDeco(a, b) {\n if (a.length != b.length) return false;\n for (let i = 0; i < a.length; i++) if (!a[i].type.eq(b[i].type)) return false;\n return true;\n}\n// Remove a DOM node and return its next sibling.\nfunction rm(dom) {\n let next = dom.nextSibling;\n dom.parentNode.removeChild(dom);\n return next;\n}\n// Helper class for incrementally updating a tree of mark descs and\n// the widget and node descs inside of them.\nclass ViewTreeUpdater {\n constructor(top, lock, view) {\n this.lock = lock;\n this.view = view;\n // Index into `this.top`'s child array, represents the current\n // update position.\n this.index = 0;\n // When entering a mark, the current top and index are pushed\n // onto this.\n this.stack = [];\n // Tracks whether anything was changed\n this.changed = false;\n this.top = top;\n this.preMatch = preMatch(top.node.content, top);\n }\n // Destroy and remove the children between the given indices in\n // `this.top`.\n destroyBetween(start, end) {\n if (start == end) return;\n for (let i = start; i < end; i++) this.top.children[i].destroy();\n this.top.children.splice(start, end - start);\n this.changed = true;\n }\n // Destroy all remaining children in `this.top`.\n destroyRest() {\n this.destroyBetween(this.index, this.top.children.length);\n }\n // Sync the current stack of mark descs with the given array of\n // marks, reusing existing mark descs when possible.\n syncToMarks(marks, inline, view) {\n let keep = 0,\n depth = this.stack.length >> 1;\n let maxKeep = Math.min(depth, marks.length);\n while (keep < maxKeep && (keep == depth - 1 ? this.top : this.stack[keep + 1 << 1]).matchesMark(marks[keep]) && marks[keep].type.spec.spanning !== false) keep++;\n while (keep < depth) {\n this.destroyRest();\n this.top.dirty = NOT_DIRTY;\n this.index = this.stack.pop();\n this.top = this.stack.pop();\n depth--;\n }\n while (depth < marks.length) {\n this.stack.push(this.top, this.index + 1);\n let found = -1;\n for (let i = this.index; i < Math.min(this.index + 3, this.top.children.length); i++) {\n if (this.top.children[i].matchesMark(marks[depth])) {\n found = i;\n break;\n }\n }\n if (found > -1) {\n if (found > this.index) {\n this.changed = true;\n this.destroyBetween(this.index, found);\n }\n this.top = this.top.children[this.index];\n } else {\n let markDesc = MarkViewDesc.create(this.top, marks[depth], inline, view);\n this.top.children.splice(this.index, 0, markDesc);\n this.top = markDesc;\n this.changed = true;\n }\n this.index = 0;\n depth++;\n }\n }\n // Try to find a node desc matching the given data. Skip over it and\n // return true when successful.\n findNodeMatch(node, outerDeco, innerDeco, index) {\n let found = -1,\n targetDesc;\n if (index >= this.preMatch.index && (targetDesc = this.preMatch.matches[index - this.preMatch.index]).parent == this.top && targetDesc.matchesNode(node, outerDeco, innerDeco)) {\n found = this.top.children.indexOf(targetDesc, this.index);\n } else {\n for (let i = this.index, e = Math.min(this.top.children.length, i + 5); i < e; i++) {\n let child = this.top.children[i];\n if (child.matchesNode(node, outerDeco, innerDeco) && !this.preMatch.matched.has(child)) {\n found = i;\n break;\n }\n }\n }\n if (found < 0) return false;\n this.destroyBetween(this.index, found);\n this.index++;\n return true;\n }\n updateNodeAt(node, outerDeco, innerDeco, index, view) {\n let child = this.top.children[index];\n if (child.dirty == NODE_DIRTY && child.dom == child.contentDOM) child.dirty = CONTENT_DIRTY;\n if (!child.update(node, outerDeco, innerDeco, view)) return false;\n this.destroyBetween(this.index, index);\n this.index++;\n return true;\n }\n findIndexWithChild(domNode) {\n for (;;) {\n let parent = domNode.parentNode;\n if (!parent) return -1;\n if (parent == this.top.contentDOM) {\n let desc = domNode.pmViewDesc;\n if (desc) for (let i = this.index; i < this.top.children.length; i++) {\n if (this.top.children[i] == desc) return i;\n }\n return -1;\n }\n domNode = parent;\n }\n }\n // Try to update the next node, if any, to the given data. Checks\n // pre-matches to avoid overwriting nodes that could still be used.\n updateNextNode(node, outerDeco, innerDeco, view, index) {\n for (let i = this.index; i < this.top.children.length; i++) {\n let next = this.top.children[i];\n if (next instanceof NodeViewDesc) {\n let preMatch = this.preMatch.matched.get(next);\n if (preMatch != null && preMatch != index) return false;\n let nextDOM = next.dom;\n // Can't update if nextDOM is or contains this.lock, except if\n // it's a text node whose content already matches the new text\n // and whose decorations match the new ones.\n let locked = this.lock && (nextDOM == this.lock || nextDOM.nodeType == 1 && nextDOM.contains(this.lock.parentNode)) && !(node.isText && next.node && next.node.isText && next.nodeDOM.nodeValue == node.text && next.dirty != NODE_DIRTY && sameOuterDeco(outerDeco, next.outerDeco));\n if (!locked && next.update(node, outerDeco, innerDeco, view)) {\n this.destroyBetween(this.index, i);\n if (next.dom != nextDOM) this.changed = true;\n this.index++;\n return true;\n }\n break;\n }\n }\n return false;\n }\n // Insert the node as a newly created node desc.\n addNode(node, outerDeco, innerDeco, view, pos) {\n this.top.children.splice(this.index++, 0, NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos));\n this.changed = true;\n }\n placeWidget(widget, view, pos) {\n let next = this.index < this.top.children.length ? this.top.children[this.index] : null;\n if (next && next.matchesWidget(widget) && (widget == next.widget || !next.widget.type.toDOM.parentNode)) {\n this.index++;\n } else {\n let desc = new WidgetViewDesc(this.top, widget, view, pos);\n this.top.children.splice(this.index++, 0, desc);\n this.changed = true;\n }\n }\n // Make sure a textblock looks and behaves correctly in\n // contentEditable.\n addTextblockHacks() {\n let lastChild = this.top.children[this.index - 1],\n parent = this.top;\n while (lastChild instanceof MarkViewDesc) {\n parent = lastChild;\n lastChild = parent.children[parent.children.length - 1];\n }\n if (!lastChild ||\n // Empty textblock\n !(lastChild instanceof TextViewDesc) || /\\n$/.test(lastChild.node.text) || this.view.requiresGeckoHackNode && /\\s$/.test(lastChild.node.text)) {\n // Avoid bugs in Safari's cursor drawing (#1165) and Chrome's mouse selection (#1152)\n if ((safari || chrome) && lastChild && lastChild.dom.contentEditable == \"false\") this.addHackNode(\"IMG\", parent);\n this.addHackNode(\"BR\", this.top);\n }\n }\n addHackNode(nodeName, parent) {\n if (parent == this.top && this.index < parent.children.length && parent.children[this.index].matchesHack(nodeName)) {\n this.index++;\n } else {\n let dom = document.createElement(nodeName);\n if (nodeName == \"IMG\") {\n dom.className = \"ProseMirror-separator\";\n dom.alt = \"\";\n }\n if (nodeName == \"BR\") dom.className = \"ProseMirror-trailingBreak\";\n let hack = new TrailingHackViewDesc(this.top, [], dom, null);\n if (parent != this.top) parent.children.push(hack);else parent.children.splice(this.index++, 0, hack);\n this.changed = true;\n }\n }\n}\n// Iterate from the end of the fragment and array of descs to find\n// directly matching ones, in order to avoid overeagerly reusing those\n// for other nodes. Returns the fragment index of the first node that\n// is part of the sequence of matched nodes at the end of the\n// fragment.\nfunction preMatch(frag, parentDesc) {\n let curDesc = parentDesc,\n descI = curDesc.children.length;\n let fI = frag.childCount,\n matched = new Map(),\n matches = [];\n outer: while (fI > 0) {\n let desc;\n for (;;) {\n if (descI) {\n let next = curDesc.children[descI - 1];\n if (next instanceof MarkViewDesc) {\n curDesc = next;\n descI = next.children.length;\n } else {\n desc = next;\n descI--;\n break;\n }\n } else if (curDesc == parentDesc) {\n break outer;\n } else {\n // FIXME\n descI = curDesc.parent.children.indexOf(curDesc);\n curDesc = curDesc.parent;\n }\n }\n let node = desc.node;\n if (!node) continue;\n if (node != frag.child(fI - 1)) break;\n --fI;\n matched.set(desc, fI);\n matches.push(desc);\n }\n return {\n index: fI,\n matched,\n matches: matches.reverse()\n };\n}\nfunction compareSide(a, b) {\n return a.type.side - b.type.side;\n}\n// This function abstracts iterating over the nodes and decorations in\n// a fragment. Calls `onNode` for each node, with its local and child\n// decorations. Splits text nodes when there is a decoration starting\n// or ending inside of them. Calls `onWidget` for each widget.\nfunction iterDeco(parent, deco, onWidget, onNode) {\n let locals = deco.locals(parent),\n offset = 0;\n // Simple, cheap variant for when there are no local decorations\n if (locals.length == 0) {\n for (let i = 0; i < parent.childCount; i++) {\n let child = parent.child(i);\n onNode(child, locals, deco.forChild(offset, child), i);\n offset += child.nodeSize;\n }\n return;\n }\n let decoIndex = 0,\n active = [],\n restNode = null;\n for (let parentIndex = 0;;) {\n if (decoIndex < locals.length && locals[decoIndex].to == offset) {\n let widget = locals[decoIndex++],\n widgets;\n while (decoIndex < locals.length && locals[decoIndex].to == offset) (widgets || (widgets = [widget])).push(locals[decoIndex++]);\n if (widgets) {\n widgets.sort(compareSide);\n for (let i = 0; i < widgets.length; i++) onWidget(widgets[i], parentIndex, !!restNode);\n } else {\n onWidget(widget, parentIndex, !!restNode);\n }\n }\n let child, index;\n if (restNode) {\n index = -1;\n child = restNode;\n restNode = null;\n } else if (parentIndex < parent.childCount) {\n index = parentIndex;\n child = parent.child(parentIndex++);\n } else {\n break;\n }\n for (let i = 0; i < active.length; i++) if (active[i].to <= offset) active.splice(i--, 1);\n while (decoIndex < locals.length && locals[decoIndex].from <= offset && locals[decoIndex].to > offset) active.push(locals[decoIndex++]);\n let end = offset + child.nodeSize;\n if (child.isText) {\n let cutAt = end;\n if (decoIndex < locals.length && locals[decoIndex].from < cutAt) cutAt = locals[decoIndex].from;\n for (let i = 0; i < active.length; i++) if (active[i].to < cutAt) cutAt = active[i].to;\n if (cutAt < end) {\n restNode = child.cut(cutAt - offset);\n child = child.cut(0, cutAt - offset);\n end = cutAt;\n index = -1;\n }\n }\n let outerDeco = child.isInline && !child.isLeaf ? active.filter(d => !d.inline) : active.slice();\n onNode(child, outerDeco, deco.forChild(offset, child), index);\n offset = end;\n }\n}\n// List markers in Mobile Safari will mysteriously disappear\n// sometimes. This works around that.\nfunction iosHacks(dom) {\n if (dom.nodeName == \"UL\" || dom.nodeName == \"OL\") {\n let oldCSS = dom.style.cssText;\n dom.style.cssText = oldCSS + \"; list-style: square !important\";\n window.getComputedStyle(dom).listStyle;\n dom.style.cssText = oldCSS;\n }\n}\nfunction nearbyTextNode(node, offset) {\n for (;;) {\n if (node.nodeType == 3) return node;\n if (node.nodeType == 1 && offset > 0) {\n if (node.childNodes.length > offset && node.childNodes[offset].nodeType == 3) return node.childNodes[offset];\n node = node.childNodes[offset - 1];\n offset = nodeSize(node);\n } else if (node.nodeType == 1 && offset < node.childNodes.length) {\n node = node.childNodes[offset];\n offset = 0;\n } else {\n return null;\n }\n }\n}\n// Find a piece of text in an inline fragment, overlapping from-to\nfunction findTextInFragment(frag, text, from, to) {\n for (let i = 0, pos = 0; i < frag.childCount && pos <= to;) {\n let child = frag.child(i++),\n childStart = pos;\n pos += child.nodeSize;\n if (!child.isText) continue;\n let str = child.text;\n while (i < frag.childCount) {\n let next = frag.child(i++);\n pos += next.nodeSize;\n if (!next.isText) break;\n str += next.text;\n }\n if (pos >= from) {\n let found = childStart < to ? str.lastIndexOf(text, to - childStart - 1) : -1;\n if (found >= 0 && found + text.length + childStart >= from) return childStart + found;\n if (from == to && str.length >= to + text.length - childStart && str.slice(to - childStart, to - childStart + text.length) == text) return to;\n }\n }\n return -1;\n}\n// Replace range from-to in an array of view descs with replacement\n// (may be null to just delete). This goes very much against the grain\n// of the rest of this code, which tends to create nodes with the\n// right shape in one go, rather than messing with them after\n// creation, but is necessary in the composition hack.\nfunction replaceNodes(nodes, from, to, view, replacement) {\n let result = [];\n for (let i = 0, off = 0; i < nodes.length; i++) {\n let child = nodes[i],\n start = off,\n end = off += child.size;\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) result.push(child.slice(0, from - start, view));\n if (replacement) {\n result.push(replacement);\n replacement = undefined;\n }\n if (end > to) result.push(child.slice(to - start, child.size, view));\n }\n }\n return result;\n}\nfunction selectionFromDOM(view) {\n let origin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n let domSel = view.domSelectionRange(),\n doc = view.state.doc;\n if (!domSel.focusNode) return null;\n let nearestDesc = view.docView.nearestDesc(domSel.focusNode),\n inWidget = nearestDesc && nearestDesc.size == 0;\n let head = view.docView.posFromDOM(domSel.focusNode, domSel.focusOffset, 1);\n if (head < 0) return null;\n let $head = doc.resolve(head),\n $anchor,\n selection;\n if (selectionCollapsed(domSel)) {\n $anchor = $head;\n while (nearestDesc && !nearestDesc.node) nearestDesc = nearestDesc.parent;\n let nearestDescNode = nearestDesc.node;\n if (nearestDesc && nearestDescNode.isAtom && NodeSelection.isSelectable(nearestDescNode) && nearestDesc.parent && !(nearestDescNode.isInline && isOnEdge(domSel.focusNode, domSel.focusOffset, nearestDesc.dom))) {\n let pos = nearestDesc.posBefore;\n selection = new NodeSelection(head == pos ? $head : doc.resolve(pos));\n }\n } else {\n let anchor = view.docView.posFromDOM(domSel.anchorNode, domSel.anchorOffset, 1);\n if (anchor < 0) return null;\n $anchor = doc.resolve(anchor);\n }\n if (!selection) {\n let bias = origin == \"pointer\" || view.state.selection.head < $head.pos && !inWidget ? 1 : -1;\n selection = selectionBetween(view, $anchor, $head, bias);\n }\n return selection;\n}\nfunction editorOwnsSelection(view) {\n return view.editable ? view.hasFocus() : hasSelection(view) && document.activeElement && document.activeElement.contains(view.dom);\n}\nfunction selectionToDOM(view) {\n let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let sel = view.state.selection;\n syncNodeSelection(view, sel);\n if (!editorOwnsSelection(view)) return;\n // The delayed drag selection causes issues with Cell Selections\n // in Safari. And the drag selection delay is to workarond issues\n // which only present in Chrome.\n if (!force && view.input.mouseDown && view.input.mouseDown.allowDefault && chrome) {\n let domSel = view.domSelectionRange(),\n curSel = view.domObserver.currentSelection;\n if (domSel.anchorNode && curSel.anchorNode && isEquivalentPosition(domSel.anchorNode, domSel.anchorOffset, curSel.anchorNode, curSel.anchorOffset)) {\n view.input.mouseDown.delayedSelectionSync = true;\n view.domObserver.setCurSelection();\n return;\n }\n }\n view.domObserver.disconnectSelection();\n if (view.cursorWrapper) {\n selectCursorWrapper(view);\n } else {\n let {\n anchor,\n head\n } = sel,\n resetEditableFrom,\n resetEditableTo;\n if (brokenSelectBetweenUneditable && !(sel instanceof TextSelection)) {\n if (!sel.$from.parent.inlineContent) resetEditableFrom = temporarilyEditableNear(view, sel.from);\n if (!sel.empty && !sel.$from.parent.inlineContent) resetEditableTo = temporarilyEditableNear(view, sel.to);\n }\n view.docView.setSelection(anchor, head, view.root, force);\n if (brokenSelectBetweenUneditable) {\n if (resetEditableFrom) resetEditable(resetEditableFrom);\n if (resetEditableTo) resetEditable(resetEditableTo);\n }\n if (sel.visible) {\n view.dom.classList.remove(\"ProseMirror-hideselection\");\n } else {\n view.dom.classList.add(\"ProseMirror-hideselection\");\n if (\"onselectionchange\" in document) removeClassOnSelectionChange(view);\n }\n }\n view.domObserver.setCurSelection();\n view.domObserver.connectSelection();\n}\n// Kludge to work around Webkit not allowing a selection to start/end\n// between non-editable block nodes. We briefly make something\n// editable, set the selection, then set it uneditable again.\nconst brokenSelectBetweenUneditable = safari || chrome && chrome_version < 63;\nfunction temporarilyEditableNear(view, pos) {\n let {\n node,\n offset\n } = view.docView.domFromPos(pos, 0);\n let after = offset < node.childNodes.length ? node.childNodes[offset] : null;\n let before = offset ? node.childNodes[offset - 1] : null;\n if (safari && after && after.contentEditable == \"false\") return setEditable(after);\n if ((!after || after.contentEditable == \"false\") && (!before || before.contentEditable == \"false\")) {\n if (after) return setEditable(after);else if (before) return setEditable(before);\n }\n}\nfunction setEditable(element) {\n element.contentEditable = \"true\";\n if (safari && element.draggable) {\n element.draggable = false;\n element.wasDraggable = true;\n }\n return element;\n}\nfunction resetEditable(element) {\n element.contentEditable = \"false\";\n if (element.wasDraggable) {\n element.draggable = true;\n element.wasDraggable = null;\n }\n}\nfunction removeClassOnSelectionChange(view) {\n let doc = view.dom.ownerDocument;\n doc.removeEventListener(\"selectionchange\", view.input.hideSelectionGuard);\n let domSel = view.domSelectionRange();\n let node = domSel.anchorNode,\n offset = domSel.anchorOffset;\n doc.addEventListener(\"selectionchange\", view.input.hideSelectionGuard = () => {\n if (domSel.anchorNode != node || domSel.anchorOffset != offset) {\n doc.removeEventListener(\"selectionchange\", view.input.hideSelectionGuard);\n setTimeout(() => {\n if (!editorOwnsSelection(view) || view.state.selection.visible) view.dom.classList.remove(\"ProseMirror-hideselection\");\n }, 20);\n }\n });\n}\nfunction selectCursorWrapper(view) {\n let domSel = view.domSelection(),\n range = document.createRange();\n let node = view.cursorWrapper.dom,\n img = node.nodeName == \"IMG\";\n if (img) range.setEnd(node.parentNode, domIndex(node) + 1);else range.setEnd(node, 0);\n range.collapse(false);\n domSel.removeAllRanges();\n domSel.addRange(range);\n // Kludge to kill 'control selection' in IE11 when selecting an\n // invisible cursor wrapper, since that would result in those weird\n // resize handles and a selection that considers the absolutely\n // positioned wrapper, rather than the root editable node, the\n // focused element.\n if (!img && !view.state.selection.visible && ie && ie_version <= 11) {\n node.disabled = true;\n node.disabled = false;\n }\n}\nfunction syncNodeSelection(view, sel) {\n if (sel instanceof NodeSelection) {\n let desc = view.docView.descAt(sel.from);\n if (desc != view.lastSelectedViewDesc) {\n clearNodeSelection(view);\n if (desc) desc.selectNode();\n view.lastSelectedViewDesc = desc;\n }\n } else {\n clearNodeSelection(view);\n }\n}\n// Clear all DOM statefulness of the last node selection.\nfunction clearNodeSelection(view) {\n if (view.lastSelectedViewDesc) {\n if (view.lastSelectedViewDesc.parent) view.lastSelectedViewDesc.deselectNode();\n view.lastSelectedViewDesc = undefined;\n }\n}\nfunction selectionBetween(view, $anchor, $head, bias) {\n return view.someProp(\"createSelectionBetween\", f => f(view, $anchor, $head)) || TextSelection.between($anchor, $head, bias);\n}\nfunction hasFocusAndSelection(view) {\n if (view.editable && !view.hasFocus()) return false;\n return hasSelection(view);\n}\nfunction hasSelection(view) {\n let sel = view.domSelectionRange();\n if (!sel.anchorNode) return false;\n try {\n // Firefox will raise 'permission denied' errors when accessing\n // properties of `sel.anchorNode` when it's in a generated CSS\n // element.\n return view.dom.contains(sel.anchorNode.nodeType == 3 ? sel.anchorNode.parentNode : sel.anchorNode) && (view.editable || view.dom.contains(sel.focusNode.nodeType == 3 ? sel.focusNode.parentNode : sel.focusNode));\n } catch (_) {\n return false;\n }\n}\nfunction anchorInRightPlace(view) {\n let anchorDOM = view.docView.domFromPos(view.state.selection.anchor, 0);\n let domSel = view.domSelectionRange();\n return isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset);\n}\nfunction moveSelectionBlock(state, dir) {\n let {\n $anchor,\n $head\n } = state.selection;\n let $side = dir > 0 ? $anchor.max($head) : $anchor.min($head);\n let $start = !$side.parent.inlineContent ? $side : $side.depth ? state.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;\n return $start && Selection.findFrom($start, dir);\n}\nfunction apply(view, sel) {\n view.dispatch(view.state.tr.setSelection(sel).scrollIntoView());\n return true;\n}\nfunction selectHorizontally(view, dir, mods) {\n let sel = view.state.selection;\n if (sel instanceof TextSelection) {\n if (!sel.empty || mods.indexOf(\"s\") > -1) {\n return false;\n } else if (view.endOfTextblock(dir > 0 ? \"right\" : \"left\")) {\n let next = moveSelectionBlock(view.state, dir);\n if (next && next instanceof NodeSelection) return apply(view, next);\n return false;\n } else if (!(mac && mods.indexOf(\"m\") > -1)) {\n let $head = sel.$head,\n node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter,\n desc;\n if (!node || node.isText) return false;\n let nodePos = dir < 0 ? $head.pos - node.nodeSize : $head.pos;\n if (!(node.isAtom || (desc = view.docView.descAt(nodePos)) && !desc.contentDOM)) return false;\n if (NodeSelection.isSelectable(node)) {\n return apply(view, new NodeSelection(dir < 0 ? view.state.doc.resolve($head.pos - node.nodeSize) : $head));\n } else if (webkit) {\n // Chrome and Safari will introduce extra pointless cursor\n // positions around inline uneditable nodes, so we have to\n // take over and move the cursor past them (#937)\n return apply(view, new TextSelection(view.state.doc.resolve(dir < 0 ? nodePos : nodePos + node.nodeSize)));\n } else {\n return false;\n }\n }\n } else if (sel instanceof NodeSelection && sel.node.isInline) {\n return apply(view, new TextSelection(dir > 0 ? sel.$to : sel.$from));\n } else {\n let next = moveSelectionBlock(view.state, dir);\n if (next) return apply(view, next);\n return false;\n }\n}\nfunction nodeLen(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;\n}\nfunction isIgnorable(dom) {\n let desc = dom.pmViewDesc;\n return desc && desc.size == 0 && (dom.nextSibling || dom.nodeName != \"BR\");\n}\n// Make sure the cursor isn't directly after one or more ignored\n// nodes, which will confuse the browser's cursor motion logic.\nfunction skipIgnoredNodesLeft(view) {\n let sel = view.domSelectionRange();\n let node = sel.focusNode,\n offset = sel.focusOffset;\n if (!node) return;\n let moveNode,\n moveOffset,\n force = false;\n // Gecko will do odd things when the selection is directly in front\n // of a non-editable node, so in that case, move it into the next\n // node if possible. Issue prosemirror/prosemirror#832.\n if (gecko && node.nodeType == 1 && offset < nodeLen(node) && isIgnorable(node.childNodes[offset])) force = true;\n for (;;) {\n if (offset > 0) {\n if (node.nodeType != 1) {\n break;\n } else {\n let before = node.childNodes[offset - 1];\n if (isIgnorable(before)) {\n moveNode = node;\n moveOffset = --offset;\n } else if (before.nodeType == 3) {\n node = before;\n offset = node.nodeValue.length;\n } else break;\n }\n } else if (isBlockNode(node)) {\n break;\n } else {\n let prev = node.previousSibling;\n while (prev && isIgnorable(prev)) {\n moveNode = node.parentNode;\n moveOffset = domIndex(prev);\n prev = prev.previousSibling;\n }\n if (!prev) {\n node = node.parentNode;\n if (node == view.dom) break;\n offset = 0;\n } else {\n node = prev;\n offset = nodeLen(node);\n }\n }\n }\n if (force) setSelFocus(view, node, offset);else if (moveNode) setSelFocus(view, moveNode, moveOffset);\n}\n// Make sure the cursor isn't directly before one or more ignored\n// nodes.\nfunction skipIgnoredNodesRight(view) {\n let sel = view.domSelectionRange();\n let node = sel.focusNode,\n offset = sel.focusOffset;\n if (!node) return;\n let len = nodeLen(node);\n let moveNode, moveOffset;\n for (;;) {\n if (offset < len) {\n if (node.nodeType != 1) break;\n let after = node.childNodes[offset];\n if (isIgnorable(after)) {\n moveNode = node;\n moveOffset = ++offset;\n } else break;\n } else if (isBlockNode(node)) {\n break;\n } else {\n let next = node.nextSibling;\n while (next && isIgnorable(next)) {\n moveNode = next.parentNode;\n moveOffset = domIndex(next) + 1;\n next = next.nextSibling;\n }\n if (!next) {\n node = node.parentNode;\n if (node == view.dom) break;\n offset = len = 0;\n } else {\n node = next;\n offset = 0;\n len = nodeLen(node);\n }\n }\n }\n if (moveNode) setSelFocus(view, moveNode, moveOffset);\n}\nfunction isBlockNode(dom) {\n let desc = dom.pmViewDesc;\n return desc && desc.node && desc.node.isBlock;\n}\nfunction setSelFocus(view, node, offset) {\n let sel = view.domSelection();\n if (selectionCollapsed(sel)) {\n let range = document.createRange();\n range.setEnd(node, offset);\n range.setStart(node, offset);\n sel.removeAllRanges();\n sel.addRange(range);\n } else if (sel.extend) {\n sel.extend(node, offset);\n }\n view.domObserver.setCurSelection();\n let {\n state\n } = view;\n // If no state update ends up happening, reset the selection.\n setTimeout(() => {\n if (view.state == state) selectionToDOM(view);\n }, 50);\n}\n// Check whether vertical selection motion would involve node\n// selections. If so, apply it (if not, the result is left to the\n// browser)\nfunction selectVertically(view, dir, mods) {\n let sel = view.state.selection;\n if (sel instanceof TextSelection && !sel.empty || mods.indexOf(\"s\") > -1) return false;\n if (mac && mods.indexOf(\"m\") > -1) return false;\n let {\n $from,\n $to\n } = sel;\n if (!$from.parent.inlineContent || view.endOfTextblock(dir < 0 ? \"up\" : \"down\")) {\n let next = moveSelectionBlock(view.state, dir);\n if (next && next instanceof NodeSelection) return apply(view, next);\n }\n if (!$from.parent.inlineContent) {\n let side = dir < 0 ? $from : $to;\n let beyond = sel instanceof AllSelection ? Selection.near(side, dir) : Selection.findFrom(side, dir);\n return beyond ? apply(view, beyond) : false;\n }\n return false;\n}\nfunction stopNativeHorizontalDelete(view, dir) {\n if (!(view.state.selection instanceof TextSelection)) return true;\n let {\n $head,\n $anchor,\n empty\n } = view.state.selection;\n if (!$head.sameParent($anchor)) return true;\n if (!empty) return false;\n if (view.endOfTextblock(dir > 0 ? \"forward\" : \"backward\")) return true;\n let nextNode = !$head.textOffset && (dir < 0 ? $head.nodeBefore : $head.nodeAfter);\n if (nextNode && !nextNode.isText) {\n let tr = view.state.tr;\n if (dir < 0) tr.delete($head.pos - nextNode.nodeSize, $head.pos);else tr.delete($head.pos, $head.pos + nextNode.nodeSize);\n view.dispatch(tr);\n return true;\n }\n return false;\n}\nfunction switchEditable(view, node, state) {\n view.domObserver.stop();\n node.contentEditable = state;\n view.domObserver.start();\n}\n// Issue #867 / #1090 / https://bugs.chromium.org/p/chromium/issues/detail?id=903821\n// In which Safari (and at some point in the past, Chrome) does really\n// wrong things when the down arrow is pressed when the cursor is\n// directly at the start of a textblock and has an uneditable node\n// after it\nfunction safariDownArrowBug(view) {\n if (!safari || view.state.selection.$head.parentOffset > 0) return false;\n let {\n focusNode,\n focusOffset\n } = view.domSelectionRange();\n if (focusNode && focusNode.nodeType == 1 && focusOffset == 0 && focusNode.firstChild && focusNode.firstChild.contentEditable == \"false\") {\n let child = focusNode.firstChild;\n switchEditable(view, child, \"true\");\n setTimeout(() => switchEditable(view, child, \"false\"), 20);\n }\n return false;\n}\n// A backdrop key mapping used to make sure we always suppress keys\n// that have a dangerous default effect, even if the commands they are\n// bound to return false, and to make sure that cursor-motion keys\n// find a cursor (as opposed to a node selection) when pressed. For\n// cursor-motion keys, the code in the handlers also takes care of\n// block selections.\nfunction getMods(event) {\n let result = \"\";\n if (event.ctrlKey) result += \"c\";\n if (event.metaKey) result += \"m\";\n if (event.altKey) result += \"a\";\n if (event.shiftKey) result += \"s\";\n return result;\n}\nfunction captureKeyDown(view, event) {\n let code = event.keyCode,\n mods = getMods(event);\n if (code == 8 || mac && code == 72 && mods == \"c\") {\n // Backspace, Ctrl-h on Mac\n return stopNativeHorizontalDelete(view, -1) || skipIgnoredNodesLeft(view);\n } else if (code == 46 || mac && code == 68 && mods == \"c\") {\n // Delete, Ctrl-d on Mac\n return stopNativeHorizontalDelete(view, 1) || skipIgnoredNodesRight(view);\n } else if (code == 13 || code == 27) {\n // Enter, Esc\n return true;\n } else if (code == 37 || mac && code == 66 && mods == \"c\") {\n // Left arrow, Ctrl-b on Mac\n return selectHorizontally(view, -1, mods) || skipIgnoredNodesLeft(view);\n } else if (code == 39 || mac && code == 70 && mods == \"c\") {\n // Right arrow, Ctrl-f on Mac\n return selectHorizontally(view, 1, mods) || skipIgnoredNodesRight(view);\n } else if (code == 38 || mac && code == 80 && mods == \"c\") {\n // Up arrow, Ctrl-p on Mac\n return selectVertically(view, -1, mods) || skipIgnoredNodesLeft(view);\n } else if (code == 40 || mac && code == 78 && mods == \"c\") {\n // Down arrow, Ctrl-n on Mac\n return safariDownArrowBug(view) || selectVertically(view, 1, mods) || skipIgnoredNodesRight(view);\n } else if (mods == (mac ? \"m\" : \"c\") && (code == 66 || code == 73 || code == 89 || code == 90)) {\n // Mod-[biyz]\n return true;\n }\n return false;\n}\nfunction serializeForClipboard(view, slice) {\n view.someProp(\"transformCopied\", f => {\n slice = f(slice);\n });\n let context = [],\n {\n content,\n openStart,\n openEnd\n } = slice;\n while (openStart > 1 && openEnd > 1 && content.childCount == 1 && content.firstChild.childCount == 1) {\n openStart--;\n openEnd--;\n let node = content.firstChild;\n context.push(node.type.name, node.attrs != node.type.defaultAttrs ? node.attrs : null);\n content = node.content;\n }\n let serializer = view.someProp(\"clipboardSerializer\") || DOMSerializer.fromSchema(view.state.schema);\n let doc = detachedDoc(),\n wrap = doc.createElement(\"div\");\n wrap.appendChild(serializer.serializeFragment(content, {\n document: doc\n }));\n let firstChild = wrap.firstChild,\n needsWrap,\n wrappers = 0;\n while (firstChild && firstChild.nodeType == 1 && (needsWrap = wrapMap[firstChild.nodeName.toLowerCase()])) {\n for (let i = needsWrap.length - 1; i >= 0; i--) {\n let wrapper = doc.createElement(needsWrap[i]);\n while (wrap.firstChild) wrapper.appendChild(wrap.firstChild);\n wrap.appendChild(wrapper);\n wrappers++;\n }\n firstChild = wrap.firstChild;\n }\n if (firstChild && firstChild.nodeType == 1) firstChild.setAttribute(\"data-pm-slice\", `${openStart} ${openEnd}${wrappers ? ` -${wrappers}` : \"\"} ${JSON.stringify(context)}`);\n let text = view.someProp(\"clipboardTextSerializer\", f => f(slice)) || slice.content.textBetween(0, slice.content.size, \"\\n\\n\");\n return {\n dom: wrap,\n text\n };\n}\n// Read a slice of content from the clipboard (or drop data).\nfunction parseFromClipboard(view, text, html, plainText, $context) {\n let inCode = $context.parent.type.spec.code;\n let dom, slice;\n if (!html && !text) return null;\n let asText = text && (plainText || inCode || !html);\n if (asText) {\n view.someProp(\"transformPastedText\", f => {\n text = f(text, inCode || plainText);\n });\n if (inCode) return text ? new Slice(Fragment.from(view.state.schema.text(text.replace(/\\r\\n?/g, \"\\n\"))), 0, 0) : Slice.empty;\n let parsed = view.someProp(\"clipboardTextParser\", f => f(text, $context, plainText));\n if (parsed) {\n slice = parsed;\n } else {\n let marks = $context.marks();\n let {\n schema\n } = view.state,\n serializer = DOMSerializer.fromSchema(schema);\n dom = document.createElement(\"div\");\n text.split(/(?:\\r\\n?|\\n)+/).forEach(block => {\n let p = dom.appendChild(document.createElement(\"p\"));\n if (block) p.appendChild(serializer.serializeNode(schema.text(block, marks)));\n });\n }\n } else {\n view.someProp(\"transformPastedHTML\", f => {\n html = f(html);\n });\n dom = readHTML(html);\n if (webkit) restoreReplacedSpaces(dom);\n }\n let contextNode = dom && dom.querySelector(\"[data-pm-slice]\");\n let sliceData = contextNode && /^(\\d+) (\\d+)(?: -(\\d+))? (.*)/.exec(contextNode.getAttribute(\"data-pm-slice\") || \"\");\n if (sliceData && sliceData[3]) for (let i = +sliceData[3]; i > 0 && dom.firstChild; i--) dom = dom.firstChild;\n if (!slice) {\n let parser = view.someProp(\"clipboardParser\") || view.someProp(\"domParser\") || DOMParser.fromSchema(view.state.schema);\n slice = parser.parseSlice(dom, {\n preserveWhitespace: !!(asText || sliceData),\n context: $context,\n ruleFromNode(dom) {\n if (dom.nodeName == \"BR\" && !dom.nextSibling && dom.parentNode && !inlineParents.test(dom.parentNode.nodeName)) return {\n ignore: true\n };\n return null;\n }\n });\n }\n if (sliceData) {\n slice = addContext(closeSlice(slice, +sliceData[1], +sliceData[2]), sliceData[4]);\n } else {\n // HTML wasn't created by ProseMirror. Make sure top-level siblings are coherent\n slice = Slice.maxOpen(normalizeSiblings(slice.content, $context), true);\n if (slice.openStart || slice.openEnd) {\n let openStart = 0,\n openEnd = 0;\n for (let node = slice.content.firstChild; openStart < slice.openStart && !node.type.spec.isolating; openStart++, node = node.firstChild) {}\n for (let node = slice.content.lastChild; openEnd < slice.openEnd && !node.type.spec.isolating; openEnd++, node = node.lastChild) {}\n slice = closeSlice(slice, openStart, openEnd);\n }\n }\n view.someProp(\"transformPasted\", f => {\n slice = f(slice);\n });\n return slice;\n}\nconst inlineParents = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;\n// Takes a slice parsed with parseSlice, which means there hasn't been\n// any content-expression checking done on the top nodes, tries to\n// find a parent node in the current context that might fit the nodes,\n// and if successful, rebuilds the slice so that it fits into that parent.\n//\n// This addresses the problem that Transform.replace expects a\n// coherent slice, and will fail to place a set of siblings that don't\n// fit anywhere in the schema.\nfunction normalizeSiblings(fragment, $context) {\n if (fragment.childCount < 2) return fragment;\n for (let d = $context.depth; d >= 0; d--) {\n let parent = $context.node(d);\n let match = parent.contentMatchAt($context.index(d));\n let lastWrap,\n result = [];\n fragment.forEach(node => {\n if (!result) return;\n let wrap = match.findWrapping(node.type),\n inLast;\n if (!wrap) return result = null;\n if (inLast = result.length && lastWrap.length && addToSibling(wrap, lastWrap, node, result[result.length - 1], 0)) {\n result[result.length - 1] = inLast;\n } else {\n if (result.length) result[result.length - 1] = closeRight(result[result.length - 1], lastWrap.length);\n let wrapped = withWrappers(node, wrap);\n result.push(wrapped);\n match = match.matchType(wrapped.type);\n lastWrap = wrap;\n }\n });\n if (result) return Fragment.from(result);\n }\n return fragment;\n}\nfunction withWrappers(node, wrap) {\n let from = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n for (let i = wrap.length - 1; i >= from; i--) node = wrap[i].create(null, Fragment.from(node));\n return node;\n}\n// Used to group adjacent nodes wrapped in similar parents by\n// normalizeSiblings into the same parent node\nfunction addToSibling(wrap, lastWrap, node, sibling, depth) {\n if (depth < wrap.length && depth < lastWrap.length && wrap[depth] == lastWrap[depth]) {\n let inner = addToSibling(wrap, lastWrap, node, sibling.lastChild, depth + 1);\n if (inner) return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));\n let match = sibling.contentMatchAt(sibling.childCount);\n if (match.matchType(depth == wrap.length - 1 ? node.type : wrap[depth + 1])) return sibling.copy(sibling.content.append(Fragment.from(withWrappers(node, wrap, depth + 1))));\n }\n}\nfunction closeRight(node, depth) {\n if (depth == 0) return node;\n let fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));\n let fill = node.contentMatchAt(node.childCount).fillBefore(Fragment.empty, true);\n return node.copy(fragment.append(fill));\n}\nfunction closeRange(fragment, side, from, to, depth, openEnd) {\n let node = side < 0 ? fragment.firstChild : fragment.lastChild,\n inner = node.content;\n if (depth < to - 1) inner = closeRange(inner, side, from, to, depth + 1, openEnd);\n if (depth >= from) inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, fragment.childCount > 1 || openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment.empty, true));\n return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));\n}\nfunction closeSlice(slice, openStart, openEnd) {\n if (openStart < slice.openStart) slice = new Slice(closeRange(slice.content, -1, openStart, slice.openStart, 0, slice.openEnd), openStart, slice.openEnd);\n if (openEnd < slice.openEnd) slice = new Slice(closeRange(slice.content, 1, openEnd, slice.openEnd, 0, 0), slice.openStart, openEnd);\n return slice;\n}\n// Trick from jQuery -- some elements must be wrapped in other\n// elements for innerHTML to work. I.e. if you do `div.innerHTML =\n// \"..\"` the table cells are ignored.\nconst wrapMap = {\n thead: [\"table\"],\n tbody: [\"table\"],\n tfoot: [\"table\"],\n caption: [\"table\"],\n colgroup: [\"table\"],\n col: [\"table\", \"colgroup\"],\n tr: [\"table\", \"tbody\"],\n td: [\"table\", \"tbody\", \"tr\"],\n th: [\"table\", \"tbody\", \"tr\"]\n};\nlet _detachedDoc = null;\nfunction detachedDoc() {\n return _detachedDoc || (_detachedDoc = document.implementation.createHTMLDocument(\"title\"));\n}\nfunction readHTML(html) {\n let metas = /^(\\s*]*>)*/.exec(html);\n if (metas) html = html.slice(metas[0].length);\n let elt = detachedDoc().createElement(\"div\");\n let firstTag = /<([a-z][^>\\s]+)/i.exec(html),\n wrap;\n if (wrap = firstTag && wrapMap[firstTag[1].toLowerCase()]) html = wrap.map(n => \"<\" + n + \">\").join(\"\") + html + wrap.map(n => \"\").reverse().join(\"\");\n elt.innerHTML = html;\n if (wrap) for (let i = 0; i < wrap.length; i++) elt = elt.querySelector(wrap[i]) || elt;\n return elt;\n}\n// Webkit browsers do some hard-to-predict replacement of regular\n// spaces with non-breaking spaces when putting content on the\n// clipboard. This tries to convert such non-breaking spaces (which\n// will be wrapped in a plain span on Chrome, a span with class\n// Apple-converted-space on Safari) back to regular spaces.\nfunction restoreReplacedSpaces(dom) {\n let nodes = dom.querySelectorAll(chrome ? \"span:not([class]):not([style])\" : \"span.Apple-converted-space\");\n for (let i = 0; i < nodes.length; i++) {\n let node = nodes[i];\n if (node.childNodes.length == 1 && node.textContent == \"\\u00a0\" && node.parentNode) node.parentNode.replaceChild(dom.ownerDocument.createTextNode(\" \"), node);\n }\n}\nfunction addContext(slice, context) {\n if (!slice.size) return slice;\n let schema = slice.content.firstChild.type.schema,\n array;\n try {\n array = JSON.parse(context);\n } catch (e) {\n return slice;\n }\n let {\n content,\n openStart,\n openEnd\n } = slice;\n for (let i = array.length - 2; i >= 0; i -= 2) {\n let type = schema.nodes[array[i]];\n if (!type || type.hasRequiredAttrs()) break;\n content = Fragment.from(type.create(array[i + 1], content));\n openStart++;\n openEnd++;\n }\n return new Slice(content, openStart, openEnd);\n}\n\n// A collection of DOM events that occur within the editor, and callback functions\n// to invoke when the event fires.\nconst handlers = {};\nconst editHandlers = {};\nconst passiveHandlers = {\n touchstart: true,\n touchmove: true\n};\nclass InputState {\n constructor() {\n this.shiftKey = false;\n this.mouseDown = null;\n this.lastKeyCode = null;\n this.lastKeyCodeTime = 0;\n this.lastClick = {\n time: 0,\n x: 0,\n y: 0,\n type: \"\"\n };\n this.lastSelectionOrigin = null;\n this.lastSelectionTime = 0;\n this.lastIOSEnter = 0;\n this.lastIOSEnterFallbackTimeout = -1;\n this.lastFocus = 0;\n this.lastTouch = 0;\n this.lastAndroidDelete = 0;\n this.composing = false;\n this.composingTimeout = -1;\n this.compositionNodes = [];\n this.compositionEndedAt = -2e8;\n this.domChangeCount = 0;\n this.eventHandlers = Object.create(null);\n this.hideSelectionGuard = null;\n }\n}\nfunction initInput(view) {\n for (let event in handlers) {\n let handler = handlers[event];\n view.dom.addEventListener(event, view.input.eventHandlers[event] = event => {\n if (eventBelongsToView(view, event) && !runCustomHandler(view, event) && (view.editable || !(event.type in editHandlers))) handler(view, event);\n }, passiveHandlers[event] ? {\n passive: true\n } : undefined);\n }\n // On Safari, for reasons beyond my understanding, adding an input\n // event handler makes an issue where the composition vanishes when\n // you press enter go away.\n if (safari) view.dom.addEventListener(\"input\", () => null);\n ensureListeners(view);\n}\nfunction setSelectionOrigin(view, origin) {\n view.input.lastSelectionOrigin = origin;\n view.input.lastSelectionTime = Date.now();\n}\nfunction destroyInput(view) {\n view.domObserver.stop();\n for (let type in view.input.eventHandlers) view.dom.removeEventListener(type, view.input.eventHandlers[type]);\n clearTimeout(view.input.composingTimeout);\n clearTimeout(view.input.lastIOSEnterFallbackTimeout);\n}\nfunction ensureListeners(view) {\n view.someProp(\"handleDOMEvents\", currentHandlers => {\n for (let type in currentHandlers) if (!view.input.eventHandlers[type]) view.dom.addEventListener(type, view.input.eventHandlers[type] = event => runCustomHandler(view, event));\n });\n}\nfunction runCustomHandler(view, event) {\n return view.someProp(\"handleDOMEvents\", handlers => {\n let handler = handlers[event.type];\n return handler ? handler(view, event) || event.defaultPrevented : false;\n });\n}\nfunction eventBelongsToView(view, event) {\n if (!event.bubbles) return true;\n if (event.defaultPrevented) return false;\n for (let node = event.target; node != view.dom; node = node.parentNode) if (!node || node.nodeType == 11 || node.pmViewDesc && node.pmViewDesc.stopEvent(event)) return false;\n return true;\n}\nfunction dispatchEvent(view, event) {\n if (!runCustomHandler(view, event) && handlers[event.type] && (view.editable || !(event.type in editHandlers))) handlers[event.type](view, event);\n}\neditHandlers.keydown = (view, _event) => {\n let event = _event;\n view.input.shiftKey = event.keyCode == 16 || event.shiftKey;\n if (inOrNearComposition(view, event)) return;\n view.input.lastKeyCode = event.keyCode;\n view.input.lastKeyCodeTime = Date.now();\n // Suppress enter key events on Chrome Android, because those tend\n // to be part of a confused sequence of composition events fired,\n // and handling them eagerly tends to corrupt the input.\n if (android && chrome && event.keyCode == 13) return;\n if (event.keyCode != 229) view.domObserver.forceFlush();\n // On iOS, if we preventDefault enter key presses, the virtual\n // keyboard gets confused. So the hack here is to set a flag that\n // makes the DOM change code recognize that what just happens should\n // be replaced by whatever the Enter key handlers do.\n if (ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {\n let now = Date.now();\n view.input.lastIOSEnter = now;\n view.input.lastIOSEnterFallbackTimeout = setTimeout(() => {\n if (view.input.lastIOSEnter == now) {\n view.someProp(\"handleKeyDown\", f => f(view, keyEvent(13, \"Enter\")));\n view.input.lastIOSEnter = 0;\n }\n }, 200);\n } else if (view.someProp(\"handleKeyDown\", f => f(view, event)) || captureKeyDown(view, event)) {\n event.preventDefault();\n } else {\n setSelectionOrigin(view, \"key\");\n }\n};\neditHandlers.keyup = (view, event) => {\n if (event.keyCode == 16) view.input.shiftKey = false;\n};\neditHandlers.keypress = (view, _event) => {\n let event = _event;\n if (inOrNearComposition(view, event) || !event.charCode || event.ctrlKey && !event.altKey || mac && event.metaKey) return;\n if (view.someProp(\"handleKeyPress\", f => f(view, event))) {\n event.preventDefault();\n return;\n }\n let sel = view.state.selection;\n if (!(sel instanceof TextSelection) || !sel.$from.sameParent(sel.$to)) {\n let text = String.fromCharCode(event.charCode);\n if (!view.someProp(\"handleTextInput\", f => f(view, sel.$from.pos, sel.$to.pos, text))) view.dispatch(view.state.tr.insertText(text).scrollIntoView());\n event.preventDefault();\n }\n};\nfunction eventCoords(event) {\n return {\n left: event.clientX,\n top: event.clientY\n };\n}\nfunction isNear(event, click) {\n let dx = click.x - event.clientX,\n dy = click.y - event.clientY;\n return dx * dx + dy * dy < 100;\n}\nfunction runHandlerOnContext(view, propName, pos, inside, event) {\n if (inside == -1) return false;\n let $pos = view.state.doc.resolve(inside);\n for (let i = $pos.depth + 1; i > 0; i--) {\n if (view.someProp(propName, f => i > $pos.depth ? f(view, pos, $pos.nodeAfter, $pos.before(i), event, true) : f(view, pos, $pos.node(i), $pos.before(i), event, false))) return true;\n }\n return false;\n}\nfunction updateSelection(view, selection, origin) {\n if (!view.focused) view.focus();\n let tr = view.state.tr.setSelection(selection);\n if (origin == \"pointer\") tr.setMeta(\"pointer\", true);\n view.dispatch(tr);\n}\nfunction selectClickedLeaf(view, inside) {\n if (inside == -1) return false;\n let $pos = view.state.doc.resolve(inside),\n node = $pos.nodeAfter;\n if (node && node.isAtom && NodeSelection.isSelectable(node)) {\n updateSelection(view, new NodeSelection($pos), \"pointer\");\n return true;\n }\n return false;\n}\nfunction selectClickedNode(view, inside) {\n if (inside == -1) return false;\n let sel = view.state.selection,\n selectedNode,\n selectAt;\n if (sel instanceof NodeSelection) selectedNode = sel.node;\n let $pos = view.state.doc.resolve(inside);\n for (let i = $pos.depth + 1; i > 0; i--) {\n let node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n if (NodeSelection.isSelectable(node)) {\n if (selectedNode && sel.$from.depth > 0 && i >= sel.$from.depth && $pos.before(sel.$from.depth + 1) == sel.$from.pos) selectAt = $pos.before(sel.$from.depth);else selectAt = $pos.before(i);\n break;\n }\n }\n if (selectAt != null) {\n updateSelection(view, NodeSelection.create(view.state.doc, selectAt), \"pointer\");\n return true;\n } else {\n return false;\n }\n}\nfunction handleSingleClick(view, pos, inside, event, selectNode) {\n return runHandlerOnContext(view, \"handleClickOn\", pos, inside, event) || view.someProp(\"handleClick\", f => f(view, pos, event)) || (selectNode ? selectClickedNode(view, inside) : selectClickedLeaf(view, inside));\n}\nfunction handleDoubleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleDoubleClickOn\", pos, inside, event) || view.someProp(\"handleDoubleClick\", f => f(view, pos, event));\n}\nfunction handleTripleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleTripleClickOn\", pos, inside, event) || view.someProp(\"handleTripleClick\", f => f(view, pos, event)) || defaultTripleClick(view, inside, event);\n}\nfunction defaultTripleClick(view, inside, event) {\n if (event.button != 0) return false;\n let doc = view.state.doc;\n if (inside == -1) {\n if (doc.inlineContent) {\n updateSelection(view, TextSelection.create(doc, 0, doc.content.size), \"pointer\");\n return true;\n }\n return false;\n }\n let $pos = doc.resolve(inside);\n for (let i = $pos.depth + 1; i > 0; i--) {\n let node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n let nodePos = $pos.before(i);\n if (node.inlineContent) updateSelection(view, TextSelection.create(doc, nodePos + 1, nodePos + 1 + node.content.size), \"pointer\");else if (NodeSelection.isSelectable(node)) updateSelection(view, NodeSelection.create(doc, nodePos), \"pointer\");else continue;\n return true;\n }\n}\nfunction forceDOMFlush(view) {\n return endComposition(view);\n}\nconst selectNodeModifier = mac ? \"metaKey\" : \"ctrlKey\";\nhandlers.mousedown = (view, _event) => {\n let event = _event;\n view.input.shiftKey = event.shiftKey;\n let flushed = forceDOMFlush(view);\n let now = Date.now(),\n type = \"singleClick\";\n if (now - view.input.lastClick.time < 500 && isNear(event, view.input.lastClick) && !event[selectNodeModifier]) {\n if (view.input.lastClick.type == \"singleClick\") type = \"doubleClick\";else if (view.input.lastClick.type == \"doubleClick\") type = \"tripleClick\";\n }\n view.input.lastClick = {\n time: now,\n x: event.clientX,\n y: event.clientY,\n type\n };\n let pos = view.posAtCoords(eventCoords(event));\n if (!pos) return;\n if (type == \"singleClick\") {\n if (view.input.mouseDown) view.input.mouseDown.done();\n view.input.mouseDown = new MouseDown(view, pos, event, !!flushed);\n } else if ((type == \"doubleClick\" ? handleDoubleClick : handleTripleClick)(view, pos.pos, pos.inside, event)) {\n event.preventDefault();\n } else {\n setSelectionOrigin(view, \"pointer\");\n }\n};\nclass MouseDown {\n constructor(view, pos, event, flushed) {\n this.view = view;\n this.pos = pos;\n this.event = event;\n this.flushed = flushed;\n this.delayedSelectionSync = false;\n this.mightDrag = null;\n this.startDoc = view.state.doc;\n this.selectNode = !!event[selectNodeModifier];\n this.allowDefault = event.shiftKey;\n let targetNode, targetPos;\n if (pos.inside > -1) {\n targetNode = view.state.doc.nodeAt(pos.inside);\n targetPos = pos.inside;\n } else {\n let $pos = view.state.doc.resolve(pos.pos);\n targetNode = $pos.parent;\n targetPos = $pos.depth ? $pos.before() : 0;\n }\n const target = flushed ? null : event.target;\n const targetDesc = target ? view.docView.nearestDesc(target, true) : null;\n this.target = targetDesc ? targetDesc.dom : null;\n let {\n selection\n } = view.state;\n if (event.button == 0 && targetNode.type.spec.draggable && targetNode.type.spec.selectable !== false || selection instanceof NodeSelection && selection.from <= targetPos && selection.to > targetPos) this.mightDrag = {\n node: targetNode,\n pos: targetPos,\n addAttr: !!(this.target && !this.target.draggable),\n setUneditable: !!(this.target && gecko && !this.target.hasAttribute(\"contentEditable\"))\n };\n if (this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable)) {\n this.view.domObserver.stop();\n if (this.mightDrag.addAttr) this.target.draggable = true;\n if (this.mightDrag.setUneditable) setTimeout(() => {\n if (this.view.input.mouseDown == this) this.target.setAttribute(\"contentEditable\", \"false\");\n }, 20);\n this.view.domObserver.start();\n }\n view.root.addEventListener(\"mouseup\", this.up = this.up.bind(this));\n view.root.addEventListener(\"mousemove\", this.move = this.move.bind(this));\n setSelectionOrigin(view, \"pointer\");\n }\n done() {\n this.view.root.removeEventListener(\"mouseup\", this.up);\n this.view.root.removeEventListener(\"mousemove\", this.move);\n if (this.mightDrag && this.target) {\n this.view.domObserver.stop();\n if (this.mightDrag.addAttr) this.target.removeAttribute(\"draggable\");\n if (this.mightDrag.setUneditable) this.target.removeAttribute(\"contentEditable\");\n this.view.domObserver.start();\n }\n if (this.delayedSelectionSync) setTimeout(() => selectionToDOM(this.view));\n this.view.input.mouseDown = null;\n }\n up(event) {\n this.done();\n if (!this.view.dom.contains(event.target)) return;\n let pos = this.pos;\n if (this.view.state.doc != this.startDoc) pos = this.view.posAtCoords(eventCoords(event));\n this.updateAllowDefault(event);\n if (this.allowDefault || !pos) {\n setSelectionOrigin(this.view, \"pointer\");\n } else if (handleSingleClick(this.view, pos.pos, pos.inside, event, this.selectNode)) {\n event.preventDefault();\n } else if (event.button == 0 && (this.flushed ||\n // Safari ignores clicks on draggable elements\n safari && this.mightDrag && !this.mightDrag.node.isAtom ||\n // Chrome will sometimes treat a node selection as a\n // cursor, but still report that the node is selected\n // when asked through getSelection. You'll then get a\n // situation where clicking at the point where that\n // (hidden) cursor is doesn't change the selection, and\n // thus doesn't get a reaction from ProseMirror. This\n // works around that.\n chrome && !this.view.state.selection.visible && Math.min(Math.abs(pos.pos - this.view.state.selection.from), Math.abs(pos.pos - this.view.state.selection.to)) <= 2)) {\n updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos)), \"pointer\");\n event.preventDefault();\n } else {\n setSelectionOrigin(this.view, \"pointer\");\n }\n }\n move(event) {\n this.updateAllowDefault(event);\n setSelectionOrigin(this.view, \"pointer\");\n if (event.buttons == 0) this.done();\n }\n updateAllowDefault(event) {\n if (!this.allowDefault && (Math.abs(this.event.x - event.clientX) > 4 || Math.abs(this.event.y - event.clientY) > 4)) this.allowDefault = true;\n }\n}\nhandlers.touchstart = view => {\n view.input.lastTouch = Date.now();\n forceDOMFlush(view);\n setSelectionOrigin(view, \"pointer\");\n};\nhandlers.touchmove = view => {\n view.input.lastTouch = Date.now();\n setSelectionOrigin(view, \"pointer\");\n};\nhandlers.contextmenu = view => forceDOMFlush(view);\nfunction inOrNearComposition(view, event) {\n if (view.composing) return true;\n // See https://www.stum.de/2016/06/24/handling-ime-events-in-javascript/.\n // On Japanese input method editors (IMEs), the Enter key is used to confirm character\n // selection. On Safari, when Enter is pressed, compositionend and keydown events are\n // emitted. The keydown event triggers newline insertion, which we don't want.\n // This method returns true if the keydown event should be ignored.\n // We only ignore it once, as pressing Enter a second time *should* insert a newline.\n // Furthermore, the keydown event timestamp must be close to the compositionEndedAt timestamp.\n // This guards against the case where compositionend is triggered without the keyboard\n // (e.g. character confirmation may be done with the mouse), and keydown is triggered\n // afterwards- we wouldn't want to ignore the keydown event in this case.\n if (safari && Math.abs(event.timeStamp - view.input.compositionEndedAt) < 500) {\n view.input.compositionEndedAt = -2e8;\n return true;\n }\n return false;\n}\n// Drop active composition after 5 seconds of inactivity on Android\nconst timeoutComposition = android ? 5000 : -1;\neditHandlers.compositionstart = editHandlers.compositionupdate = view => {\n if (!view.composing) {\n view.domObserver.flush();\n let {\n state\n } = view,\n $pos = state.selection.$from;\n if (state.selection.empty && (state.storedMarks || !$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(m => m.type.spec.inclusive === false))) {\n // Need to wrap the cursor in mark nodes different from the ones in the DOM context\n view.markCursor = view.state.storedMarks || $pos.marks();\n endComposition(view, true);\n view.markCursor = null;\n } else {\n endComposition(view);\n // In firefox, if the cursor is after but outside a marked node,\n // the inserted text won't inherit the marks. So this moves it\n // inside if necessary.\n if (gecko && state.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {\n let sel = view.domSelectionRange();\n for (let node = sel.focusNode, offset = sel.focusOffset; node && node.nodeType == 1 && offset != 0;) {\n let before = offset < 0 ? node.lastChild : node.childNodes[offset - 1];\n if (!before) break;\n if (before.nodeType == 3) {\n view.domSelection().collapse(before, before.nodeValue.length);\n break;\n } else {\n node = before;\n offset = -1;\n }\n }\n }\n }\n view.input.composing = true;\n }\n scheduleComposeEnd(view, timeoutComposition);\n};\neditHandlers.compositionend = (view, event) => {\n if (view.composing) {\n view.input.composing = false;\n view.input.compositionEndedAt = event.timeStamp;\n scheduleComposeEnd(view, 20);\n }\n};\nfunction scheduleComposeEnd(view, delay) {\n clearTimeout(view.input.composingTimeout);\n if (delay > -1) view.input.composingTimeout = setTimeout(() => endComposition(view), delay);\n}\nfunction clearComposition(view) {\n if (view.composing) {\n view.input.composing = false;\n view.input.compositionEndedAt = timestampFromCustomEvent();\n }\n while (view.input.compositionNodes.length > 0) view.input.compositionNodes.pop().markParentsDirty();\n}\nfunction timestampFromCustomEvent() {\n let event = document.createEvent(\"Event\");\n event.initEvent(\"event\", true, true);\n return event.timeStamp;\n}\n/**\n@internal\n*/\nfunction endComposition(view) {\n let forceUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (android && view.domObserver.flushingSoon >= 0) return;\n view.domObserver.forceFlush();\n clearComposition(view);\n if (forceUpdate || view.docView && view.docView.dirty) {\n let sel = selectionFromDOM(view);\n if (sel && !sel.eq(view.state.selection)) view.dispatch(view.state.tr.setSelection(sel));else view.updateState(view.state);\n return true;\n }\n return false;\n}\nfunction captureCopy(view, dom) {\n // The extra wrapper is somehow necessary on IE/Edge to prevent the\n // content from being mangled when it is put onto the clipboard\n if (!view.dom.parentNode) return;\n let wrap = view.dom.parentNode.appendChild(document.createElement(\"div\"));\n wrap.appendChild(dom);\n wrap.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n let sel = getSelection(),\n range = document.createRange();\n range.selectNodeContents(dom);\n // Done because IE will fire a selectionchange moving the selection\n // to its start when removeAllRanges is called and the editor still\n // has focus (which will mess up the editor's selection state).\n view.dom.blur();\n sel.removeAllRanges();\n sel.addRange(range);\n setTimeout(() => {\n if (wrap.parentNode) wrap.parentNode.removeChild(wrap);\n view.focus();\n }, 50);\n}\n// This is very crude, but unfortunately both these browsers _pretend_\n// that they have a clipboard API—all the objects and methods are\n// there, they just don't work, and they are hard to test.\nconst brokenClipboardAPI = ie && ie_version < 15 || ios && webkit_version < 604;\nhandlers.copy = editHandlers.cut = (view, _event) => {\n let event = _event;\n let sel = view.state.selection,\n cut = event.type == \"cut\";\n if (sel.empty) return;\n // IE and Edge's clipboard interface is completely broken\n let data = brokenClipboardAPI ? null : event.clipboardData;\n let slice = sel.content(),\n {\n dom,\n text\n } = serializeForClipboard(view, slice);\n if (data) {\n event.preventDefault();\n data.clearData();\n data.setData(\"text/html\", dom.innerHTML);\n data.setData(\"text/plain\", text);\n } else {\n captureCopy(view, dom);\n }\n if (cut) view.dispatch(view.state.tr.deleteSelection().scrollIntoView().setMeta(\"uiEvent\", \"cut\"));\n};\nfunction sliceSingleNode(slice) {\n return slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1 ? slice.content.firstChild : null;\n}\nfunction capturePaste(view, event) {\n if (!view.dom.parentNode) return;\n let plainText = view.input.shiftKey || view.state.selection.$from.parent.type.spec.code;\n let target = view.dom.parentNode.appendChild(document.createElement(plainText ? \"textarea\" : \"div\"));\n if (!plainText) target.contentEditable = \"true\";\n target.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n target.focus();\n setTimeout(() => {\n view.focus();\n if (target.parentNode) target.parentNode.removeChild(target);\n if (plainText) doPaste(view, target.value, null, event);else doPaste(view, target.textContent, target.innerHTML, event);\n }, 50);\n}\nfunction doPaste(view, text, html, event) {\n let slice = parseFromClipboard(view, text, html, view.input.shiftKey, view.state.selection.$from);\n if (view.someProp(\"handlePaste\", f => f(view, event, slice || Slice.empty))) return true;\n if (!slice) return false;\n let singleNode = sliceSingleNode(slice);\n let tr = singleNode ? view.state.tr.replaceSelectionWith(singleNode, view.input.shiftKey) : view.state.tr.replaceSelection(slice);\n view.dispatch(tr.scrollIntoView().setMeta(\"paste\", true).setMeta(\"uiEvent\", \"paste\"));\n return true;\n}\neditHandlers.paste = (view, _event) => {\n let event = _event;\n // Handling paste from JavaScript during composition is very poorly\n // handled by browsers, so as a dodgy but preferable kludge, we just\n // let the browser do its native thing there, except on Android,\n // where the editor is almost always composing.\n if (view.composing && !android) return;\n let data = brokenClipboardAPI ? null : event.clipboardData;\n if (data && doPaste(view, data.getData(\"text/plain\"), data.getData(\"text/html\"), event)) event.preventDefault();else capturePaste(view, event);\n};\nclass Dragging {\n constructor(slice, move) {\n this.slice = slice;\n this.move = move;\n }\n}\nconst dragCopyModifier = mac ? \"altKey\" : \"ctrlKey\";\nhandlers.dragstart = (view, _event) => {\n let event = _event;\n let mouseDown = view.input.mouseDown;\n if (mouseDown) mouseDown.done();\n if (!event.dataTransfer) return;\n let sel = view.state.selection;\n let pos = sel.empty ? null : view.posAtCoords(eventCoords(event));\n if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1 : sel.to)) ;else if (mouseDown && mouseDown.mightDrag) {\n view.dispatch(view.state.tr.setSelection(NodeSelection.create(view.state.doc, mouseDown.mightDrag.pos)));\n } else if (event.target && event.target.nodeType == 1) {\n let desc = view.docView.nearestDesc(event.target, true);\n if (desc && desc.node.type.spec.draggable && desc != view.docView) view.dispatch(view.state.tr.setSelection(NodeSelection.create(view.state.doc, desc.posBefore)));\n }\n let slice = view.state.selection.content(),\n {\n dom,\n text\n } = serializeForClipboard(view, slice);\n event.dataTransfer.clearData();\n event.dataTransfer.setData(brokenClipboardAPI ? \"Text\" : \"text/html\", dom.innerHTML);\n // See https://github.com/ProseMirror/prosemirror/issues/1156\n event.dataTransfer.effectAllowed = \"copyMove\";\n if (!brokenClipboardAPI) event.dataTransfer.setData(\"text/plain\", text);\n view.dragging = new Dragging(slice, !event[dragCopyModifier]);\n};\nhandlers.dragend = view => {\n let dragging = view.dragging;\n window.setTimeout(() => {\n if (view.dragging == dragging) view.dragging = null;\n }, 50);\n};\neditHandlers.dragover = editHandlers.dragenter = (_, e) => e.preventDefault();\neditHandlers.drop = (view, _event) => {\n let event = _event;\n let dragging = view.dragging;\n view.dragging = null;\n if (!event.dataTransfer) return;\n let eventPos = view.posAtCoords(eventCoords(event));\n if (!eventPos) return;\n let $mouse = view.state.doc.resolve(eventPos.pos);\n let slice = dragging && dragging.slice;\n if (slice) {\n view.someProp(\"transformPasted\", f => {\n slice = f(slice);\n });\n } else {\n slice = parseFromClipboard(view, event.dataTransfer.getData(brokenClipboardAPI ? \"Text\" : \"text/plain\"), brokenClipboardAPI ? null : event.dataTransfer.getData(\"text/html\"), false, $mouse);\n }\n let move = !!(dragging && !event[dragCopyModifier]);\n if (view.someProp(\"handleDrop\", f => f(view, event, slice || Slice.empty, move))) {\n event.preventDefault();\n return;\n }\n if (!slice) return;\n event.preventDefault();\n let insertPos = slice ? dropPoint(view.state.doc, $mouse.pos, slice) : $mouse.pos;\n if (insertPos == null) insertPos = $mouse.pos;\n let tr = view.state.tr;\n if (move) tr.deleteSelection();\n let pos = tr.mapping.map(insertPos);\n let isNode = slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1;\n let beforeInsert = tr.doc;\n if (isNode) tr.replaceRangeWith(pos, pos, slice.content.firstChild);else tr.replaceRange(pos, pos, slice);\n if (tr.doc.eq(beforeInsert)) return;\n let $pos = tr.doc.resolve(pos);\n if (isNode && NodeSelection.isSelectable(slice.content.firstChild) && $pos.nodeAfter && $pos.nodeAfter.sameMarkup(slice.content.firstChild)) {\n tr.setSelection(new NodeSelection($pos));\n } else {\n let end = tr.mapping.map(insertPos);\n tr.mapping.maps[tr.mapping.maps.length - 1].forEach((_from, _to, _newFrom, newTo) => end = newTo);\n tr.setSelection(selectionBetween(view, $pos, tr.doc.resolve(end)));\n }\n view.focus();\n view.dispatch(tr.setMeta(\"uiEvent\", \"drop\"));\n};\nhandlers.focus = view => {\n view.input.lastFocus = Date.now();\n if (!view.focused) {\n view.domObserver.stop();\n view.dom.classList.add(\"ProseMirror-focused\");\n view.domObserver.start();\n view.focused = true;\n setTimeout(() => {\n if (view.docView && view.hasFocus() && !view.domObserver.currentSelection.eq(view.domSelectionRange())) selectionToDOM(view);\n }, 20);\n }\n};\nhandlers.blur = (view, _event) => {\n let event = _event;\n if (view.focused) {\n view.domObserver.stop();\n view.dom.classList.remove(\"ProseMirror-focused\");\n view.domObserver.start();\n if (event.relatedTarget && view.dom.contains(event.relatedTarget)) view.domObserver.currentSelection.clear();\n view.focused = false;\n }\n};\nhandlers.beforeinput = (view, _event) => {\n let event = _event;\n // We should probably do more with beforeinput events, but support\n // is so spotty that I'm still waiting to see where they are going.\n // Very specific hack to deal with backspace sometimes failing on\n // Chrome Android when after an uneditable node.\n if (chrome && android && event.inputType == \"deleteContentBackward\") {\n view.domObserver.flushSoon();\n let {\n domChangeCount\n } = view.input;\n setTimeout(() => {\n if (view.input.domChangeCount != domChangeCount) return; // Event already had some effect\n // This bug tends to close the virtual keyboard, so we refocus\n view.dom.blur();\n view.focus();\n if (view.someProp(\"handleKeyDown\", f => f(view, keyEvent(8, \"Backspace\")))) return;\n let {\n $cursor\n } = view.state.selection;\n // Crude approximation of backspace behavior when no command handled it\n if ($cursor && $cursor.pos > 0) view.dispatch(view.state.tr.delete($cursor.pos - 1, $cursor.pos).scrollIntoView());\n }, 50);\n }\n};\n// Make sure all handlers get registered\nfor (let prop in editHandlers) handlers[prop] = editHandlers[prop];\nfunction compareObjs(a, b) {\n if (a == b) return true;\n for (let p in a) if (a[p] !== b[p]) return false;\n for (let p in b) if (!(p in a)) return false;\n return true;\n}\nclass WidgetType {\n constructor(toDOM, spec) {\n this.toDOM = toDOM;\n this.spec = spec || noSpec;\n this.side = this.spec.side || 0;\n }\n map(mapping, span, offset, oldOffset) {\n let {\n pos,\n deleted\n } = mapping.mapResult(span.from + oldOffset, this.side < 0 ? -1 : 1);\n return deleted ? null : new Decoration(pos - offset, pos - offset, this);\n }\n valid() {\n return true;\n }\n eq(other) {\n return this == other || other instanceof WidgetType && (this.spec.key && this.spec.key == other.spec.key || this.toDOM == other.toDOM && compareObjs(this.spec, other.spec));\n }\n destroy(node) {\n if (this.spec.destroy) this.spec.destroy(node);\n }\n}\nclass InlineType {\n constructor(attrs, spec) {\n this.attrs = attrs;\n this.spec = spec || noSpec;\n }\n map(mapping, span, offset, oldOffset) {\n let from = mapping.map(span.from + oldOffset, this.spec.inclusiveStart ? -1 : 1) - offset;\n let to = mapping.map(span.to + oldOffset, this.spec.inclusiveEnd ? 1 : -1) - offset;\n return from >= to ? null : new Decoration(from, to, this);\n }\n valid(_, span) {\n return span.from < span.to;\n }\n eq(other) {\n return this == other || other instanceof InlineType && compareObjs(this.attrs, other.attrs) && compareObjs(this.spec, other.spec);\n }\n static is(span) {\n return span.type instanceof InlineType;\n }\n destroy() {}\n}\nclass NodeType {\n constructor(attrs, spec) {\n this.attrs = attrs;\n this.spec = spec || noSpec;\n }\n map(mapping, span, offset, oldOffset) {\n let from = mapping.mapResult(span.from + oldOffset, 1);\n if (from.deleted) return null;\n let to = mapping.mapResult(span.to + oldOffset, -1);\n if (to.deleted || to.pos <= from.pos) return null;\n return new Decoration(from.pos - offset, to.pos - offset, this);\n }\n valid(node, span) {\n let {\n index,\n offset\n } = node.content.findIndex(span.from),\n child;\n return offset == span.from && !(child = node.child(index)).isText && offset + child.nodeSize == span.to;\n }\n eq(other) {\n return this == other || other instanceof NodeType && compareObjs(this.attrs, other.attrs) && compareObjs(this.spec, other.spec);\n }\n destroy() {}\n}\n/**\nDecoration objects can be provided to the view through the\n[`decorations` prop](https://prosemirror.net/docs/ref/#view.EditorProps.decorations). They come in\nseveral variants—see the static members of this class for details.\n*/\nclass Decoration {\n /**\n @internal\n */\n constructor(\n /**\n The start position of the decoration.\n */\n from,\n /**\n The end position. Will be the same as `from` for [widget\n decorations](https://prosemirror.net/docs/ref/#view.Decoration^widget).\n */\n to,\n /**\n @internal\n */\n type) {\n this.from = from;\n this.to = to;\n this.type = type;\n }\n /**\n @internal\n */\n copy(from, to) {\n return new Decoration(from, to, this.type);\n }\n /**\n @internal\n */\n eq(other) {\n let offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return this.type.eq(other.type) && this.from + offset == other.from && this.to + offset == other.to;\n }\n /**\n @internal\n */\n map(mapping, offset, oldOffset) {\n return this.type.map(mapping, this, offset, oldOffset);\n }\n /**\n Creates a widget decoration, which is a DOM node that's shown in\n the document at the given position. It is recommended that you\n delay rendering the widget by passing a function that will be\n called when the widget is actually drawn in a view, but you can\n also directly pass a DOM node. `getPos` can be used to find the\n widget's current document position.\n */\n static widget(pos, toDOM, spec) {\n return new Decoration(pos, pos, new WidgetType(toDOM, spec));\n }\n /**\n Creates an inline decoration, which adds the given attributes to\n each inline node between `from` and `to`.\n */\n static inline(from, to, attrs, spec) {\n return new Decoration(from, to, new InlineType(attrs, spec));\n }\n /**\n Creates a node decoration. `from` and `to` should point precisely\n before and after a node in the document. That node, and only that\n node, will receive the given attributes.\n */\n static node(from, to, attrs, spec) {\n return new Decoration(from, to, new NodeType(attrs, spec));\n }\n /**\n The spec provided when creating this decoration. Can be useful\n if you've stored extra information in that object.\n */\n get spec() {\n return this.type.spec;\n }\n /**\n @internal\n */\n get inline() {\n return this.type instanceof InlineType;\n }\n}\nconst none = [],\n noSpec = {};\n/**\nA collection of [decorations](https://prosemirror.net/docs/ref/#view.Decoration), organized in such\na way that the drawing algorithm can efficiently use and compare\nthem. This is a persistent data structure—it is not modified,\nupdates create a new value.\n*/\nclass DecorationSet {\n /**\n @internal\n */\n constructor(local, children) {\n this.local = local.length ? local : none;\n this.children = children.length ? children : none;\n }\n /**\n Create a set of decorations, using the structure of the given\n document.\n */\n static create(doc, decorations) {\n return decorations.length ? buildTree(decorations, doc, 0, noSpec) : empty;\n }\n /**\n Find all decorations in this set which touch the given range\n (including decorations that start or end directly at the\n boundaries) and match the given predicate on their spec. When\n `start` and `end` are omitted, all decorations in the set are\n considered. When `predicate` isn't given, all decorations are\n assumed to match.\n */\n find(start, end, predicate) {\n let result = [];\n this.findInner(start == null ? 0 : start, end == null ? 1e9 : end, result, 0, predicate);\n return result;\n }\n findInner(start, end, result, offset, predicate) {\n for (let i = 0; i < this.local.length; i++) {\n let span = this.local[i];\n if (span.from <= end && span.to >= start && (!predicate || predicate(span.spec))) result.push(span.copy(span.from + offset, span.to + offset));\n }\n for (let i = 0; i < this.children.length; i += 3) {\n if (this.children[i] < end && this.children[i + 1] > start) {\n let childOff = this.children[i] + 1;\n this.children[i + 2].findInner(start - childOff, end - childOff, result, offset + childOff, predicate);\n }\n }\n }\n /**\n Map the set of decorations in response to a change in the\n document.\n */\n map(mapping, doc, options) {\n if (this == empty || mapping.maps.length == 0) return this;\n return this.mapInner(mapping, doc, 0, 0, options || noSpec);\n }\n /**\n @internal\n */\n mapInner(mapping, node, offset, oldOffset, options) {\n let newLocal;\n for (let i = 0; i < this.local.length; i++) {\n let mapped = this.local[i].map(mapping, offset, oldOffset);\n if (mapped && mapped.type.valid(node, mapped)) (newLocal || (newLocal = [])).push(mapped);else if (options.onRemove) options.onRemove(this.local[i].spec);\n }\n if (this.children.length) return mapChildren(this.children, newLocal || [], mapping, node, offset, oldOffset, options);else return newLocal ? new DecorationSet(newLocal.sort(byPos), none) : empty;\n }\n /**\n Add the given array of decorations to the ones in the set,\n producing a new set. Needs access to the current document to\n create the appropriate tree structure.\n */\n add(doc, decorations) {\n if (!decorations.length) return this;\n if (this == empty) return DecorationSet.create(doc, decorations);\n return this.addInner(doc, decorations, 0);\n }\n addInner(doc, decorations, offset) {\n let children,\n childIndex = 0;\n doc.forEach((childNode, childOffset) => {\n let baseOffset = childOffset + offset,\n found;\n if (!(found = takeSpansForNode(decorations, childNode, baseOffset))) return;\n if (!children) children = this.children.slice();\n while (childIndex < children.length && children[childIndex] < childOffset) childIndex += 3;\n if (children[childIndex] == childOffset) children[childIndex + 2] = children[childIndex + 2].addInner(childNode, found, baseOffset + 1);else children.splice(childIndex, 0, childOffset, childOffset + childNode.nodeSize, buildTree(found, childNode, baseOffset + 1, noSpec));\n childIndex += 3;\n });\n let local = moveSpans(childIndex ? withoutNulls(decorations) : decorations, -offset);\n for (let i = 0; i < local.length; i++) if (!local[i].type.valid(doc, local[i])) local.splice(i--, 1);\n return new DecorationSet(local.length ? this.local.concat(local).sort(byPos) : this.local, children || this.children);\n }\n /**\n Create a new set that contains the decorations in this set, minus\n the ones in the given array.\n */\n remove(decorations) {\n if (decorations.length == 0 || this == empty) return this;\n return this.removeInner(decorations, 0);\n }\n removeInner(decorations, offset) {\n let children = this.children,\n local = this.local;\n for (let i = 0; i < children.length; i += 3) {\n let found;\n let from = children[i] + offset,\n to = children[i + 1] + offset;\n for (let j = 0, span; j < decorations.length; j++) if (span = decorations[j]) {\n if (span.from > from && span.to < to) {\n decorations[j] = null;\n (found || (found = [])).push(span);\n }\n }\n if (!found) continue;\n if (children == this.children) children = this.children.slice();\n let removed = children[i + 2].removeInner(found, from + 1);\n if (removed != empty) {\n children[i + 2] = removed;\n } else {\n children.splice(i, 3);\n i -= 3;\n }\n }\n if (local.length) for (let i = 0, span; i < decorations.length; i++) if (span = decorations[i]) {\n for (let j = 0; j < local.length; j++) if (local[j].eq(span, offset)) {\n if (local == this.local) local = this.local.slice();\n local.splice(j--, 1);\n }\n }\n if (children == this.children && local == this.local) return this;\n return local.length || children.length ? new DecorationSet(local, children) : empty;\n }\n /**\n @internal\n */\n forChild(offset, node) {\n if (this == empty) return this;\n if (node.isLeaf) return DecorationSet.empty;\n let child, local;\n for (let i = 0; i < this.children.length; i += 3) if (this.children[i] >= offset) {\n if (this.children[i] == offset) child = this.children[i + 2];\n break;\n }\n let start = offset + 1,\n end = start + node.content.size;\n for (let i = 0; i < this.local.length; i++) {\n let dec = this.local[i];\n if (dec.from < end && dec.to > start && dec.type instanceof InlineType) {\n let from = Math.max(start, dec.from) - start,\n to = Math.min(end, dec.to) - start;\n if (from < to) (local || (local = [])).push(dec.copy(from, to));\n }\n }\n if (local) {\n let localSet = new DecorationSet(local.sort(byPos), none);\n return child ? new DecorationGroup([localSet, child]) : localSet;\n }\n return child || empty;\n }\n /**\n @internal\n */\n eq(other) {\n if (this == other) return true;\n if (!(other instanceof DecorationSet) || this.local.length != other.local.length || this.children.length != other.children.length) return false;\n for (let i = 0; i < this.local.length; i++) if (!this.local[i].eq(other.local[i])) return false;\n for (let i = 0; i < this.children.length; i += 3) if (this.children[i] != other.children[i] || this.children[i + 1] != other.children[i + 1] || !this.children[i + 2].eq(other.children[i + 2])) return false;\n return true;\n }\n /**\n @internal\n */\n locals(node) {\n return removeOverlap(this.localsInner(node));\n }\n /**\n @internal\n */\n localsInner(node) {\n if (this == empty) return none;\n if (node.inlineContent || !this.local.some(InlineType.is)) return this.local;\n let result = [];\n for (let i = 0; i < this.local.length; i++) {\n if (!(this.local[i].type instanceof InlineType)) result.push(this.local[i]);\n }\n return result;\n }\n}\n/**\nThe empty set of decorations.\n*/\nDecorationSet.empty = new DecorationSet([], []);\n/**\n@internal\n*/\nDecorationSet.removeOverlap = removeOverlap;\nconst empty = DecorationSet.empty;\n// An abstraction that allows the code dealing with decorations to\n// treat multiple DecorationSet objects as if it were a single object\n// with (a subset of) the same interface.\nclass DecorationGroup {\n constructor(members) {\n this.members = members;\n }\n map(mapping, doc) {\n const mappedDecos = this.members.map(member => member.map(mapping, doc, noSpec));\n return DecorationGroup.from(mappedDecos);\n }\n forChild(offset, child) {\n if (child.isLeaf) return DecorationSet.empty;\n let found = [];\n for (let i = 0; i < this.members.length; i++) {\n let result = this.members[i].forChild(offset, child);\n if (result == empty) continue;\n if (result instanceof DecorationGroup) found = found.concat(result.members);else found.push(result);\n }\n return DecorationGroup.from(found);\n }\n eq(other) {\n if (!(other instanceof DecorationGroup) || other.members.length != this.members.length) return false;\n for (let i = 0; i < this.members.length; i++) if (!this.members[i].eq(other.members[i])) return false;\n return true;\n }\n locals(node) {\n let result,\n sorted = true;\n for (let i = 0; i < this.members.length; i++) {\n let locals = this.members[i].localsInner(node);\n if (!locals.length) continue;\n if (!result) {\n result = locals;\n } else {\n if (sorted) {\n result = result.slice();\n sorted = false;\n }\n for (let j = 0; j < locals.length; j++) result.push(locals[j]);\n }\n }\n return result ? removeOverlap(sorted ? result : result.sort(byPos)) : none;\n }\n // Create a group for the given array of decoration sets, or return\n // a single set when possible.\n static from(members) {\n switch (members.length) {\n case 0:\n return empty;\n case 1:\n return members[0];\n default:\n return new DecorationGroup(members);\n }\n }\n}\nfunction mapChildren(oldChildren, newLocal, mapping, node, offset, oldOffset, options) {\n let children = oldChildren.slice();\n // Mark the children that are directly touched by changes, and\n // move those that are after the changes.\n for (let i = 0, baseOffset = oldOffset; i < mapping.maps.length; i++) {\n let moved = 0;\n mapping.maps[i].forEach((oldStart, oldEnd, newStart, newEnd) => {\n let dSize = newEnd - newStart - (oldEnd - oldStart);\n for (let i = 0; i < children.length; i += 3) {\n let end = children[i + 1];\n if (end < 0 || oldStart > end + baseOffset - moved) continue;\n let start = children[i] + baseOffset - moved;\n if (oldEnd >= start) {\n children[i + 1] = oldStart <= start ? -2 : -1;\n } else if (newStart >= offset && dSize) {\n children[i] += dSize;\n children[i + 1] += dSize;\n }\n }\n moved += dSize;\n });\n baseOffset = mapping.maps[i].map(baseOffset, -1);\n }\n // Find the child nodes that still correspond to a single node,\n // recursively call mapInner on them and update their positions.\n let mustRebuild = false;\n for (let i = 0; i < children.length; i += 3) if (children[i + 1] < 0) {\n // Touched nodes\n if (children[i + 1] == -2) {\n mustRebuild = true;\n children[i + 1] = -1;\n continue;\n }\n let from = mapping.map(oldChildren[i] + oldOffset),\n fromLocal = from - offset;\n if (fromLocal < 0 || fromLocal >= node.content.size) {\n mustRebuild = true;\n continue;\n }\n // Must read oldChildren because children was tagged with -1\n let to = mapping.map(oldChildren[i + 1] + oldOffset, -1),\n toLocal = to - offset;\n let {\n index,\n offset: childOffset\n } = node.content.findIndex(fromLocal);\n let childNode = node.maybeChild(index);\n if (childNode && childOffset == fromLocal && childOffset + childNode.nodeSize == toLocal) {\n let mapped = children[i + 2].mapInner(mapping, childNode, from + 1, oldChildren[i] + oldOffset + 1, options);\n if (mapped != empty) {\n children[i] = fromLocal;\n children[i + 1] = toLocal;\n children[i + 2] = mapped;\n } else {\n children[i + 1] = -2;\n mustRebuild = true;\n }\n } else {\n mustRebuild = true;\n }\n }\n // Remaining children must be collected and rebuilt into the appropriate structure\n if (mustRebuild) {\n let decorations = mapAndGatherRemainingDecorations(children, oldChildren, newLocal, mapping, offset, oldOffset, options);\n let built = buildTree(decorations, node, 0, options);\n newLocal = built.local;\n for (let i = 0; i < children.length; i += 3) if (children[i + 1] < 0) {\n children.splice(i, 3);\n i -= 3;\n }\n for (let i = 0, j = 0; i < built.children.length; i += 3) {\n let from = built.children[i];\n while (j < children.length && children[j] < from) j += 3;\n children.splice(j, 0, built.children[i], built.children[i + 1], built.children[i + 2]);\n }\n }\n return new DecorationSet(newLocal.sort(byPos), children);\n}\nfunction moveSpans(spans, offset) {\n if (!offset || !spans.length) return spans;\n let result = [];\n for (let i = 0; i < spans.length; i++) {\n let span = spans[i];\n result.push(new Decoration(span.from + offset, span.to + offset, span.type));\n }\n return result;\n}\nfunction mapAndGatherRemainingDecorations(children, oldChildren, decorations, mapping, offset, oldOffset, options) {\n // Gather all decorations from the remaining marked children\n function gather(set, oldOffset) {\n for (let i = 0; i < set.local.length; i++) {\n let mapped = set.local[i].map(mapping, offset, oldOffset);\n if (mapped) decorations.push(mapped);else if (options.onRemove) options.onRemove(set.local[i].spec);\n }\n for (let i = 0; i < set.children.length; i += 3) gather(set.children[i + 2], set.children[i] + oldOffset + 1);\n }\n for (let i = 0; i < children.length; i += 3) if (children[i + 1] == -1) gather(children[i + 2], oldChildren[i] + oldOffset + 1);\n return decorations;\n}\nfunction takeSpansForNode(spans, node, offset) {\n if (node.isLeaf) return null;\n let end = offset + node.nodeSize,\n found = null;\n for (let i = 0, span; i < spans.length; i++) {\n if ((span = spans[i]) && span.from > offset && span.to < end) {\n (found || (found = [])).push(span);\n spans[i] = null;\n }\n }\n return found;\n}\nfunction withoutNulls(array) {\n let result = [];\n for (let i = 0; i < array.length; i++) if (array[i] != null) result.push(array[i]);\n return result;\n}\n// Build up a tree that corresponds to a set of decorations. `offset`\n// is a base offset that should be subtracted from the `from` and `to`\n// positions in the spans (so that we don't have to allocate new spans\n// for recursive calls).\nfunction buildTree(spans, node, offset, options) {\n let children = [],\n hasNulls = false;\n node.forEach((childNode, localStart) => {\n let found = takeSpansForNode(spans, childNode, localStart + offset);\n if (found) {\n hasNulls = true;\n let subtree = buildTree(found, childNode, offset + localStart + 1, options);\n if (subtree != empty) children.push(localStart, localStart + childNode.nodeSize, subtree);\n }\n });\n let locals = moveSpans(hasNulls ? withoutNulls(spans) : spans, -offset).sort(byPos);\n for (let i = 0; i < locals.length; i++) if (!locals[i].type.valid(node, locals[i])) {\n if (options.onRemove) options.onRemove(locals[i].spec);\n locals.splice(i--, 1);\n }\n return locals.length || children.length ? new DecorationSet(locals, children) : empty;\n}\n// Used to sort decorations so that ones with a low start position\n// come first, and within a set with the same start position, those\n// with an smaller end position come first.\nfunction byPos(a, b) {\n return a.from - b.from || a.to - b.to;\n}\n// Scan a sorted array of decorations for partially overlapping spans,\n// and split those so that only fully overlapping spans are left (to\n// make subsequent rendering easier). Will return the input array if\n// no partially overlapping spans are found (the common case).\nfunction removeOverlap(spans) {\n let working = spans;\n for (let i = 0; i < working.length - 1; i++) {\n let span = working[i];\n if (span.from != span.to) for (let j = i + 1; j < working.length; j++) {\n let next = working[j];\n if (next.from == span.from) {\n if (next.to != span.to) {\n if (working == spans) working = spans.slice();\n // Followed by a partially overlapping larger span. Split that\n // span.\n working[j] = next.copy(next.from, span.to);\n insertAhead(working, j + 1, next.copy(span.to, next.to));\n }\n continue;\n } else {\n if (next.from < span.to) {\n if (working == spans) working = spans.slice();\n // The end of this one overlaps with a subsequent span. Split\n // this one.\n working[i] = span.copy(span.from, next.from);\n insertAhead(working, j, span.copy(next.from, span.to));\n }\n break;\n }\n }\n }\n return working;\n}\nfunction insertAhead(array, i, deco) {\n while (i < array.length && byPos(deco, array[i]) > 0) i++;\n array.splice(i, 0, deco);\n}\n// Get the decorations associated with the current props of a view.\nfunction viewDecorations(view) {\n let found = [];\n view.someProp(\"decorations\", f => {\n let result = f(view.state);\n if (result && result != empty) found.push(result);\n });\n if (view.cursorWrapper) found.push(DecorationSet.create(view.state.doc, [view.cursorWrapper.deco]));\n return DecorationGroup.from(found);\n}\nconst observeOptions = {\n childList: true,\n characterData: true,\n characterDataOldValue: true,\n attributes: true,\n attributeOldValue: true,\n subtree: true\n};\n// IE11 has very broken mutation observers, so we also listen to DOMCharacterDataModified\nconst useCharData = ie && ie_version <= 11;\nclass SelectionState {\n constructor() {\n this.anchorNode = null;\n this.anchorOffset = 0;\n this.focusNode = null;\n this.focusOffset = 0;\n }\n set(sel) {\n this.anchorNode = sel.anchorNode;\n this.anchorOffset = sel.anchorOffset;\n this.focusNode = sel.focusNode;\n this.focusOffset = sel.focusOffset;\n }\n clear() {\n this.anchorNode = this.focusNode = null;\n }\n eq(sel) {\n return sel.anchorNode == this.anchorNode && sel.anchorOffset == this.anchorOffset && sel.focusNode == this.focusNode && sel.focusOffset == this.focusOffset;\n }\n}\nclass DOMObserver {\n constructor(view, handleDOMChange) {\n this.view = view;\n this.handleDOMChange = handleDOMChange;\n this.queue = [];\n this.flushingSoon = -1;\n this.observer = null;\n this.currentSelection = new SelectionState();\n this.onCharData = null;\n this.suppressingSelectionUpdates = false;\n this.observer = window.MutationObserver && new window.MutationObserver(mutations => {\n for (let i = 0; i < mutations.length; i++) this.queue.push(mutations[i]);\n // IE11 will sometimes (on backspacing out a single character\n // text node after a BR node) call the observer callback\n // before actually updating the DOM, which will cause\n // ProseMirror to miss the change (see #930)\n if (ie && ie_version <= 11 && mutations.some(m => m.type == \"childList\" && m.removedNodes.length || m.type == \"characterData\" && m.oldValue.length > m.target.nodeValue.length)) this.flushSoon();else this.flush();\n });\n if (useCharData) {\n this.onCharData = e => {\n this.queue.push({\n target: e.target,\n type: \"characterData\",\n oldValue: e.prevValue\n });\n this.flushSoon();\n };\n }\n this.onSelectionChange = this.onSelectionChange.bind(this);\n }\n flushSoon() {\n if (this.flushingSoon < 0) this.flushingSoon = window.setTimeout(() => {\n this.flushingSoon = -1;\n this.flush();\n }, 20);\n }\n forceFlush() {\n if (this.flushingSoon > -1) {\n window.clearTimeout(this.flushingSoon);\n this.flushingSoon = -1;\n this.flush();\n }\n }\n start() {\n if (this.observer) {\n this.observer.takeRecords();\n this.observer.observe(this.view.dom, observeOptions);\n }\n if (this.onCharData) this.view.dom.addEventListener(\"DOMCharacterDataModified\", this.onCharData);\n this.connectSelection();\n }\n stop() {\n if (this.observer) {\n let take = this.observer.takeRecords();\n if (take.length) {\n for (let i = 0; i < take.length; i++) this.queue.push(take[i]);\n window.setTimeout(() => this.flush(), 20);\n }\n this.observer.disconnect();\n }\n if (this.onCharData) this.view.dom.removeEventListener(\"DOMCharacterDataModified\", this.onCharData);\n this.disconnectSelection();\n }\n connectSelection() {\n this.view.dom.ownerDocument.addEventListener(\"selectionchange\", this.onSelectionChange);\n }\n disconnectSelection() {\n this.view.dom.ownerDocument.removeEventListener(\"selectionchange\", this.onSelectionChange);\n }\n suppressSelectionUpdates() {\n this.suppressingSelectionUpdates = true;\n setTimeout(() => this.suppressingSelectionUpdates = false, 50);\n }\n onSelectionChange() {\n if (!hasFocusAndSelection(this.view)) return;\n if (this.suppressingSelectionUpdates) return selectionToDOM(this.view);\n // Deletions on IE11 fire their events in the wrong order, giving\n // us a selection change event before the DOM changes are\n // reported.\n if (ie && ie_version <= 11 && !this.view.state.selection.empty) {\n let sel = this.view.domSelectionRange();\n // Selection.isCollapsed isn't reliable on IE\n if (sel.focusNode && isEquivalentPosition(sel.focusNode, sel.focusOffset, sel.anchorNode, sel.anchorOffset)) return this.flushSoon();\n }\n this.flush();\n }\n setCurSelection() {\n this.currentSelection.set(this.view.domSelectionRange());\n }\n ignoreSelectionChange(sel) {\n if (!sel.focusNode) return true;\n let ancestors = new Set(),\n container;\n for (let scan = sel.focusNode; scan; scan = parentNode(scan)) ancestors.add(scan);\n for (let scan = sel.anchorNode; scan; scan = parentNode(scan)) if (ancestors.has(scan)) {\n container = scan;\n break;\n }\n let desc = container && this.view.docView.nearestDesc(container);\n if (desc && desc.ignoreMutation({\n type: \"selection\",\n target: container.nodeType == 3 ? container.parentNode : container\n })) {\n this.setCurSelection();\n return true;\n }\n }\n flush() {\n let {\n view\n } = this;\n if (!view.docView || this.flushingSoon > -1) return;\n let mutations = this.observer ? this.observer.takeRecords() : [];\n if (this.queue.length) {\n mutations = this.queue.concat(mutations);\n this.queue.length = 0;\n }\n let sel = view.domSelectionRange();\n let newSel = !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasFocusAndSelection(view) && !this.ignoreSelectionChange(sel);\n let from = -1,\n to = -1,\n typeOver = false,\n added = [];\n if (view.editable) {\n for (let i = 0; i < mutations.length; i++) {\n let result = this.registerMutation(mutations[i], added);\n if (result) {\n from = from < 0 ? result.from : Math.min(result.from, from);\n to = to < 0 ? result.to : Math.max(result.to, to);\n if (result.typeOver) typeOver = true;\n }\n }\n }\n if (gecko && added.length > 1) {\n let brs = added.filter(n => n.nodeName == \"BR\");\n if (brs.length == 2) {\n let a = brs[0],\n b = brs[1];\n if (a.parentNode && a.parentNode.parentNode == b.parentNode) b.remove();else a.remove();\n }\n }\n let readSel = null;\n // If it looks like the browser has reset the selection to the\n // start of the document after focus, restore the selection from\n // the state\n if (from < 0 && newSel && view.input.lastFocus > Date.now() - 200 && view.input.lastTouch < Date.now() - 300 && selectionCollapsed(sel) && (readSel = selectionFromDOM(view)) && readSel.eq(Selection.near(view.state.doc.resolve(0), 1))) {\n view.input.lastFocus = 0;\n selectionToDOM(view);\n this.currentSelection.set(sel);\n view.scrollToSelection();\n } else if (from > -1 || newSel) {\n if (from > -1) {\n view.docView.markDirty(from, to);\n checkCSS(view);\n }\n this.handleDOMChange(from, to, typeOver, added);\n if (view.docView && view.docView.dirty) view.updateState(view.state);else if (!this.currentSelection.eq(sel)) selectionToDOM(view);\n this.currentSelection.set(sel);\n }\n }\n registerMutation(mut, added) {\n // Ignore mutations inside nodes that were already noted as inserted\n if (added.indexOf(mut.target) > -1) return null;\n let desc = this.view.docView.nearestDesc(mut.target);\n if (mut.type == \"attributes\" && (desc == this.view.docView || mut.attributeName == \"contenteditable\" ||\n // Firefox sometimes fires spurious events for null/empty styles\n mut.attributeName == \"style\" && !mut.oldValue && !mut.target.getAttribute(\"style\"))) return null;\n if (!desc || desc.ignoreMutation(mut)) return null;\n if (mut.type == \"childList\") {\n for (let i = 0; i < mut.addedNodes.length; i++) added.push(mut.addedNodes[i]);\n if (desc.contentDOM && desc.contentDOM != desc.dom && !desc.contentDOM.contains(mut.target)) return {\n from: desc.posBefore,\n to: desc.posAfter\n };\n let prev = mut.previousSibling,\n next = mut.nextSibling;\n if (ie && ie_version <= 11 && mut.addedNodes.length) {\n // IE11 gives us incorrect next/prev siblings for some\n // insertions, so if there are added nodes, recompute those\n for (let i = 0; i < mut.addedNodes.length; i++) {\n let {\n previousSibling,\n nextSibling\n } = mut.addedNodes[i];\n if (!previousSibling || Array.prototype.indexOf.call(mut.addedNodes, previousSibling) < 0) prev = previousSibling;\n if (!nextSibling || Array.prototype.indexOf.call(mut.addedNodes, nextSibling) < 0) next = nextSibling;\n }\n }\n let fromOffset = prev && prev.parentNode == mut.target ? domIndex(prev) + 1 : 0;\n let from = desc.localPosFromDOM(mut.target, fromOffset, -1);\n let toOffset = next && next.parentNode == mut.target ? domIndex(next) : mut.target.childNodes.length;\n let to = desc.localPosFromDOM(mut.target, toOffset, 1);\n return {\n from,\n to\n };\n } else if (mut.type == \"attributes\") {\n return {\n from: desc.posAtStart - desc.border,\n to: desc.posAtEnd + desc.border\n };\n } else {\n // \"characterData\"\n return {\n from: desc.posAtStart,\n to: desc.posAtEnd,\n // An event was generated for a text change that didn't change\n // any text. Mark the dom change to fall back to assuming the\n // selection was typed over with an identical value if it can't\n // find another change.\n typeOver: mut.target.nodeValue == mut.oldValue\n };\n }\n }\n}\nlet cssChecked = new WeakMap();\nlet cssCheckWarned = false;\nfunction checkCSS(view) {\n if (cssChecked.has(view)) return;\n cssChecked.set(view, null);\n if (['normal', 'nowrap', 'pre-line'].indexOf(getComputedStyle(view.dom).whiteSpace) !== -1) {\n view.requiresGeckoHackNode = gecko;\n if (cssCheckWarned) return;\n console[\"warn\"](\"ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.\");\n cssCheckWarned = true;\n }\n}\n// Used to work around a Safari Selection/shadow DOM bug\n// Based on https://github.com/codemirror/dev/issues/414 fix\nfunction safariShadowSelectionRange(view) {\n let found;\n function read(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n found = event.getTargetRanges()[0];\n }\n // Because Safari (at least in 2018-2022) doesn't provide regular\n // access to the selection inside a shadowRoot, we have to perform a\n // ridiculous hack to get at it—using `execCommand` to trigger a\n // `beforeInput` event so that we can read the target range from the\n // event.\n view.dom.addEventListener(\"beforeinput\", read, true);\n document.execCommand(\"indent\");\n view.dom.removeEventListener(\"beforeinput\", read, true);\n let anchorNode = found.startContainer,\n anchorOffset = found.startOffset;\n let focusNode = found.endContainer,\n focusOffset = found.endOffset;\n let currentAnchor = view.domAtPos(view.state.selection.anchor);\n // Since such a range doesn't distinguish between anchor and head,\n // use a heuristic that flips it around if its end matches the\n // current anchor.\n if (isEquivalentPosition(currentAnchor.node, currentAnchor.offset, focusNode, focusOffset)) [anchorNode, anchorOffset, focusNode, focusOffset] = [focusNode, focusOffset, anchorNode, anchorOffset];\n return {\n anchorNode,\n anchorOffset,\n focusNode,\n focusOffset\n };\n}\n\n// Note that all referencing and parsing is done with the\n// start-of-operation selection and document, since that's the one\n// that the DOM represents. If any changes came in in the meantime,\n// the modification is mapped over those before it is applied, in\n// readDOMChange.\nfunction parseBetween(view, from_, to_) {\n let {\n node: parent,\n fromOffset,\n toOffset,\n from,\n to\n } = view.docView.parseRange(from_, to_);\n let domSel = view.domSelectionRange();\n let find;\n let anchor = domSel.anchorNode;\n if (anchor && view.dom.contains(anchor.nodeType == 1 ? anchor : anchor.parentNode)) {\n find = [{\n node: anchor,\n offset: domSel.anchorOffset\n }];\n if (!selectionCollapsed(domSel)) find.push({\n node: domSel.focusNode,\n offset: domSel.focusOffset\n });\n }\n // Work around issue in Chrome where backspacing sometimes replaces\n // the deleted content with a random BR node (issues #799, #831)\n if (chrome && view.input.lastKeyCode === 8) {\n for (let off = toOffset; off > fromOffset; off--) {\n let node = parent.childNodes[off - 1],\n desc = node.pmViewDesc;\n if (node.nodeName == \"BR\" && !desc) {\n toOffset = off;\n break;\n }\n if (!desc || desc.size) break;\n }\n }\n let startDoc = view.state.doc;\n let parser = view.someProp(\"domParser\") || DOMParser.fromSchema(view.state.schema);\n let $from = startDoc.resolve(from);\n let sel = null,\n doc = parser.parse(parent, {\n topNode: $from.parent,\n topMatch: $from.parent.contentMatchAt($from.index()),\n topOpen: true,\n from: fromOffset,\n to: toOffset,\n preserveWhitespace: $from.parent.type.whitespace == \"pre\" ? \"full\" : true,\n findPositions: find,\n ruleFromNode,\n context: $from\n });\n if (find && find[0].pos != null) {\n let anchor = find[0].pos,\n head = find[1] && find[1].pos;\n if (head == null) head = anchor;\n sel = {\n anchor: anchor + from,\n head: head + from\n };\n }\n return {\n doc,\n sel,\n from,\n to\n };\n}\nfunction ruleFromNode(dom) {\n let desc = dom.pmViewDesc;\n if (desc) {\n return desc.parseRule();\n } else if (dom.nodeName == \"BR\" && dom.parentNode) {\n // Safari replaces the list item or table cell with a BR\n // directly in the list node (?!) if you delete the last\n // character in a list item or table cell (#708, #862)\n if (safari && /^(ul|ol)$/i.test(dom.parentNode.nodeName)) {\n let skip = document.createElement(\"div\");\n skip.appendChild(document.createElement(\"li\"));\n return {\n skip\n };\n } else if (dom.parentNode.lastChild == dom || safari && /^(tr|table)$/i.test(dom.parentNode.nodeName)) {\n return {\n ignore: true\n };\n }\n } else if (dom.nodeName == \"IMG\" && dom.getAttribute(\"mark-placeholder\")) {\n return {\n ignore: true\n };\n }\n return null;\n}\nfunction readDOMChange(view, from, to, typeOver, addedNodes) {\n if (from < 0) {\n let origin = view.input.lastSelectionTime > Date.now() - 50 ? view.input.lastSelectionOrigin : null;\n let newSel = selectionFromDOM(view, origin);\n if (newSel && !view.state.selection.eq(newSel)) {\n let tr = view.state.tr.setSelection(newSel);\n if (origin == \"pointer\") tr.setMeta(\"pointer\", true);else if (origin == \"key\") tr.scrollIntoView();\n view.dispatch(tr);\n }\n return;\n }\n let $before = view.state.doc.resolve(from);\n let shared = $before.sharedDepth(to);\n from = $before.before(shared + 1);\n to = view.state.doc.resolve(to).after(shared + 1);\n let sel = view.state.selection;\n let parse = parseBetween(view, from, to);\n let doc = view.state.doc,\n compare = doc.slice(parse.from, parse.to);\n let preferredPos, preferredSide;\n // Prefer anchoring to end when Backspace is pressed\n if (view.input.lastKeyCode === 8 && Date.now() - 100 < view.input.lastKeyCodeTime) {\n preferredPos = view.state.selection.to;\n preferredSide = \"end\";\n } else {\n preferredPos = view.state.selection.from;\n preferredSide = \"start\";\n }\n view.input.lastKeyCode = null;\n let change = findDiff(compare.content, parse.doc.content, parse.from, preferredPos, preferredSide);\n if ((ios && view.input.lastIOSEnter > Date.now() - 225 || android) && addedNodes.some(n => n.nodeName == \"DIV\" || n.nodeName == \"P\") && (!change || change.endA >= change.endB) && view.someProp(\"handleKeyDown\", f => f(view, keyEvent(13, \"Enter\")))) {\n view.input.lastIOSEnter = 0;\n return;\n }\n if (!change) {\n if (typeOver && sel instanceof TextSelection && !sel.empty && sel.$head.sameParent(sel.$anchor) && !view.composing && !(parse.sel && parse.sel.anchor != parse.sel.head)) {\n change = {\n start: sel.from,\n endA: sel.to,\n endB: sel.to\n };\n } else {\n if (parse.sel) {\n let sel = resolveSelection(view, view.state.doc, parse.sel);\n if (sel && !sel.eq(view.state.selection)) view.dispatch(view.state.tr.setSelection(sel));\n }\n return;\n }\n }\n // Chrome sometimes leaves the cursor before the inserted text when\n // composing after a cursor wrapper. This moves it forward.\n if (chrome && view.cursorWrapper && parse.sel && parse.sel.anchor == view.cursorWrapper.deco.from && parse.sel.head == parse.sel.anchor) {\n let size = change.endB - change.start;\n parse.sel = {\n anchor: parse.sel.anchor + size,\n head: parse.sel.anchor + size\n };\n }\n view.input.domChangeCount++;\n // Handle the case where overwriting a selection by typing matches\n // the start or end of the selected content, creating a change\n // that's smaller than what was actually overwritten.\n if (view.state.selection.from < view.state.selection.to && change.start == change.endB && view.state.selection instanceof TextSelection) {\n if (change.start > view.state.selection.from && change.start <= view.state.selection.from + 2 && view.state.selection.from >= parse.from) {\n change.start = view.state.selection.from;\n } else if (change.endA < view.state.selection.to && change.endA >= view.state.selection.to - 2 && view.state.selection.to <= parse.to) {\n change.endB += view.state.selection.to - change.endA;\n change.endA = view.state.selection.to;\n }\n }\n // IE11 will insert a non-breaking space _ahead_ of the space after\n // the cursor space when adding a space before another space. When\n // that happened, adjust the change to cover the space instead.\n if (ie && ie_version <= 11 && change.endB == change.start + 1 && change.endA == change.start && change.start > parse.from && parse.doc.textBetween(change.start - parse.from - 1, change.start - parse.from + 1) == \" \\u00a0\") {\n change.start--;\n change.endA--;\n change.endB--;\n }\n let $from = parse.doc.resolveNoCache(change.start - parse.from);\n let $to = parse.doc.resolveNoCache(change.endB - parse.from);\n let $fromA = doc.resolve(change.start);\n let inlineChange = $from.sameParent($to) && $from.parent.inlineContent && $fromA.end() >= change.endA;\n let nextSel;\n // If this looks like the effect of pressing Enter (or was recorded\n // as being an iOS enter press), just dispatch an Enter key instead.\n if ((ios && view.input.lastIOSEnter > Date.now() - 225 && (!inlineChange || addedNodes.some(n => n.nodeName == \"DIV\" || n.nodeName == \"P\")) || !inlineChange && $from.pos < parse.doc.content.size && (nextSel = Selection.findFrom(parse.doc.resolve($from.pos + 1), 1, true)) && nextSel.head == $to.pos) && view.someProp(\"handleKeyDown\", f => f(view, keyEvent(13, \"Enter\")))) {\n view.input.lastIOSEnter = 0;\n return;\n }\n // Same for backspace\n if (view.state.selection.anchor > change.start && looksLikeJoin(doc, change.start, change.endA, $from, $to) && view.someProp(\"handleKeyDown\", f => f(view, keyEvent(8, \"Backspace\")))) {\n if (android && chrome) view.domObserver.suppressSelectionUpdates(); // #820\n return;\n }\n // Chrome Android will occasionally, during composition, delete the\n // entire composition and then immediately insert it again. This is\n // used to detect that situation.\n if (chrome && android && change.endB == change.start) view.input.lastAndroidDelete = Date.now();\n // This tries to detect Android virtual keyboard\n // enter-and-pick-suggestion action. That sometimes (see issue\n // #1059) first fires a DOM mutation, before moving the selection to\n // the newly created block. And then, because ProseMirror cleans up\n // the DOM selection, it gives up moving the selection entirely,\n // leaving the cursor in the wrong place. When that happens, we drop\n // the new paragraph from the initial change, and fire a simulated\n // enter key afterwards.\n if (android && !inlineChange && $from.start() != $to.start() && $to.parentOffset == 0 && $from.depth == $to.depth && parse.sel && parse.sel.anchor == parse.sel.head && parse.sel.head == change.endA) {\n change.endB -= 2;\n $to = parse.doc.resolveNoCache(change.endB - parse.from);\n setTimeout(() => {\n view.someProp(\"handleKeyDown\", function (f) {\n return f(view, keyEvent(13, \"Enter\"));\n });\n }, 20);\n }\n let chFrom = change.start,\n chTo = change.endA;\n let tr, storedMarks, markChange;\n if (inlineChange) {\n if ($from.pos == $to.pos) {\n // Deletion\n // IE11 sometimes weirdly moves the DOM selection around after\n // backspacing out the first element in a textblock\n if (ie && ie_version <= 11 && $from.parentOffset == 0) {\n view.domObserver.suppressSelectionUpdates();\n setTimeout(() => selectionToDOM(view), 20);\n }\n tr = view.state.tr.delete(chFrom, chTo);\n storedMarks = doc.resolve(change.start).marksAcross(doc.resolve(change.endA));\n } else if (\n // Adding or removing a mark\n change.endA == change.endB && (markChange = isMarkChange($from.parent.content.cut($from.parentOffset, $to.parentOffset), $fromA.parent.content.cut($fromA.parentOffset, change.endA - $fromA.start())))) {\n tr = view.state.tr;\n if (markChange.type == \"add\") tr.addMark(chFrom, chTo, markChange.mark);else tr.removeMark(chFrom, chTo, markChange.mark);\n } else if ($from.parent.child($from.index()).isText && $from.index() == $to.index() - ($to.textOffset ? 0 : 1)) {\n // Both positions in the same text node -- simply insert text\n let text = $from.parent.textBetween($from.parentOffset, $to.parentOffset);\n if (view.someProp(\"handleTextInput\", f => f(view, chFrom, chTo, text))) return;\n tr = view.state.tr.insertText(text, chFrom, chTo);\n }\n }\n if (!tr) tr = view.state.tr.replace(chFrom, chTo, parse.doc.slice(change.start - parse.from, change.endB - parse.from));\n if (parse.sel) {\n let sel = resolveSelection(view, tr.doc, parse.sel);\n // Chrome Android will sometimes, during composition, report the\n // selection in the wrong place. If it looks like that is\n // happening, don't update the selection.\n // Edge just doesn't move the cursor forward when you start typing\n // in an empty block or between br nodes.\n if (sel && !(chrome && android && view.composing && sel.empty && (change.start != change.endB || view.input.lastAndroidDelete < Date.now() - 100) && (sel.head == chFrom || sel.head == tr.mapping.map(chTo) - 1) || ie && sel.empty && sel.head == chFrom)) tr.setSelection(sel);\n }\n if (storedMarks) tr.ensureMarks(storedMarks);\n view.dispatch(tr.scrollIntoView());\n}\nfunction resolveSelection(view, doc, parsedSel) {\n if (Math.max(parsedSel.anchor, parsedSel.head) > doc.content.size) return null;\n return selectionBetween(view, doc.resolve(parsedSel.anchor), doc.resolve(parsedSel.head));\n}\n// Given two same-length, non-empty fragments of inline content,\n// determine whether the first could be created from the second by\n// removing or adding a single mark type.\nfunction isMarkChange(cur, prev) {\n let curMarks = cur.firstChild.marks,\n prevMarks = prev.firstChild.marks;\n let added = curMarks,\n removed = prevMarks,\n type,\n mark,\n update;\n for (let i = 0; i < prevMarks.length; i++) added = prevMarks[i].removeFromSet(added);\n for (let i = 0; i < curMarks.length; i++) removed = curMarks[i].removeFromSet(removed);\n if (added.length == 1 && removed.length == 0) {\n mark = added[0];\n type = \"add\";\n update = node => node.mark(mark.addToSet(node.marks));\n } else if (added.length == 0 && removed.length == 1) {\n mark = removed[0];\n type = \"remove\";\n update = node => node.mark(mark.removeFromSet(node.marks));\n } else {\n return null;\n }\n let updated = [];\n for (let i = 0; i < prev.childCount; i++) updated.push(update(prev.child(i)));\n if (Fragment.from(updated).eq(cur)) return {\n mark,\n type\n };\n}\nfunction looksLikeJoin(old, start, end, $newStart, $newEnd) {\n if (!$newStart.parent.isTextblock ||\n // The content must have shrunk\n end - start <= $newEnd.pos - $newStart.pos ||\n // newEnd must point directly at or after the end of the block that newStart points into\n skipClosingAndOpening($newStart, true, false) < $newEnd.pos) return false;\n let $start = old.resolve(start);\n // Start must be at the end of a block\n if ($start.parentOffset < $start.parent.content.size || !$start.parent.isTextblock) return false;\n let $next = old.resolve(skipClosingAndOpening($start, true, true));\n // The next textblock must start before end and end near it\n if (!$next.parent.isTextblock || $next.pos > end || skipClosingAndOpening($next, true, false) < end) return false;\n // The fragments after the join point must match\n return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content);\n}\nfunction skipClosingAndOpening($pos, fromEnd, mayOpen) {\n let depth = $pos.depth,\n end = fromEnd ? $pos.end() : $pos.pos;\n while (depth > 0 && (fromEnd || $pos.indexAfter(depth) == $pos.node(depth).childCount)) {\n depth--;\n end++;\n fromEnd = false;\n }\n if (mayOpen) {\n let next = $pos.node(depth).maybeChild($pos.indexAfter(depth));\n while (next && !next.isLeaf) {\n next = next.firstChild;\n end++;\n }\n }\n return end;\n}\nfunction findDiff(a, b, pos, preferredPos, preferredSide) {\n let start = a.findDiffStart(b, pos);\n if (start == null) return null;\n let {\n a: endA,\n b: endB\n } = a.findDiffEnd(b, pos + a.size, pos + b.size);\n if (preferredSide == \"end\") {\n let adjust = Math.max(0, start - Math.min(endA, endB));\n preferredPos -= endA + adjust - start;\n }\n if (endA < start && a.size < b.size) {\n let move = preferredPos <= start && preferredPos >= endA ? start - preferredPos : 0;\n start -= move;\n endB = start + (endB - endA);\n endA = start;\n } else if (endB < start) {\n let move = preferredPos <= start && preferredPos >= endB ? start - preferredPos : 0;\n start -= move;\n endA = start + (endA - endB);\n endB = start;\n }\n return {\n start,\n endA,\n endB\n };\n}\n\n/**\n@internal\n*/\nconst __serializeForClipboard = serializeForClipboard;\n/**\n@internal\n*/\nconst __parseFromClipboard = parseFromClipboard;\n/**\n@internal\n*/\nconst __endComposition = endComposition;\n/**\nAn editor view manages the DOM structure that represents an\neditable document. Its state and behavior are determined by its\n[props](https://prosemirror.net/docs/ref/#view.DirectEditorProps).\n*/\nclass EditorView {\n /**\n Create a view. `place` may be a DOM node that the editor should\n be appended to, a function that will place it into the document,\n or an object whose `mount` property holds the node to use as the\n document container. If it is `null`, the editor will not be\n added to the document.\n */\n constructor(place, props) {\n this._root = null;\n /**\n @internal\n */\n this.focused = false;\n /**\n Kludge used to work around a Chrome bug @internal\n */\n this.trackWrites = null;\n this.mounted = false;\n /**\n @internal\n */\n this.markCursor = null;\n /**\n @internal\n */\n this.cursorWrapper = null;\n /**\n @internal\n */\n this.lastSelectedViewDesc = undefined;\n /**\n @internal\n */\n this.input = new InputState();\n this.prevDirectPlugins = [];\n this.pluginViews = [];\n /**\n Holds `true` when a hack node is needed in Firefox to prevent the\n [space is eaten issue](https://github.com/ProseMirror/prosemirror/issues/651)\n @internal\n */\n this.requiresGeckoHackNode = false;\n /**\n When editor content is being dragged, this object contains\n information about the dragged slice and whether it is being\n copied or moved. At any other time, it is null.\n */\n this.dragging = null;\n this._props = props;\n this.state = props.state;\n this.directPlugins = props.plugins || [];\n this.directPlugins.forEach(checkStateComponent);\n this.dispatch = this.dispatch.bind(this);\n this.dom = place && place.mount || document.createElement(\"div\");\n if (place) {\n if (place.appendChild) place.appendChild(this.dom);else if (typeof place == \"function\") place(this.dom);else if (place.mount) this.mounted = true;\n }\n this.editable = getEditable(this);\n updateCursorWrapper(this);\n this.nodeViews = buildNodeViews(this);\n this.docView = docViewDesc(this.state.doc, computeDocDeco(this), viewDecorations(this), this.dom, this);\n this.domObserver = new DOMObserver(this, (from, to, typeOver, added) => readDOMChange(this, from, to, typeOver, added));\n this.domObserver.start();\n initInput(this);\n this.updatePluginViews();\n }\n /**\n Holds `true` when a\n [composition](https://w3c.github.io/uievents/#events-compositionevents)\n is active.\n */\n get composing() {\n return this.input.composing;\n }\n /**\n The view's current [props](https://prosemirror.net/docs/ref/#view.EditorProps).\n */\n get props() {\n if (this._props.state != this.state) {\n let prev = this._props;\n this._props = {};\n for (let name in prev) this._props[name] = prev[name];\n this._props.state = this.state;\n }\n return this._props;\n }\n /**\n Update the view's props. Will immediately cause an update to\n the DOM.\n */\n update(props) {\n if (props.handleDOMEvents != this._props.handleDOMEvents) ensureListeners(this);\n let prevProps = this._props;\n this._props = props;\n if (props.plugins) {\n props.plugins.forEach(checkStateComponent);\n this.directPlugins = props.plugins;\n }\n this.updateStateInner(props.state, prevProps);\n }\n /**\n Update the view by updating existing props object with the object\n given as argument. Equivalent to `view.update(Object.assign({},\n view.props, props))`.\n */\n setProps(props) {\n let updated = {};\n for (let name in this._props) updated[name] = this._props[name];\n updated.state = this.state;\n for (let name in props) updated[name] = props[name];\n this.update(updated);\n }\n /**\n Update the editor's `state` prop, without touching any of the\n other props.\n */\n updateState(state) {\n this.updateStateInner(state, this._props);\n }\n updateStateInner(state, prevProps) {\n let prev = this.state,\n redraw = false,\n updateSel = false;\n // When stored marks are added, stop composition, so that they can\n // be displayed.\n if (state.storedMarks && this.composing) {\n clearComposition(this);\n updateSel = true;\n }\n this.state = state;\n let pluginsChanged = prev.plugins != state.plugins || this._props.plugins != prevProps.plugins;\n if (pluginsChanged || this._props.plugins != prevProps.plugins || this._props.nodeViews != prevProps.nodeViews) {\n let nodeViews = buildNodeViews(this);\n if (changedNodeViews(nodeViews, this.nodeViews)) {\n this.nodeViews = nodeViews;\n redraw = true;\n }\n }\n if (pluginsChanged || prevProps.handleDOMEvents != this._props.handleDOMEvents) {\n ensureListeners(this);\n }\n this.editable = getEditable(this);\n updateCursorWrapper(this);\n let innerDeco = viewDecorations(this),\n outerDeco = computeDocDeco(this);\n let scroll = prev.plugins != state.plugins && !prev.doc.eq(state.doc) ? \"reset\" : state.scrollToSelection > prev.scrollToSelection ? \"to selection\" : \"preserve\";\n let updateDoc = redraw || !this.docView.matchesNode(state.doc, outerDeco, innerDeco);\n if (updateDoc || !state.selection.eq(prev.selection)) updateSel = true;\n let oldScrollPos = scroll == \"preserve\" && updateSel && this.dom.style.overflowAnchor == null && storeScrollPos(this);\n if (updateSel) {\n this.domObserver.stop();\n // Work around an issue in Chrome, IE, and Edge where changing\n // the DOM around an active selection puts it into a broken\n // state where the thing the user sees differs from the\n // selection reported by the Selection object (#710, #973,\n // #1011, #1013, #1035).\n let forceSelUpdate = updateDoc && (ie || chrome) && !this.composing && !prev.selection.empty && !state.selection.empty && selectionContextChanged(prev.selection, state.selection);\n if (updateDoc) {\n // If the node that the selection points into is written to,\n // Chrome sometimes starts misreporting the selection, so this\n // tracks that and forces a selection reset when our update\n // did write to the node.\n let chromeKludge = chrome ? this.trackWrites = this.domSelectionRange().focusNode : null;\n if (redraw || !this.docView.update(state.doc, outerDeco, innerDeco, this)) {\n this.docView.updateOuterDeco([]);\n this.docView.destroy();\n this.docView = docViewDesc(state.doc, outerDeco, innerDeco, this.dom, this);\n }\n if (chromeKludge && !this.trackWrites) forceSelUpdate = true;\n }\n // Work around for an issue where an update arriving right between\n // a DOM selection change and the \"selectionchange\" event for it\n // can cause a spurious DOM selection update, disrupting mouse\n // drag selection.\n if (forceSelUpdate || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && anchorInRightPlace(this))) {\n selectionToDOM(this, forceSelUpdate);\n } else {\n syncNodeSelection(this, state.selection);\n this.domObserver.setCurSelection();\n }\n this.domObserver.start();\n }\n this.updatePluginViews(prev);\n if (scroll == \"reset\") {\n this.dom.scrollTop = 0;\n } else if (scroll == \"to selection\") {\n this.scrollToSelection();\n } else if (oldScrollPos) {\n resetScrollPos(oldScrollPos);\n }\n }\n /**\n @internal\n */\n scrollToSelection() {\n let startDOM = this.domSelectionRange().focusNode;\n if (this.someProp(\"handleScrollToSelection\", f => f(this))) ;else if (this.state.selection instanceof NodeSelection) {\n let target = this.docView.domAfterPos(this.state.selection.from);\n if (target.nodeType == 1) scrollRectIntoView(this, target.getBoundingClientRect(), startDOM);\n } else {\n scrollRectIntoView(this, this.coordsAtPos(this.state.selection.head, 1), startDOM);\n }\n }\n destroyPluginViews() {\n let view;\n while (view = this.pluginViews.pop()) if (view.destroy) view.destroy();\n }\n updatePluginViews(prevState) {\n if (!prevState || prevState.plugins != this.state.plugins || this.directPlugins != this.prevDirectPlugins) {\n this.prevDirectPlugins = this.directPlugins;\n this.destroyPluginViews();\n for (let i = 0; i < this.directPlugins.length; i++) {\n let plugin = this.directPlugins[i];\n if (plugin.spec.view) this.pluginViews.push(plugin.spec.view(this));\n }\n for (let i = 0; i < this.state.plugins.length; i++) {\n let plugin = this.state.plugins[i];\n if (plugin.spec.view) this.pluginViews.push(plugin.spec.view(this));\n }\n } else {\n for (let i = 0; i < this.pluginViews.length; i++) {\n let pluginView = this.pluginViews[i];\n if (pluginView.update) pluginView.update(this, prevState);\n }\n }\n }\n someProp(propName, f) {\n let prop = this._props && this._props[propName],\n value;\n if (prop != null && (value = f ? f(prop) : prop)) return value;\n for (let i = 0; i < this.directPlugins.length; i++) {\n let prop = this.directPlugins[i].props[propName];\n if (prop != null && (value = f ? f(prop) : prop)) return value;\n }\n let plugins = this.state.plugins;\n if (plugins) for (let i = 0; i < plugins.length; i++) {\n let prop = plugins[i].props[propName];\n if (prop != null && (value = f ? f(prop) : prop)) return value;\n }\n }\n /**\n Query whether the view has focus.\n */\n hasFocus() {\n // Work around IE not handling focus correctly if resize handles are shown.\n // If the cursor is inside an element with resize handles, activeElement\n // will be that element instead of this.dom.\n if (ie) {\n // If activeElement is within this.dom, and there are no other elements\n // setting `contenteditable` to false in between, treat it as focused.\n let node = this.root.activeElement;\n if (node == this.dom) return true;\n if (!node || !this.dom.contains(node)) return false;\n while (node && this.dom != node && this.dom.contains(node)) {\n if (node.contentEditable == 'false') return false;\n node = node.parentElement;\n }\n return true;\n }\n return this.root.activeElement == this.dom;\n }\n /**\n Focus the editor.\n */\n focus() {\n this.domObserver.stop();\n if (this.editable) focusPreventScroll(this.dom);\n selectionToDOM(this);\n this.domObserver.start();\n }\n /**\n Get the document root in which the editor exists. This will\n usually be the top-level `document`, but might be a [shadow\n DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM)\n root if the editor is inside one.\n */\n get root() {\n let cached = this._root;\n if (cached == null) for (let search = this.dom.parentNode; search; search = search.parentNode) {\n if (search.nodeType == 9 || search.nodeType == 11 && search.host) {\n if (!search.getSelection) Object.getPrototypeOf(search).getSelection = () => search.ownerDocument.getSelection();\n return this._root = search;\n }\n }\n return cached || document;\n }\n /**\n Given a pair of viewport coordinates, return the document\n position that corresponds to them. May return null if the given\n coordinates aren't inside of the editor. When an object is\n returned, its `pos` property is the position nearest to the\n coordinates, and its `inside` property holds the position of the\n inner node that the position falls inside of, or -1 if it is at\n the top level, not in any node.\n */\n posAtCoords(coords) {\n return posAtCoords(this, coords);\n }\n /**\n Returns the viewport rectangle at a given document position.\n `left` and `right` will be the same number, as this returns a\n flat cursor-ish rectangle. If the position is between two things\n that aren't directly adjacent, `side` determines which element\n is used. When < 0, the element before the position is used,\n otherwise the element after.\n */\n coordsAtPos(pos) {\n let side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n return coordsAtPos(this, pos, side);\n }\n /**\n Find the DOM position that corresponds to the given document\n position. When `side` is negative, find the position as close as\n possible to the content before the position. When positive,\n prefer positions close to the content after the position. When\n zero, prefer as shallow a position as possible.\n \n Note that you should **not** mutate the editor's internal DOM,\n only inspect it (and even that is usually not necessary).\n */\n domAtPos(pos) {\n let side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return this.docView.domFromPos(pos, side);\n }\n /**\n Find the DOM node that represents the document node after the\n given position. May return `null` when the position doesn't point\n in front of a node or if the node is inside an opaque node view.\n \n This is intended to be able to call things like\n `getBoundingClientRect` on that DOM node. Do **not** mutate the\n editor DOM directly, or add styling this way, since that will be\n immediately overriden by the editor as it redraws the node.\n */\n nodeDOM(pos) {\n let desc = this.docView.descAt(pos);\n return desc ? desc.nodeDOM : null;\n }\n /**\n Find the document position that corresponds to a given DOM\n position. (Whenever possible, it is preferable to inspect the\n document structure directly, rather than poking around in the\n DOM, but sometimes—for example when interpreting an event\n target—you don't have a choice.)\n \n The `bias` parameter can be used to influence which side of a DOM\n node to use when the position is inside a leaf node.\n */\n posAtDOM(node, offset) {\n let bias = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;\n let pos = this.docView.posFromDOM(node, offset, bias);\n if (pos == null) throw new RangeError(\"DOM position not inside the editor\");\n return pos;\n }\n /**\n Find out whether the selection is at the end of a textblock when\n moving in a given direction. When, for example, given `\"left\"`,\n it will return true if moving left from the current cursor\n position would leave that position's parent textblock. Will apply\n to the view's current state by default, but it is possible to\n pass a different state.\n */\n endOfTextblock(dir, state) {\n return endOfTextblock(this, state || this.state, dir);\n }\n /**\n Removes the editor from the DOM and destroys all [node\n views](https://prosemirror.net/docs/ref/#view.NodeView).\n */\n destroy() {\n if (!this.docView) return;\n destroyInput(this);\n this.destroyPluginViews();\n if (this.mounted) {\n this.docView.update(this.state.doc, [], viewDecorations(this), this);\n this.dom.textContent = \"\";\n } else if (this.dom.parentNode) {\n this.dom.parentNode.removeChild(this.dom);\n }\n this.docView.destroy();\n this.docView = null;\n }\n /**\n This is true when the view has been\n [destroyed](https://prosemirror.net/docs/ref/#view.EditorView.destroy) (and thus should not be\n used anymore).\n */\n get isDestroyed() {\n return this.docView == null;\n }\n /**\n Used for testing.\n */\n dispatchEvent(event) {\n return dispatchEvent(this, event);\n }\n /**\n Dispatch a transaction. Will call\n [`dispatchTransaction`](https://prosemirror.net/docs/ref/#view.DirectEditorProps.dispatchTransaction)\n when given, and otherwise defaults to applying the transaction to\n the current state and calling\n [`updateState`](https://prosemirror.net/docs/ref/#view.EditorView.updateState) with the result.\n This method is bound to the view instance, so that it can be\n easily passed around.\n */\n dispatch(tr) {\n let dispatchTransaction = this._props.dispatchTransaction;\n if (dispatchTransaction) dispatchTransaction.call(this, tr);else this.updateState(this.state.apply(tr));\n }\n /**\n @internal\n */\n domSelectionRange() {\n return safari && this.root.nodeType === 11 && deepActiveElement(this.dom.ownerDocument) == this.dom ? safariShadowSelectionRange(this) : this.domSelection();\n }\n /**\n @internal\n */\n domSelection() {\n return this.root.getSelection();\n }\n}\nfunction computeDocDeco(view) {\n let attrs = Object.create(null);\n attrs.class = \"ProseMirror\";\n attrs.contenteditable = String(view.editable);\n attrs.translate = \"no\";\n view.someProp(\"attributes\", value => {\n if (typeof value == \"function\") value = value(view.state);\n if (value) for (let attr in value) {\n if (attr == \"class\") attrs.class += \" \" + value[attr];\n if (attr == \"style\") {\n attrs.style = (attrs.style ? attrs.style + \";\" : \"\") + value[attr];\n } else if (!attrs[attr] && attr != \"contenteditable\" && attr != \"nodeName\") attrs[attr] = String(value[attr]);\n }\n });\n return [Decoration.node(0, view.state.doc.content.size, attrs)];\n}\nfunction updateCursorWrapper(view) {\n if (view.markCursor) {\n let dom = document.createElement(\"img\");\n dom.className = \"ProseMirror-separator\";\n dom.setAttribute(\"mark-placeholder\", \"true\");\n dom.setAttribute(\"alt\", \"\");\n view.cursorWrapper = {\n dom,\n deco: Decoration.widget(view.state.selection.head, dom, {\n raw: true,\n marks: view.markCursor\n })\n };\n } else {\n view.cursorWrapper = null;\n }\n}\nfunction getEditable(view) {\n return !view.someProp(\"editable\", value => value(view.state) === false);\n}\nfunction selectionContextChanged(sel1, sel2) {\n let depth = Math.min(sel1.$anchor.sharedDepth(sel1.head), sel2.$anchor.sharedDepth(sel2.head));\n return sel1.$anchor.start(depth) != sel2.$anchor.start(depth);\n}\nfunction buildNodeViews(view) {\n let result = Object.create(null);\n function add(obj) {\n for (let prop in obj) if (!Object.prototype.hasOwnProperty.call(result, prop)) result[prop] = obj[prop];\n }\n view.someProp(\"nodeViews\", add);\n view.someProp(\"markViews\", add);\n return result;\n}\nfunction changedNodeViews(a, b) {\n let nA = 0,\n nB = 0;\n for (let prop in a) {\n if (a[prop] != b[prop]) return true;\n nA++;\n }\n for (let _ in b) nB++;\n return nA != nB;\n}\nfunction checkStateComponent(plugin) {\n if (plugin.spec.state || plugin.spec.filterTransaction || plugin.spec.appendTransaction) throw new RangeError(\"Plugins passed directly to the view must not have a state component\");\n}\nexport { Decoration, DecorationSet, EditorView, __endComposition, __parseFromClipboard, __serializeForClipboard };"],"sourceRoot":""} \ No newline at end of file diff --git a/10-2006840c141c5c3cffdf.js b/10-2006840c141c5c3cffdf.js deleted file mode 100644 index a2a794b..0000000 --- a/10-2006840c141c5c3cffdf.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 10-2006840c141c5c3cffdf.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{"+y9Y":function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=l){if(!/iPod|iPhone|iPad/.test(navigator.platform)||!document.activeElement)return s.default(0,f-80,{duration:300}),!0;if(document.activeElement.isContentEditable)return s.default(0,f-80,{duration:300}),!0}}}if(n.onChange){var h=y.getHtmlFromNode(a,r),d={json:a.toJSON(),html:h,schema:r};if(n.outputMarkdown&&o){var p=new o.Converter;p.setFlavor("github"),d.markdown=p.makeMd(h)}n.onChange(d)}if(n.autoSave){var m=location.pathname;h=y.getHtmlFromNode(a,r);localStorage.setItem("smartblock:"+m,h)}var v=a.content.childCount,g=a.content.child(v-1);if("paragraph"!==g.type.name){var b=t.schema.nodes.paragraph;e(t.tr.insert(t.doc.content.size,b.createAndFill()))}else if(0!==g.textContent.length){b=t.schema.nodes.paragraph;e(t.tr.insert(t.doc.content.size,b.createAndFill()))}return!1})(e,n,t,N,U,j)&&setTimeout((function(){R(!0)}),700)},render:function(t){var e=t.editor,n=t.view;return t.scrolling&&R(!1),i.createElement(i.Fragment,null,H&&i.createElement(i.Fragment,null,i.createElement(p.default,{view:n,menu:C($)}),i.createElement(d.default,{view:n,menu:C(X)}),function(t,e){var n=y.getParentNodeFromState(t.state),r=e.find((function(t){return t.name===n.type.name}));return!r||!r.hideInlineMenuOnFocus}(n,$)&&i.createElement(h.default,{menu:C(J),blockMenu:C($),view:n}),i.createElement(v.default,{view:n,menu:C($)}),u&&i.createElement(m.default,{view:n})),e)}}))))))}},"2wj0":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("q1tI"),i=n("b/sn"),o=n("cD+i"),a=n("rNiN");e.useForceUpdate=function(){var t=r.useState(0)[1];return function(){t((function(t){return t+1}))}},e.useView=function(t){var n=e.useForceUpdate();return r.useMemo((function(){var e=new o.EditorView(null,{state:i.EditorState.create(t.options),dispatchTransaction:function(r){var i=e.state.applyTransaction(r),o=i.state,a=i.transactions;e.updateState(o),a.some((function(t){return t.docChanged}))&&t.onChange(o,e.dispatch),n()},attributes:t.attributes,nodeViews:t.nodeViews});return t.onChange(e.state,e.dispatch),e}),[])},e.useScroll=function(){var t=r.useState(a.getScrollTop()),e=t[0],n=t[1];return r.useEffect((function(){var t=function(){n(a.getScrollTop())};return window.addEventListener("scroll",t),function(){window.removeEventListener("scroll",t)}}),[e]),e},e.useScrolling=function(t,e){var n=r.useState(!1),i=n[0],o=n[1];return r.useEffect((function(){var n=null,r=0;if(t.current){var a=t.current.getBoundingClientRect().top,u=setInterval((function(){var u=t.current.getBoundingClientRect().top;u!==a&&(a=u,3===++r&&!1===i&&(r=0,o(!0)),clearTimeout(n),n=setTimeout((function(){o(!1),r=0}),e))}),100);return function(){clearInterval(u)}}}),[]),i}},"346+":function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n(.*)<\/h1>/,"$1"),t.onChange(r)}},options:{schema:n,doc:p,plugins:[new a.Plugin({props:{decorations:function(t){var e=[];return t.doc.descendants((function(t,n){t.type.isBlock&&0===t.childCount&&e.push(u.Decoration.node(n,n+t.nodeSize,{class:"empty-node"}))})),u.DecorationSet.create(t.doc,e)}}})]}},v=c.useView(m);return f((function(){e.current&&e.current.appendChild(v.dom)}),[]),i.createElement("div",{ref:e,className:"smartblock-title"})}},"5/KJ":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("q1tI"),i=n("mG1W"),o=n("rNiN"),a=n("y4gM"),u=r.useState,s=r.useEffect;e.default=function(t){var e=t.menu,n=t.view,c=n.state,l=n.dispatch,f=function(t){var e=t.menu,n=t.view,i=n.state,o=e.find((function(t){return!(!t.active||!t.active(i))}));return o&&o.customMenu?r.createElement(r.Fragment,null,o.customMenu(n)):r.createElement(r.Fragment,null)}(t),h=function(t){var e=t.menu,n=t.view,r=o.getParentNodeFromState(n.state);if(r&&e&&e.length){var i=r.type.name,a=e.find((function(t){return t.name===i}));return!a||!a.hideMenuOnFocus}}(t),d=u({left:0,top:0}),p=d[0],m=d[1];if(s((function(){var e=function(t){var e=t.view,n=e.state,r=n.selection;if(!r||!r.empty)return{top:-1e3,right:0};var a=r.$anchor;if(0===a.pos)return{top:-1e3,right:0};var u=n.doc.resolve(a.pos).path[1],s=0,c=i.findChildren(n.doc,(function(t){return u===s||u+1===s?(s++,!0):(s++,!1)}),!1)[0];if(!c)return{top:-1e3};var l=e.coordsAtPos(c.pos),f=e.nodeDOM(c.pos),h=o.getOffset(f).top,d=o.getOffset(e.dom).top;return 0===l.top?{top:-1e3}:f&&f.offsetHeight?{left:5,top:h+f.offsetHeight-d+20}:{left:5,top:h-d+20}}(t);m(e)}),[t]),!h)return null;var v=!1,g=e.find((function(t){return!(!t.active||!t.active(c))}));return g&&g.hideBlockMenuOnFocus&&(v=!0),r.createElement("div",{style:p,className:"smartblock-menu"},r.createElement("div",{className:"smartblock-menu-top"},e.map((function(t,e){return t.customButton?t.customButton({state:c,dispatch:l}):r.createElement(a.default,{key:e,type:"button",active:t.active&&t.active(c),disabled:t.enable&&!t.enable(c)||v,onClick:function(e){e.preventDefault(),t.onClick(c,l,n)}},"string"!=typeof t.icon?t.icon:r.createElement("span",{dangerouslySetInnerHTML:{__html:t.icon}}))}))),f&&f.props&&f.props.children&&r.createElement("div",{className:"smartblock-custom-menu"},f))}},"7ILL":function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;nwindow.innerWidth)return{top:u,left:window.innerWidth-c}}return{left:s,top:u}}(s,h),p=function(t,e){var n=t.state.selection,r=i.getOffset(t.dom).left,o=t.coordsAtPos(n.$head.pos).left-50-r,a=e.current?e.current.offsetWidth:0;return e&&e.current&&e.current.offsetWidth&&o+a>window.innerWidth?o-window.innerWidth+a:20}(s,h),m=function(t){var e=t.blockMenu,n=t.view,i=n.state,o=e.find((function(t){return!(!t.active||!t.active(i))}));return!(!o||!o.customInlineMenu)&&r.createElement(r.Fragment,null,o.customInlineMenu(n))}({blockMenu:n,view:s});return!f||f.empty||0===e.length?r.createElement(r.Fragment,null):r.createElement("div",{style:d,ref:h,className:"smartblock-inline-menu"},r.createElement("div",{className:"smartblock-inline-menu-arrow",style:{left:p+"px"}}),r.createElement("div",{className:"smartblock-inline-menu-inner"},u,e.map((function(t,e){return r.createElement(o.default,{key:"inline-"+e,type:"button",active:t.active&&t.active(c),disabled:t.enable&&!t.enable(c),onClick:function(e){e.preventDefault(),t.onClick(c,l)}},"string"!=typeof t.icon?t.icon:r.createElement("span",{dangerouslySetInnerHTML:{__html:t.icon}}))})),m&&m.props&&m.props.children&&r.createElement(r.Fragment,null,m)))}},"9Ojb":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("vm0/"),i=n("5VLk"),o=n("9HVD"),a=n("Zxxf"),u=n("vCGa"),s=n("sDAw");e.default=[new r.default,new a.default,new o.default,new i.default,new u.default,new s.default({placeholder:"Content here..."})]},CUlp:function(t,e,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},r=n[t]=n[t]||[];return-1==r.indexOf(e)&&r.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var r=n.indexOf(e);return-1!=r&&n.splice(r,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var r=this._onceEvents&&this._onceEvents[t],i=0;i=t)return this._from=this._to,this._update(this._to),this._done=!0,this.emit("end"),this;var n=this._from,r=this._to,i=this._curr,o=(0,this._ease)((e-this._start)/t);if(this.isArray){for(var a=0;a= top_1) {\n if (/iPod|iPhone|iPad/.test(navigator.platform) && document.activeElement) {\n var activeElement = document.activeElement;\n if (activeElement.isContentEditable) {\n scroll_to_1.default(0, offsetTop - EDITMENUHEIGHT, {\n duration: 300\n });\n return true;\n }\n } else {\n scroll_to_1.default(0, offsetTop - EDITMENUHEIGHT, {\n duration: 300\n });\n return true;\n }\n }\n }\n }\n if (props.onChange) {\n var html = utils_1.getHtmlFromNode(doc, schema);\n var change = {\n json: doc.toJSON(),\n html: html,\n schema: schema\n };\n if (props.outputMarkdown && showdown) {\n var converter = new showdown.Converter();\n converter.setFlavor('github');\n change.markdown = converter.makeMd(html);\n }\n props.onChange(change);\n }\n if (props.autoSave) {\n var pathname = location.pathname;\n var html = utils_1.getHtmlFromNode(doc, schema);\n localStorage.setItem(\"smartblock:\" + pathname, html);\n }\n var childCount = doc.content.childCount;\n var lastNode = doc.content.child(childCount - 1);\n if (lastNode.type.name !== 'paragraph') {\n var paragraph = state.schema.nodes.paragraph;\n dispatch(state.tr.insert(state.doc.content.size, paragraph.createAndFill()));\n } else if (lastNode.textContent.length !== 0) {\n var paragraph = state.schema.nodes.paragraph;\n dispatch(state.tr.insert(state.doc.content.size, paragraph.createAndFill()));\n }\n return false;\n};\nvar getPlugins = function (extensions, schema) {\n var customPlugins = [];\n extensions.forEach(function (extension) {\n if (extension.plugins) {\n customPlugins = customPlugins.concat(extension.plugins);\n }\n });\n var keyPlugin = getKeys(extensions, schema);\n return customPlugins.concat([keyPlugin]);\n};\nvar getNodeViews = function (extensions) {\n var views = {};\n extensions.forEach(function (extension) {\n if (extension.view) {\n views[extension.name] = function (node, view, getPos) {\n return extension.view(node, view, getPos);\n };\n }\n });\n return views;\n};\nvar titleChanged = function (title, props) {\n var pathname = location.pathname;\n localStorage.setItem(\"smartblock-title:\" + pathname, title);\n if (props.onTitleChange) {\n props.onTitleChange(title);\n }\n};\nvar shouldRenderInlineMenu = function (view, blocks) {\n var node = utils_1.getParentNodeFromState(view.state);\n var currentBlock = blocks.find(function (block) {\n if (block.name === node.type.name) {\n return true;\n }\n return false;\n });\n if (currentBlock && currentBlock.hideInlineMenuOnFocus) {\n return false;\n }\n return true;\n};\nexports.default = function (props) {\n var defaultProps = {\n extensions: base_1.default,\n offsetTop: 0,\n showBackBtn: false,\n autoSave: false,\n showTitle: false,\n titleText: '',\n full: false\n };\n props = Object.assign({}, defaultProps, props);\n var html = props.html,\n json = props.json,\n extensions = props.extensions,\n showBackBtn = props.showBackBtn,\n showTitle = props.showTitle,\n markdown = props.markdown,\n showdown = props.showdown;\n var titleText = props.titleText;\n var schema = getSchemaFromExtensions(props.extensions);\n var realHtml = html;\n if (json) {\n var node = prosemirror_model_1.Node.fromJSON(schema, json);\n realHtml = utils_1.getHtmlFromNode(node, schema);\n }\n if (markdown && showdown) {\n var converter = new showdown.Converter();\n converter.setFlavor('github');\n realHtml = converter.makeHtml(markdown);\n }\n if (props.autoSave) {\n var pathname = location.pathname;\n var localHtml = localStorage.getItem(\"smartblock:\" + pathname);\n if (localHtml) {\n realHtml = localHtml;\n }\n if (showTitle) {\n titleText = localStorage.getItem(\"smartblock-title:\" + pathname);\n }\n }\n var _a = useState(null),\n options = _a[0],\n setOptions = _a[1];\n var app = useRef(null);\n useEffect(function () {\n var div = document.createElement('div');\n div.innerHTML = realHtml;\n var doc = prosemirror_model_1.DOMParser.fromSchema(schema).parse(div, {\n preserveWhitespace: true\n });\n if (props.onInit) {\n props.onInit({\n schema: schema\n });\n }\n if (props.getEditorRef) {\n props.getEditorRef(app);\n }\n var editorOptions = {\n schema: schema,\n plugins: getPlugins(extensions, schema),\n doc: doc\n };\n setOptions(editorOptions);\n }, []);\n var _b = useState(true),\n showMenus = _b[0],\n setShowMenus = _b[1];\n var containerId = React.useMemo(function () {\n return uuid();\n }, []);\n var container = useRef(null);\n var blocks = getBlocks(extensions);\n var marks = getMarks(extensions);\n var edits = getEdits(extensions);\n var nodeViews = getNodeViews(extensions);\n return React.createElement(\"div\", {\n id: containerId,\n onClick: function (e) {\n var target = e.target;\n if (target.getAttribute('id') === containerId) {\n setShowMenus(false);\n } else {\n setShowMenus(true);\n }\n },\n ref: app\n }, React.createElement(\"div\", {\n className: classnames_1.default('smartblock-container', {\n 'is-full': props.full\n })\n }, props.showTitle && React.createElement(title_1.default, {\n onChange: function (title) {\n titleChanged(title, props);\n },\n defaultValue: titleText,\n placeholder: props.titlePlaceholder\n }), React.createElement(\"div\", {\n className: \"smartblock-inner\"\n }, React.createElement(\"div\", {\n className: showMenus ? '' : 'ProseMirrorHideSelection',\n ref: container\n }, React.createElement(\"div\", {\n className: \"smartblock-input-area\"\n }, options && React.createElement(editor_1.default, {\n options: options,\n nodeViews: nodeViews,\n onChange: function (state, dispatch) {\n var shouldScroll = onChange(state, dispatch, props, schema, container, showdown);\n if (shouldScroll) {\n setTimeout(function () {\n setShowMenus(true);\n }, 700);\n }\n },\n render: function (_a) {\n var editor = _a.editor,\n view = _a.view,\n scrolling = _a.scrolling;\n if (scrolling) {\n setShowMenus(false);\n }\n return React.createElement(React.Fragment, null, showMenus && React.createElement(React.Fragment, null, React.createElement(menu_1.default, {\n view: view,\n menu: getMenu(blocks)\n }), React.createElement(edit_menu_1.default, {\n view: view,\n menu: getMenu(edits)\n }), shouldRenderInlineMenu(view, blocks) && React.createElement(inline_menu_1.default, {\n menu: getMenu(marks),\n blockMenu: getMenu(blocks),\n view: view\n }), React.createElement(custom_layout_1.default, {\n view: view,\n menu: getMenu(blocks)\n }), showBackBtn && React.createElement(back_btn_1.default, {\n view: view\n })), editor);\n }\n }))))));\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar react_1 = require(\"react\");\nvar prosemirror_state_1 = require(\"prosemirror-state\");\nvar prosemirror_view_1 = require(\"prosemirror-view\");\nvar _1 = require(\".\");\nexports.useForceUpdate = function () {\n var _a = react_1.useState(0),\n setTick = _a[1];\n var update = function () {\n setTick(function (tick) {\n return tick + 1;\n });\n };\n return update;\n};\nexports.useView = function (props) {\n var forceUpdate = exports.useForceUpdate();\n var instance = react_1.useMemo(function () {\n var view = new prosemirror_view_1.EditorView(null, {\n state: prosemirror_state_1.EditorState.create(props.options),\n dispatchTransaction: function (transaction) {\n var _a = view.state.applyTransaction(transaction),\n state = _a.state,\n transactions = _a.transactions;\n view.updateState(state);\n if (transactions.some(function (tr) {\n return tr.docChanged;\n })) {\n props.onChange(state, view.dispatch);\n }\n forceUpdate();\n },\n attributes: props.attributes,\n nodeViews: props.nodeViews\n });\n props.onChange(view.state, view.dispatch);\n return view;\n }, []);\n return instance;\n};\nexports.useScroll = function () {\n var _a = react_1.useState(_1.getScrollTop()),\n scrollTop = _a[0],\n setScrollTop = _a[1];\n react_1.useEffect(function () {\n var scrollEvent = function () {\n setScrollTop(_1.getScrollTop());\n };\n window.addEventListener('scroll', scrollEvent);\n return function () {\n window.removeEventListener('scroll', scrollEvent);\n };\n }, [scrollTop]);\n return scrollTop;\n};\nexports.useScrolling = function (element, delay) {\n var _a = react_1.useState(false),\n scrolling = _a[0],\n setScrolling = _a[1];\n react_1.useEffect(function () {\n var debounceTimer = null;\n var count = 0;\n if (!element.current) {\n return;\n }\n var top = element.current.getBoundingClientRect().top;\n var eventHandler = function () {\n var localTop = element.current.getBoundingClientRect().top;\n if (localTop === top) {\n return;\n }\n top = localTop;\n count++;\n if (count === 3) {\n if (scrolling === false) {\n count = 0;\n setScrolling(true);\n }\n }\n clearTimeout(debounceTimer);\n debounceTimer = setTimeout(function () {\n setScrolling(false);\n count = 0;\n }, delay);\n };\n var interval = setInterval(eventHandler, 100);\n return function () {\n clearInterval(interval);\n };\n }, []);\n return scrolling;\n};","\"use strict\";\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_model_1 = require(\"prosemirror-model\");\nvar prosemirror_state_1 = require(\"prosemirror-state\");\nvar prosemirror_view_1 = require(\"prosemirror-view\");\nvar utils_1 = require(\"../utils\");\nvar hooks_1 = require(\"../utils/hooks\");\nvar useRef = React.useRef,\n useEffect = React.useEffect;\nvar schemaDef = {\n nodes: {\n doc: {\n content: 'block'\n },\n text: {\n group: 'inline'\n },\n title: {\n group: 'block',\n content: 'text*',\n selectable: false,\n parseDOM: [{\n tag: 'h1'\n }],\n toDOM: function () {\n return ['h1', 0];\n }\n }\n }\n};\nvar placeholderPlugin = function () {\n return new prosemirror_state_1.Plugin({\n props: {\n decorations: function (state) {\n var decorations = [];\n var decorate = function (node, pos) {\n if (node.type.isBlock && node.childCount === 0) {\n decorations.push(prosemirror_view_1.Decoration.node(pos, pos + node.nodeSize, {\n class: 'empty-node'\n }));\n }\n };\n state.doc.descendants(decorate);\n return prosemirror_view_1.DecorationSet.create(state.doc, decorations);\n }\n }\n });\n};\nexports.default = function (props) {\n var defaultProps = {\n placeholder: 'Title here...',\n defaultValue: ''\n };\n props = Object.assign({}, defaultProps, props);\n var titleRef = useRef(null);\n var schema = new prosemirror_model_1.Schema(__assign({}, schemaDef));\n var div = document.createElement('div');\n div.innerHTML = props.defaultValue;\n var doc = prosemirror_model_1.DOMParser.fromSchema(schema).parse(div);\n var config = {\n onChange: function (state) {\n if (props.onChange) {\n var title = utils_1.getHtmlFromNode(state.doc, schema);\n title = title.replace(/

(.*)<\\/h1>/, '$1');\n props.onChange(title);\n }\n },\n options: {\n schema: schema,\n doc: doc,\n plugins: [placeholderPlugin()]\n }\n };\n var view = hooks_1.useView(config);\n useEffect(function () {\n if (titleRef.current) {\n titleRef.current.appendChild(view.dom);\n }\n }, []);\n return React.createElement(\"div\", {\n ref: titleRef,\n className: \"smartblock-title\"\n });\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_utils_1 = require(\"prosemirror-utils\");\nvar utils_1 = require(\"../utils\");\nvar button_1 = require(\"./button\");\nvar useState = React.useState,\n useEffect = React.useEffect;\nvar calculateStyle = function (props) {\n var view = props.view;\n var state = view.state;\n var selection = state.selection;\n if (!selection || !selection.empty) {\n return {\n top: -1000,\n right: 0\n };\n }\n var $anchor = selection.$anchor;\n if ($anchor.pos === 0) {\n return {\n top: -1000,\n right: 0\n };\n }\n var resolvedPos = state.doc.resolve($anchor.pos);\n var rowNumber = resolvedPos.path[1];\n var i = 0;\n var firstNode = prosemirror_utils_1.findChildren(state.doc, function (_node) {\n if (rowNumber === i || rowNumber + 1 === i) {\n i++;\n return true;\n }\n i++;\n return false;\n }, false)[0];\n if (!firstNode) {\n return {\n top: -1000\n };\n }\n var coords = view.coordsAtPos(firstNode.pos);\n var dom = view.nodeDOM(firstNode.pos);\n var elementTop = utils_1.getOffset(dom).top;\n var offsetTop = utils_1.getOffset(view.dom).top;\n if (coords.top === 0) {\n return {\n top: -1000\n };\n }\n if (dom && dom.offsetHeight) {\n return {\n left: 5,\n top: elementTop + dom.offsetHeight - offsetTop + 20\n };\n }\n return {\n left: 5,\n top: elementTop - offsetTop + 20\n };\n};\nvar getActiveMenu = function (props) {\n var menu = props.menu,\n view = props.view;\n var state = view.state;\n var activeItem = menu.find(function (item) {\n if (item.active && item.active(state)) {\n return true;\n }\n return false;\n });\n if (activeItem && activeItem.customMenu) {\n return React.createElement(React.Fragment, null, activeItem.customMenu(view));\n }\n return React.createElement(React.Fragment, null);\n};\nvar shouldRenderMenu = function (props) {\n var menu = props.menu,\n view = props.view;\n var node = utils_1.getParentNodeFromState(view.state);\n if (!node || !menu || !menu.length) {\n return;\n }\n var name = node.type.name;\n var selectedItem = menu.find(function (item) {\n if (item.name === name) {\n return true;\n }\n return false;\n });\n if (!selectedItem) {\n return true;\n }\n if (selectedItem.hideMenuOnFocus) {\n return false;\n }\n return true;\n};\nexports.default = function (props) {\n var menu = props.menu,\n view = props.view;\n var state = view.state,\n dispatch = view.dispatch;\n var CustomMenu = getActiveMenu(props);\n var shouldRender = shouldRenderMenu(props);\n var _a = useState({\n left: 0,\n top: 0\n }),\n style = _a[0],\n setState = _a[1];\n useEffect(function () {\n var nextStyle = calculateStyle(props);\n setState(nextStyle);\n }, [props]);\n if (!shouldRender) {\n return null;\n }\n var hideMenuOnFocus = false;\n var activeItem = menu.find(function (item) {\n if (item.active && item.active(state)) {\n return true;\n }\n return false;\n });\n if (activeItem && activeItem.hideBlockMenuOnFocus) {\n hideMenuOnFocus = true;\n }\n return React.createElement(\"div\", {\n style: style,\n className: \"smartblock-menu\"\n }, React.createElement(\"div\", {\n className: \"smartblock-menu-top\"\n }, menu.map(function (item, key) {\n if (item.customButton) {\n return item.customButton({\n state: state,\n dispatch: dispatch\n });\n }\n return React.createElement(button_1.default, {\n key: key,\n type: \"button\",\n active: item.active && item.active(state),\n disabled: item.enable && !item.enable(state) || hideMenuOnFocus,\n onClick: function (e) {\n e.preventDefault();\n item.onClick(state, dispatch, view);\n }\n }, typeof item.icon !== 'string' ? item.icon : React.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: item.icon\n }\n }));\n })), CustomMenu && CustomMenu.props && CustomMenu.props.children && React.createElement(\"div\", {\n className: \"smartblock-custom-menu\"\n }, CustomMenu));\n};","\"use strict\";\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar SvgUndo = function (props) {\n return React.createElement(\"svg\", __assign({\n width: 1792,\n height: 1792,\n viewBox: \"0 0 1792 1792\"\n }, props), React.createElement(\"title\", null, \"undo\"), React.createElement(\"g\", {\n id: \"bebf11ee-5e4c-414b-9c0e-9afbb64c0153\",\n \"data-name\": \"\\\\u30E9\\\\u30D9\\\\u30EB\"\n }, React.createElement(\"path\", {\n d: \"M715.62,1146.77v412.47L0,843.62,715.62,128V510.8l356.57,39.61c395.14,43.91,676.64,243.79,716.86,492,31.48,194.23-94.21,351.37-190.3,420.9-106.64,77.16-245,118.33-401.49,76.89,119.27-39.75,212.14-134.61,207.69-214.79-7-125.53-148.89-178.63-452-178.63Z\"\n })));\n};\nexports.default = SvgUndo;","/**\n * Module dependencies.\n */\n\nvar Tween = require('tween');\nvar raf = require('raf');\n\n/**\n * Expose `scrollTo`.\n */\n\nmodule.exports = scrollTo;\n\n/**\n * Scroll to `(x, y)`.\n *\n * @param {Number} x\n * @param {Number} y\n * @api public\n */\n\nfunction scrollTo(x, y, options) {\n options = options || {};\n\n // start position\n var start = scroll();\n\n // setup tween\n var tween = Tween(start).ease(options.ease || 'out-circ').to({\n top: y,\n left: x\n }).duration(options.duration || 1000);\n\n // scroll\n tween.update(function (o) {\n window.scrollTo(o.left | 0, o.top | 0);\n });\n\n // handle end\n tween.on('end', function () {\n animate = function () {};\n });\n\n // animate\n function animate() {\n raf(animate);\n tween.update();\n }\n animate();\n return tween;\n}\n\n/**\n * Return scroll position.\n *\n * @return {Object}\n * @api private\n */\n\nfunction scroll() {\n var y = window.pageYOffset || document.documentElement.scrollTop;\n var x = window.pageXOffset || document.documentElement.scrollLeft;\n return {\n top: y,\n left: x\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar utils_1 = require(\"../utils\");\nvar button_1 = require(\"./button\");\nvar useRef = React.useRef;\nvar ARROWOFFSET = 50;\nvar ARROWTOPOFFSET = 25;\nvar calculateStyle = function (view, container) {\n var selection = view.state.selection;\n var offsetLeft = utils_1.getOffset(view.dom).left;\n var coords = view.coordsAtPos(selection.$head.pos);\n var offsetTop = utils_1.getOffset(view.dom).top;\n var top = coords.top + utils_1.getScrollTop() + ARROWTOPOFFSET - offsetTop;\n var left = coords.left - ARROWOFFSET - offsetLeft;\n if (container && container.current && container.current.offsetWidth) {\n var width = container.current.offsetWidth;\n if (left + width > window.innerWidth) {\n return {\n top: top,\n left: window.innerWidth - width\n };\n }\n }\n return {\n left: left,\n top: top\n };\n};\nvar getActiveInlineMenu = function (props) {\n var blockMenu = props.blockMenu,\n view = props.view;\n var state = view.state;\n var activeItem = blockMenu.find(function (item) {\n if (item.active && item.active(state)) {\n return true;\n }\n return false;\n });\n if (activeItem && activeItem.customInlineMenu) {\n return React.createElement(React.Fragment, null, activeItem.customInlineMenu(view));\n }\n return false;\n};\nvar calculateArrowPos = function (view, container) {\n var selection = view.state.selection;\n var offsetLeft = utils_1.getOffset(view.dom).left;\n var coords = view.coordsAtPos(selection.$head.pos);\n var left = coords.left - ARROWOFFSET - offsetLeft;\n var width = container.current ? container.current.offsetWidth : 0;\n if (container && container.current && container.current.offsetWidth) {\n if (left + width > window.innerWidth) {\n return left - window.innerWidth + width;\n }\n }\n return 20;\n};\nvar MenuBar = function (_a) {\n var menu = _a.menu,\n blockMenu = _a.blockMenu,\n children = _a.children,\n view = _a.view;\n var state = view.state,\n dispatch = view.dispatch;\n var selection = view.state.selection;\n var container = useRef(null);\n var style = calculateStyle(view, container);\n var pos = calculateArrowPos(view, container);\n var inlineMenu = getActiveInlineMenu({\n blockMenu: blockMenu,\n view: view\n });\n if (!selection || selection.empty) {\n return React.createElement(React.Fragment, null);\n }\n if (menu.length === 0) {\n return React.createElement(React.Fragment, null);\n }\n return React.createElement(\"div\", {\n style: style,\n ref: container,\n className: \"smartblock-inline-menu\"\n }, React.createElement(\"div\", {\n className: \"smartblock-inline-menu-arrow\",\n style: {\n left: pos + \"px\"\n }\n }), React.createElement(\"div\", {\n className: \"smartblock-inline-menu-inner\"\n }, children, menu.map(function (item, key) {\n return React.createElement(button_1.default, {\n key: \"inline-\" + key,\n type: \"button\",\n active: item.active && item.active(state),\n // title={item.title}\n disabled: item.enable && !item.enable(state),\n onClick: function (e) {\n e.preventDefault();\n item.onClick(state, dispatch);\n }\n }, typeof item.icon !== 'string' ? item.icon : React.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: item.icon\n }\n }));\n }), inlineMenu && inlineMenu.props && inlineMenu.props.children && React.createElement(React.Fragment, null, inlineMenu)));\n};\nexports.default = MenuBar;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar paragraph_1 = require(\"./paragraph\");\nvar trash_1 = require(\"./trash\");\nvar move_up_1 = require(\"./move-up\");\nvar move_down_1 = require(\"./move-down\");\nvar default_keys_1 = require(\"./default-keys\");\nvar default_plugins_1 = require(\"./default-plugins\");\nexports.default = [\n// blocks\nnew paragraph_1.default(), new move_down_1.default(), new move_up_1.default(), new trash_1.default(), new default_keys_1.default(), new default_plugins_1.default({\n placeholder: 'Content here...'\n})];","/**\n * EvEmitter v1.1.0\n * Lil' event emitter\n * MIT License\n */\n\n/* jshint unused: true, undef: true, strict: true */\n\n(function (global, factory) {\n // universal module definition\n /* jshint strict: false */ /* globals define, module, window */\n if (typeof define == 'function' && define.amd) {\n // AMD - RequireJS\n define(factory);\n } else if (typeof module == 'object' && module.exports) {\n // CommonJS - Browserify, Webpack\n module.exports = factory();\n } else {\n // Browser globals\n global.EvEmitter = factory();\n }\n})(typeof window != 'undefined' ? window : this, function () {\n \"use strict\";\n\n function EvEmitter() {}\n var proto = EvEmitter.prototype;\n proto.on = function (eventName, listener) {\n if (!eventName || !listener) {\n return;\n }\n // set events hash\n var events = this._events = this._events || {};\n // set listeners array\n var listeners = events[eventName] = events[eventName] || [];\n // only add once\n if (listeners.indexOf(listener) == -1) {\n listeners.push(listener);\n }\n return this;\n };\n proto.once = function (eventName, listener) {\n if (!eventName || !listener) {\n return;\n }\n // add event\n this.on(eventName, listener);\n // set once flag\n // set onceEvents hash\n var onceEvents = this._onceEvents = this._onceEvents || {};\n // set onceListeners object\n var onceListeners = onceEvents[eventName] = onceEvents[eventName] || {};\n // set flag\n onceListeners[listener] = true;\n return this;\n };\n proto.off = function (eventName, listener) {\n var listeners = this._events && this._events[eventName];\n if (!listeners || !listeners.length) {\n return;\n }\n var index = listeners.indexOf(listener);\n if (index != -1) {\n listeners.splice(index, 1);\n }\n return this;\n };\n proto.emitEvent = function (eventName, args) {\n var listeners = this._events && this._events[eventName];\n if (!listeners || !listeners.length) {\n return;\n }\n // copy over to avoid interference if .off() in listener\n listeners = listeners.slice(0);\n args = args || [];\n // once stuff\n var onceListeners = this._onceEvents && this._onceEvents[eventName];\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n var isOnce = onceListeners && onceListeners[listener];\n if (isOnce) {\n // remove listener\n // remove before trigger to prevent recursion\n this.off(eventName, listener);\n // unset once flag\n delete onceListeners[listener];\n }\n // trigger listener\n listener.apply(this, args);\n }\n return this;\n };\n proto.allOff = function () {\n delete this._events;\n delete this._onceEvents;\n };\n return EvEmitter;\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar imagesloaded_1 = require(\"imagesloaded\");\nvar utils_1 = require(\"../utils\");\nvar useState = React.useState,\n useEffect = React.useEffect;\nvar getCustomLayout = function (props) {\n var menu = props.menu,\n view = props.view;\n var node = utils_1.getParentNodeFromState(view.state);\n if (!node || !menu || !menu.length) {\n return;\n }\n var name = node.type.name;\n var selectedItem = menu.find(function (item) {\n if (item.name === name) {\n return true;\n }\n return false;\n });\n if (!selectedItem) {\n return null;\n }\n if (selectedItem.customLayout) {\n return selectedItem.customLayout;\n }\n return null;\n};\nvar useImagesLoaded = function (dom) {\n var _a = useState({\n top: 0,\n left: 0,\n width: 0,\n height: 0\n }),\n size = _a[0],\n setSize = _a[1];\n useEffect(function () {\n imagesloaded_1.default(dom, function () {\n var newSize = dom.getBoundingClientRect();\n if (size.height !== newSize.height) {\n setSize(newSize);\n }\n });\n });\n return size;\n};\nexports.default = function (props) {\n var customLayout = getCustomLayout(props);\n if (!customLayout) {\n return null;\n }\n var view = props.view;\n var pos = utils_1.calculateStyle(props.view);\n var parentNode = utils_1.getParentNodeFromState(view.state);\n var parentPos = utils_1.findNodePosition(view.state.doc, parentNode);\n var dom = view.nodeDOM(parentPos);\n var style = {\n position: 'absolute',\n zIndex: 10,\n top: pos.top,\n left: 0,\n right: 0\n };\n var size = useImagesLoaded(dom);\n if (!size.height) {\n return null;\n }\n return React.createElement(\"div\", {\n style: style\n }, customLayout(props.view, dom));\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_utils_1 = require(\"prosemirror-utils\");\nvar utils_1 = require(\"../utils\");\nvar button_1 = require(\"./button\");\nvar useState = React.useState,\n useEffect = React.useEffect;\nvar getContainerOffset = function (container) {\n return utils_1.getOffset(container).top;\n};\nvar calculateStyle = function (props) {\n var view = props.view;\n var state = view.state;\n var selection = state.selection;\n if (!selection) {\n return {\n top: -1000\n };\n }\n var $anchor = selection.$anchor;\n var resolvedPos = state.doc.resolve($anchor.pos);\n var rowNumber = resolvedPos.path[1];\n var i = 0;\n if ($anchor.pos === 0) {\n return {\n top: -1000\n };\n }\n var firstNode = prosemirror_utils_1.findChildren(state.doc, function (_node) {\n if (rowNumber === i || rowNumber + 1 === i) {\n i++;\n return true;\n }\n i++;\n return false;\n }, false)[0];\n if (!firstNode) {\n return {\n top: -1000\n };\n }\n var coords = view.coordsAtPos(firstNode.pos);\n var dom = view.nodeDOM(firstNode.pos);\n var elementTop = utils_1.getOffset(dom).top;\n var offsetTop = getContainerOffset(view.dom);\n if (coords.top === 0) {\n return {\n top: -1000\n };\n }\n return {\n right: 20,\n top: elementTop - offsetTop - 40\n };\n};\nexports.default = function (props) {\n var _a = useState({\n right: 20,\n top: 0\n }),\n style = _a[0],\n setState = _a[1];\n var menu = props.menu,\n view = props.view;\n var state = view.state,\n dispatch = view.dispatch;\n useEffect(function () {\n var nextStyle = calculateStyle(props);\n setState(nextStyle);\n }, [props]);\n return React.createElement(\"div\", {\n style: style,\n className: \"smartblock-edit-menu\"\n }, menu.map(function (item, key) {\n return React.createElement(button_1.default, {\n className: \"smartblock-edit-btn\",\n key: \"edit-\" + key,\n type: \"button\",\n color: item.btnColor,\n active: item.active && item.active(state),\n disabled: item.enable && !item.enable(state),\n onClick: function (e) {\n e.preventDefault();\n item.onClick(state, dispatch, view);\n }\n }, item.icon);\n }));\n};","/**\n * Module dependencies.\n */\n\nvar Emitter = require('emitter');\nvar clone = require('clone');\nvar type = require('type');\nvar ease = require('ease');\n\n/**\n * Expose `Tween`.\n */\n\nmodule.exports = Tween;\n\n/**\n * Initialize a new `Tween` with `obj`.\n *\n * @param {Object|Array} obj\n * @api public\n */\n\nfunction Tween(obj) {\n if (!(this instanceof Tween)) return new Tween(obj);\n this._from = obj;\n this.ease('linear');\n this.duration(500);\n}\n\n/**\n * Mixin emitter.\n */\n\nEmitter(Tween.prototype);\n\n/**\n * Reset the tween.\n *\n * @api public\n */\n\nTween.prototype.reset = function () {\n this.isArray = 'array' === type(this._from);\n this._curr = clone(this._from);\n this._done = false;\n this._start = Date.now();\n return this;\n};\n\n/**\n * Tween to `obj` and reset internal state.\n *\n * tween.to({ x: 50, y: 100 })\n *\n * @param {Object|Array} obj\n * @return {Tween} self\n * @api public\n */\n\nTween.prototype.to = function (obj) {\n this.reset();\n this._to = obj;\n return this;\n};\n\n/**\n * Set duration to `ms` [500].\n *\n * @param {Number} ms\n * @return {Tween} self\n * @api public\n */\n\nTween.prototype.duration = function (ms) {\n this._duration = ms;\n return this;\n};\n\n/**\n * Set easing function to `fn`.\n *\n * tween.ease('in-out-sine')\n *\n * @param {String|Function} fn\n * @return {Tween}\n * @api public\n */\n\nTween.prototype.ease = function (fn) {\n fn = 'function' == typeof fn ? fn : ease[fn];\n if (!fn) throw new TypeError('invalid easing function');\n this._ease = fn;\n return this;\n};\n\n/**\n * Stop the tween and immediately emit \"stop\" and \"end\".\n *\n * @return {Tween}\n * @api public\n */\n\nTween.prototype.stop = function () {\n this.stopped = true;\n this._done = true;\n this.emit('stop');\n this.emit('end');\n return this;\n};\n\n/**\n * Perform a step.\n *\n * @return {Tween} self\n * @api private\n */\n\nTween.prototype.step = function () {\n if (this._done) return;\n\n // duration\n var duration = this._duration;\n var now = Date.now();\n var delta = now - this._start;\n var done = delta >= duration;\n\n // complete\n if (done) {\n this._from = this._to;\n this._update(this._to);\n this._done = true;\n this.emit('end');\n return this;\n }\n\n // tween\n var from = this._from;\n var to = this._to;\n var curr = this._curr;\n var fn = this._ease;\n var p = (now - this._start) / duration;\n var n = fn(p);\n\n // array\n if (this.isArray) {\n for (var i = 0; i < from.length; ++i) {\n curr[i] = from[i] + (to[i] - from[i]) * n;\n }\n this._update(curr);\n return this;\n }\n\n // objech\n for (var k in from) {\n curr[k] = from[k] + (to[k] - from[k]) * n;\n }\n this._update(curr);\n return this;\n};\n\n/**\n * Set update function to `fn` or\n * when no argument is given this performs\n * a \"step\".\n *\n * @param {Function} fn\n * @return {Tween} self\n * @api public\n */\n\nTween.prototype.update = function (fn) {\n if (0 == arguments.length) return this.step();\n this._update = fn;\n return this;\n};","/**\n * Expose `requestAnimationFrame()`.\n */\n\nexports = module.exports = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || fallback;\n\n/**\n * Fallback implementation.\n */\n\nvar prev = new Date().getTime();\nfunction fallback(fn) {\n var curr = new Date().getTime();\n var ms = Math.max(0, 16 - (curr - prev));\n var req = setTimeout(fn, ms);\n prev = curr;\n return req;\n}\n\n/**\n * Cancel.\n */\n\nvar cancel = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.clearTimeout;\nexports.cancel = function (id) {\n cancel.call(window, id);\n};","/**\n * Expose `Emitter`.\n */\n\nmodule.exports = Emitter;\n\n/**\n * Initialize a new `Emitter`.\n *\n * @api public\n */\n\nfunction Emitter(obj) {\n if (obj) return mixin(obj);\n}\n;\n\n/**\n * Mixin the emitter properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n return obj;\n}\n\n/**\n * Listen on the given `event` with `fn`.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) {\n this._callbacks = this._callbacks || {};\n (this._callbacks['$' + event] = this._callbacks['$' + event] || []).push(fn);\n return this;\n};\n\n/**\n * Adds an `event` listener that will be invoked a single\n * time then automatically removed.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.once = function (event, fn) {\n function on() {\n this.off(event, on);\n fn.apply(this, arguments);\n }\n on.fn = fn;\n this.on(event, on);\n return this;\n};\n\n/**\n * Remove the given callback for `event` or all\n * registered callbacks.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) {\n this._callbacks = this._callbacks || {};\n\n // all\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n }\n\n // specific event\n var callbacks = this._callbacks['$' + event];\n if (!callbacks) return this;\n\n // remove all handlers\n if (1 == arguments.length) {\n delete this._callbacks['$' + event];\n return this;\n }\n\n // remove specific handler\n var cb;\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n return this;\n};\n\n/**\n * Emit `event` with the given args.\n *\n * @param {String} event\n * @param {Mixed} ...\n * @return {Emitter}\n */\n\nEmitter.prototype.emit = function (event) {\n this._callbacks = this._callbacks || {};\n var args = [].slice.call(arguments, 1),\n callbacks = this._callbacks['$' + event];\n if (callbacks) {\n callbacks = callbacks.slice(0);\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n return this;\n};\n\n/**\n * Return array of callbacks for `event`.\n *\n * @param {String} event\n * @return {Array}\n * @api public\n */\n\nEmitter.prototype.listeners = function (event) {\n this._callbacks = this._callbacks || {};\n return this._callbacks['$' + event] || [];\n};\n\n/**\n * Check if this emitter has `event` handlers.\n *\n * @param {String} event\n * @return {Boolean}\n * @api public\n */\n\nEmitter.prototype.hasListeners = function (event) {\n return !!this.listeners(event).length;\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar hooks_1 = require(\"../utils/hooks\");\nvar useRef = React.useRef,\n useEffect = React.useEffect;\nexports.default = function (props) {\n var editorRef = useRef(null);\n var view = hooks_1.useView(props);\n // Object.keys(props.options).forEach((key) => console.log(key, {...props.options[key]}))\n useEffect(function () {\n if (editorRef.current) {\n editorRef.current.appendChild(view.dom);\n }\n if (props.autoFocus) {\n view.focus();\n }\n }, []);\n var scrolling = hooks_1.useScrolling(editorRef, 300);\n var editor = React.createElement(\"div\", {\n ref: editorRef\n });\n return props.render({\n editor: editor,\n view: view,\n scrolling: scrolling\n });\n};","/**\n * Module dependencies.\n */\n\nvar type;\ntry {\n type = require('component-type');\n} catch (_) {\n type = require('type');\n}\n\n/**\n * Module exports.\n */\n\nmodule.exports = clone;\n\n/**\n * Clones objects.\n *\n * @param {Mixed} any object\n * @api public\n */\n\nfunction clone(obj) {\n switch (type(obj)) {\n case 'object':\n var copy = {};\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n copy[key] = clone(obj[key]);\n }\n }\n return copy;\n case 'array':\n var copy = new Array(obj.length);\n for (var i = 0, l = obj.length; i < l; i++) {\n copy[i] = clone(obj[i]);\n }\n return copy;\n case 'regexp':\n // from millermedeiros/amd-utils - MIT\n var flags = '';\n flags += obj.multiline ? 'm' : '';\n flags += obj.global ? 'g' : '';\n flags += obj.ignoreCase ? 'i' : '';\n return new RegExp(obj.source, flags);\n case 'date':\n return new Date(obj.getTime());\n default:\n // string, number, boolean, …\n return obj;\n }\n}","// easing functions from \"Tween.js\"\n\nexports.linear = function (n) {\n return n;\n};\nexports.inQuad = function (n) {\n return n * n;\n};\nexports.outQuad = function (n) {\n return n * (2 - n);\n};\nexports.inOutQuad = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n;\n return -0.5 * (--n * (n - 2) - 1);\n};\nexports.inCube = function (n) {\n return n * n * n;\n};\nexports.outCube = function (n) {\n return --n * n * n + 1;\n};\nexports.inOutCube = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n * n;\n return 0.5 * ((n -= 2) * n * n + 2);\n};\nexports.inQuart = function (n) {\n return n * n * n * n;\n};\nexports.outQuart = function (n) {\n return 1 - --n * n * n * n;\n};\nexports.inOutQuart = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n * n * n;\n return -0.5 * ((n -= 2) * n * n * n - 2);\n};\nexports.inQuint = function (n) {\n return n * n * n * n * n;\n};\nexports.outQuint = function (n) {\n return --n * n * n * n * n + 1;\n};\nexports.inOutQuint = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n * n * n * n;\n return 0.5 * ((n -= 2) * n * n * n * n + 2);\n};\nexports.inSine = function (n) {\n return 1 - Math.cos(n * Math.PI / 2);\n};\nexports.outSine = function (n) {\n return Math.sin(n * Math.PI / 2);\n};\nexports.inOutSine = function (n) {\n return .5 * (1 - Math.cos(Math.PI * n));\n};\nexports.inExpo = function (n) {\n return 0 == n ? 0 : Math.pow(1024, n - 1);\n};\nexports.outExpo = function (n) {\n return 1 == n ? n : 1 - Math.pow(2, -10 * n);\n};\nexports.inOutExpo = function (n) {\n if (0 == n) return 0;\n if (1 == n) return 1;\n if ((n *= 2) < 1) return .5 * Math.pow(1024, n - 1);\n return .5 * (-Math.pow(2, -10 * (n - 1)) + 2);\n};\nexports.inCirc = function (n) {\n return 1 - Math.sqrt(1 - n * n);\n};\nexports.outCirc = function (n) {\n return Math.sqrt(1 - --n * n);\n};\nexports.inOutCirc = function (n) {\n n *= 2;\n if (n < 1) return -0.5 * (Math.sqrt(1 - n * n) - 1);\n return 0.5 * (Math.sqrt(1 - (n -= 2) * n) + 1);\n};\nexports.inBack = function (n) {\n var s = 1.70158;\n return n * n * ((s + 1) * n - s);\n};\nexports.outBack = function (n) {\n var s = 1.70158;\n return --n * n * ((s + 1) * n + s) + 1;\n};\nexports.inOutBack = function (n) {\n var s = 1.70158 * 1.525;\n if ((n *= 2) < 1) return 0.5 * (n * n * ((s + 1) * n - s));\n return 0.5 * ((n -= 2) * n * ((s + 1) * n + s) + 2);\n};\nexports.inBounce = function (n) {\n return 1 - exports.outBounce(1 - n);\n};\nexports.outBounce = function (n) {\n if (n < 1 / 2.75) {\n return 7.5625 * n * n;\n } else if (n < 2 / 2.75) {\n return 7.5625 * (n -= 1.5 / 2.75) * n + 0.75;\n } else if (n < 2.5 / 2.75) {\n return 7.5625 * (n -= 2.25 / 2.75) * n + 0.9375;\n } else {\n return 7.5625 * (n -= 2.625 / 2.75) * n + 0.984375;\n }\n};\nexports.inOutBounce = function (n) {\n if (n < .5) return exports.inBounce(n * 2) * .5;\n return exports.outBounce(n * 2 - 1) * .5 + .5;\n};\n\n// aliases\n\nexports['in-quad'] = exports.inQuad;\nexports['out-quad'] = exports.outQuad;\nexports['in-out-quad'] = exports.inOutQuad;\nexports['in-cube'] = exports.inCube;\nexports['out-cube'] = exports.outCube;\nexports['in-out-cube'] = exports.inOutCube;\nexports['in-quart'] = exports.inQuart;\nexports['out-quart'] = exports.outQuart;\nexports['in-out-quart'] = exports.inOutQuart;\nexports['in-quint'] = exports.inQuint;\nexports['out-quint'] = exports.outQuint;\nexports['in-out-quint'] = exports.inOutQuint;\nexports['in-sine'] = exports.inSine;\nexports['out-sine'] = exports.outSine;\nexports['in-out-sine'] = exports.inOutSine;\nexports['in-expo'] = exports.inExpo;\nexports['out-expo'] = exports.outExpo;\nexports['in-out-expo'] = exports.inOutExpo;\nexports['in-circ'] = exports.inCirc;\nexports['out-circ'] = exports.outCirc;\nexports['in-out-circ'] = exports.inOutCirc;\nexports['in-back'] = exports.inBack;\nexports['out-back'] = exports.outBack;\nexports['in-out-back'] = exports.inOutBack;\nexports['in-bounce'] = exports.inBounce;\nexports['out-bounce'] = exports.outBounce;\nexports['in-out-bounce'] = exports.inOutBounce;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_history_1 = require(\"prosemirror-history\");\nvar undo_1 = require(\"./icons/undo\");\nexports.default = function (props) {\n var _a = props.view,\n state = _a.state,\n dispatch = _a.dispatch;\n var depth = prosemirror_history_1.undoDepth(state);\n if (!depth) {\n return React.createElement(React.Fragment, null);\n }\n return React.createElement(\"button\", {\n className: \"smartblock-backbtn\",\n onClick: function () {\n prosemirror_history_1.undo(state, dispatch);\n }\n }, React.createElement(undo_1.default, {\n style: {\n width: '24px',\n height: '24px'\n }\n }));\n};","/**\n * toString ref.\n */\n\nvar toString = Object.prototype.toString;\n\n/**\n * Return the type of `val`.\n *\n * @param {Mixed} val\n * @return {String}\n * @api public\n */\n\nmodule.exports = function (val) {\n switch (toString.call(val)) {\n case '[object Date]':\n return 'date';\n case '[object RegExp]':\n return 'regexp';\n case '[object Arguments]':\n return 'arguments';\n case '[object Array]':\n return 'array';\n case '[object Error]':\n return 'error';\n }\n if (val === null) return 'null';\n if (val === undefined) return 'undefined';\n if (val !== val) return 'nan';\n if (val && val.nodeType === 1) return 'element';\n val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);\n return typeof val;\n};","/*!\n * imagesLoaded v4.1.4\n * JavaScript is all like \"You images are done yet or what?\"\n * MIT License\n */\n\n(function (window, factory) {\n 'use strict';\n\n // universal module definition\n\n /*global define: false, module: false, require: false */\n if (typeof define == 'function' && define.amd) {\n // AMD\n define(['ev-emitter/ev-emitter'], function (EvEmitter) {\n return factory(window, EvEmitter);\n });\n } else if (typeof module == 'object' && module.exports) {\n // CommonJS\n module.exports = factory(window, require('ev-emitter'));\n } else {\n // browser global\n window.imagesLoaded = factory(window, window.EvEmitter);\n }\n})(typeof window !== 'undefined' ? window : this,\n// -------------------------- factory -------------------------- //\n\nfunction factory(window, EvEmitter) {\n 'use strict';\n\n var $ = window.jQuery;\n var console = window.console;\n\n // -------------------------- helpers -------------------------- //\n\n // extend objects\n function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }\n var arraySlice = Array.prototype.slice;\n\n // turn element or nodeList into an array\n function makeArray(obj) {\n if (Array.isArray(obj)) {\n // use object if already an array\n return obj;\n }\n var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';\n if (isArrayLike) {\n // convert nodeList to array\n return arraySlice.call(obj);\n }\n\n // array of single index\n return [obj];\n }\n\n // -------------------------- imagesLoaded -------------------------- //\n\n /**\n * @param {Array, Element, NodeList, String} elem\n * @param {Object or Function} options - if function, use as callback\n * @param {Function} onAlways - callback function\n */\n function ImagesLoaded(elem, options, onAlways) {\n // coerce ImagesLoaded() without new, to be new ImagesLoaded()\n if (!(this instanceof ImagesLoaded)) {\n return new ImagesLoaded(elem, options, onAlways);\n }\n // use elem as selector string\n var queryElem = elem;\n if (typeof elem == 'string') {\n queryElem = document.querySelectorAll(elem);\n }\n // bail if bad element\n if (!queryElem) {\n console.error('Bad element for imagesLoaded ' + (queryElem || elem));\n return;\n }\n this.elements = makeArray(queryElem);\n this.options = extend({}, this.options);\n // shift arguments if no options set\n if (typeof options == 'function') {\n onAlways = options;\n } else {\n extend(this.options, options);\n }\n if (onAlways) {\n this.on('always', onAlways);\n }\n this.getImages();\n if ($) {\n // add jQuery Deferred object\n this.jqDeferred = new $.Deferred();\n }\n\n // HACK check async to allow time to bind listeners\n setTimeout(this.check.bind(this));\n }\n ImagesLoaded.prototype = Object.create(EvEmitter.prototype);\n ImagesLoaded.prototype.options = {};\n ImagesLoaded.prototype.getImages = function () {\n this.images = [];\n\n // filter & find items if we have an item selector\n this.elements.forEach(this.addElementImages, this);\n };\n\n /**\n * @param {Node} element\n */\n ImagesLoaded.prototype.addElementImages = function (elem) {\n // filter siblings\n if (elem.nodeName == 'IMG') {\n this.addImage(elem);\n }\n // get background image on element\n if (this.options.background === true) {\n this.addElementBackgroundImages(elem);\n }\n\n // find children\n // no non-element nodes, #143\n var nodeType = elem.nodeType;\n if (!nodeType || !elementNodeTypes[nodeType]) {\n return;\n }\n var childImgs = elem.querySelectorAll('img');\n // concat childElems to filterFound array\n for (var i = 0; i < childImgs.length; i++) {\n var img = childImgs[i];\n this.addImage(img);\n }\n\n // get child background images\n if (typeof this.options.background == 'string') {\n var children = elem.querySelectorAll(this.options.background);\n for (i = 0; i < children.length; i++) {\n var child = children[i];\n this.addElementBackgroundImages(child);\n }\n }\n };\n var elementNodeTypes = {\n 1: true,\n 9: true,\n 11: true\n };\n ImagesLoaded.prototype.addElementBackgroundImages = function (elem) {\n var style = getComputedStyle(elem);\n if (!style) {\n // Firefox returns null if in a hidden iframe https://bugzil.la/548397\n return;\n }\n // get url inside url(\"...\")\n var reURL = /url\\((['\"])?(.*?)\\1\\)/gi;\n var matches = reURL.exec(style.backgroundImage);\n while (matches !== null) {\n var url = matches && matches[2];\n if (url) {\n this.addBackground(url, elem);\n }\n matches = reURL.exec(style.backgroundImage);\n }\n };\n\n /**\n * @param {Image} img\n */\n ImagesLoaded.prototype.addImage = function (img) {\n var loadingImage = new LoadingImage(img);\n this.images.push(loadingImage);\n };\n ImagesLoaded.prototype.addBackground = function (url, elem) {\n var background = new Background(url, elem);\n this.images.push(background);\n };\n ImagesLoaded.prototype.check = function () {\n var _this = this;\n this.progressedCount = 0;\n this.hasAnyBroken = false;\n // complete if no images\n if (!this.images.length) {\n this.complete();\n return;\n }\n function onProgress(image, elem, message) {\n // HACK - Chrome triggers event before object properties have changed. #83\n setTimeout(function () {\n _this.progress(image, elem, message);\n });\n }\n this.images.forEach(function (loadingImage) {\n loadingImage.once('progress', onProgress);\n loadingImage.check();\n });\n };\n ImagesLoaded.prototype.progress = function (image, elem, message) {\n this.progressedCount++;\n this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;\n // progress event\n this.emitEvent('progress', [this, image, elem]);\n if (this.jqDeferred && this.jqDeferred.notify) {\n this.jqDeferred.notify(this, image);\n }\n // check if completed\n if (this.progressedCount == this.images.length) {\n this.complete();\n }\n if (this.options.debug && console) {\n console.log('progress: ' + message, image, elem);\n }\n };\n ImagesLoaded.prototype.complete = function () {\n var eventName = this.hasAnyBroken ? 'fail' : 'done';\n this.isComplete = true;\n this.emitEvent(eventName, [this]);\n this.emitEvent('always', [this]);\n if (this.jqDeferred) {\n var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';\n this.jqDeferred[jqMethod](this);\n }\n };\n\n // -------------------------- -------------------------- //\n\n function LoadingImage(img) {\n this.img = img;\n }\n LoadingImage.prototype = Object.create(EvEmitter.prototype);\n LoadingImage.prototype.check = function () {\n // If complete is true and browser supports natural sizes,\n // try to check for image status manually.\n var isComplete = this.getIsImageComplete();\n if (isComplete) {\n // report based on naturalWidth\n this.confirm(this.img.naturalWidth !== 0, 'naturalWidth');\n return;\n }\n\n // If none of the checks above matched, simulate loading on detached element.\n this.proxyImage = new Image();\n this.proxyImage.addEventListener('load', this);\n this.proxyImage.addEventListener('error', this);\n // bind to image as well for Firefox. #191\n this.img.addEventListener('load', this);\n this.img.addEventListener('error', this);\n this.proxyImage.src = this.img.src;\n };\n LoadingImage.prototype.getIsImageComplete = function () {\n // check for non-zero, non-undefined naturalWidth\n // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671\n return this.img.complete && this.img.naturalWidth;\n };\n LoadingImage.prototype.confirm = function (isLoaded, message) {\n this.isLoaded = isLoaded;\n this.emitEvent('progress', [this, this.img, message]);\n };\n\n // ----- events ----- //\n\n // trigger specified handler for event type\n LoadingImage.prototype.handleEvent = function (event) {\n var method = 'on' + event.type;\n if (this[method]) {\n this[method](event);\n }\n };\n LoadingImage.prototype.onload = function () {\n this.confirm(true, 'onload');\n this.unbindEvents();\n };\n LoadingImage.prototype.onerror = function () {\n this.confirm(false, 'onerror');\n this.unbindEvents();\n };\n LoadingImage.prototype.unbindEvents = function () {\n this.proxyImage.removeEventListener('load', this);\n this.proxyImage.removeEventListener('error', this);\n this.img.removeEventListener('load', this);\n this.img.removeEventListener('error', this);\n };\n\n // -------------------------- Background -------------------------- //\n\n function Background(url, element) {\n this.url = url;\n this.element = element;\n this.img = new Image();\n }\n\n // inherit LoadingImage prototype\n Background.prototype = Object.create(LoadingImage.prototype);\n Background.prototype.check = function () {\n this.img.addEventListener('load', this);\n this.img.addEventListener('error', this);\n this.img.src = this.url;\n // check if image is already complete\n var isComplete = this.getIsImageComplete();\n if (isComplete) {\n this.confirm(this.img.naturalWidth !== 0, 'naturalWidth');\n this.unbindEvents();\n }\n };\n Background.prototype.unbindEvents = function () {\n this.img.removeEventListener('load', this);\n this.img.removeEventListener('error', this);\n };\n Background.prototype.confirm = function (isLoaded, message) {\n this.isLoaded = isLoaded;\n this.emitEvent('progress', [this, this.element, message]);\n };\n\n // -------------------------- jQuery -------------------------- //\n\n ImagesLoaded.makeJQueryPlugin = function (jQuery) {\n jQuery = jQuery || window.jQuery;\n if (!jQuery) {\n return;\n }\n // set local variable\n $ = jQuery;\n // $().imagesLoaded()\n $.fn.imagesLoaded = function (options, callback) {\n var instance = new ImagesLoaded(this, options, callback);\n return instance.jqDeferred.promise($(this));\n };\n };\n // try making plugin\n ImagesLoaded.makeJQueryPlugin();\n\n // -------------------------- -------------------------- //\n\n return ImagesLoaded;\n});"],"sourceRoot":""} \ No newline at end of file diff --git a/10-3187724e776dfb326136.js b/10-3187724e776dfb326136.js deleted file mode 100644 index d1ef1b1..0000000 --- a/10-3187724e776dfb326136.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 10-3187724e776dfb326136.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{"+y9Y":function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=l){if(!/iPod|iPhone|iPad/.test(navigator.platform)||!document.activeElement)return(0,c.default)(0,f-80,{duration:300}),!0;if(document.activeElement.isContentEditable)return(0,c.default)(0,f-80,{duration:300}),!0}}}if(n.onChange){var h=(0,b.getHtmlFromNode)(a,r),d={json:a.toJSON(),html:h,schema:r};if(n.outputMarkdown&&o){var p=new o.Converter;p.setFlavor("github"),d.markdown=p.makeMd(h)}n.onChange(d)}if(n.autoSave){var m=location.pathname;h=(0,b.getHtmlFromNode)(a,r);localStorage.setItem("smartblock:".concat(m),h)}var v=a.content.childCount,g=a.content.child(v-1);if("paragraph"!==g.type.name){var y=t.schema.nodes.paragraph;e(t.tr.insert(t.doc.content.size,y.createAndFill()))}else if(0!==g.textContent.length){y=t.schema.nodes.paragraph;e(t.tr.insert(t.doc.content.size,y.createAndFill()))}return!1})(e,n,t,N,U,j)&&setTimeout((function(){R(!0)}),700)},render:function(t){var e=t.editor,n=t.view;return t.scrolling&&R(!1),o.createElement(o.Fragment,null,H&&o.createElement(o.Fragment,null,o.createElement(m.default,{view:n,menu:M($)}),o.createElement(p.default,{view:n,menu:M(X)}),function(t,e){var n=(0,b.getParentNodeFromState)(t.state),r=e.find((function(t){return t.name===n.type.name}));return!r||!r.hideInlineMenuOnFocus}(n,$)&&o.createElement(d.default,{menu:M(J),blockMenu:M($),view:n}),o.createElement(g.default,{view:n,menu:M($)}),u&&o.createElement(v.default,{view:n})),e)}}))))))}},"2wj0":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useScrolling=e.useScroll=e.useView=e.useForceUpdate=void 0;var r=n("q1tI"),i=n("b/sn"),o=n("cD+i"),a=n("rNiN");e.useForceUpdate=function(){var t=(0,r.useState)(0)[1];return function(){t((function(t){return t+1}))}};e.useView=function(t){var n=(0,e.useForceUpdate)();return(0,r.useMemo)((function(){var e=new o.EditorView(null,{state:i.EditorState.create(t.options),dispatchTransaction:function(r){var i=e.state.applyTransaction(r),o=i.state,a=i.transactions;e.updateState(o),a.some((function(t){return t.docChanged}))&&t.onChange(o,e.dispatch),n()},attributes:t.attributes,nodeViews:t.nodeViews});return t.onChange(e.state,e.dispatch),e}),[])};e.useScroll=function(){var t=(0,r.useState)((0,a.getScrollTop)()),e=t[0],n=t[1];return(0,r.useEffect)((function(){var t=function(){n((0,a.getScrollTop)())};return window.addEventListener("scroll",t),function(){window.removeEventListener("scroll",t)}}),[e]),e};e.useScrolling=function(t,e){var n=(0,r.useState)(!1),i=n[0],o=n[1];return(0,r.useEffect)((function(){var n=null,r=0;if(t.current){var a=t.current.getBoundingClientRect().top,u=setInterval((function(){var u=t.current.getBoundingClientRect().top;u!==a&&(a=u,3===++r&&!1===i&&(r=0,o(!0)),clearTimeout(n),n=setTimeout((function(){o(!1),r=0}),e))}),100);return function(){clearInterval(u)}}}),[]),i}},"346+":function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n(.*)<\/h1>/,"$1"),t.onChange(r)}},options:{schema:n,doc:p,plugins:[new a.Plugin({props:{decorations:function(t){var e=[];return t.doc.descendants((function(t,n){t.type.isBlock&&0===t.childCount&&e.push(u.Decoration.node(n,n+t.nodeSize,{class:"empty-node"}))})),u.DecorationSet.create(t.doc,e)}}})]}},v=(0,c.useView)(m);return f((function(){e.current&&e.current.appendChild(v.dom)}),[]),i.createElement("div",{ref:e,className:"smartblock-title"})}},"5/KJ":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("q1tI"),i=n("mG1W"),o=n("rNiN"),a=n("y4gM"),u=r.useState,s=r.useEffect;e.default=function(t){var e=t.menu,n=t.view,c=n.state,l=n.dispatch,f=function(t){var e=t.menu,n=t.view,i=n.state,o=e.find((function(t){return!(!t.active||!t.active(i))}));return o&&o.customMenu?r.createElement(r.Fragment,null,o.customMenu(n)):r.createElement(r.Fragment,null)}(t),h=function(t){var e=t.menu,n=t.view,r=(0,o.getParentNodeFromState)(n.state);if(r&&e&&e.length){var i=r.type.name,a=e.find((function(t){return t.name===i}));return!a||!a.hideMenuOnFocus}}(t),d=u({left:0,top:0}),p=d[0],m=d[1];if(s((function(){var e=function(t){var e=t.view,n=e.state,r=n.selection;if(!r||!r.empty)return{top:-1e3,right:0};var a=r.$anchor;if(0===a.pos)return{top:-1e3,right:0};var u=n.doc.resolve(a.pos).path[1],s=0,c=(0,i.findChildren)(n.doc,(function(t){return u===s||u+1===s?(s++,!0):(s++,!1)}),!1)[0];if(!c)return{top:-1e3};var l=e.coordsAtPos(c.pos),f=e.nodeDOM(c.pos),h=(0,o.getOffset)(f).top,d=(0,o.getOffset)(e.dom).top;return 0===l.top?{top:-1e3}:f&&f.offsetHeight?{left:5,top:h+f.offsetHeight-d+20}:{left:5,top:h-d+20}}(t);m(e)}),[t]),!h)return null;var v=!1,g=e.find((function(t){return!(!t.active||!t.active(c))}));return g&&g.hideBlockMenuOnFocus&&(v=!0),r.createElement("div",{style:p,className:"smartblock-menu"},r.createElement("div",{className:"smartblock-menu-top"},e.map((function(t,e){return t.customButton?t.customButton({state:c,dispatch:l}):r.createElement(a.default,{key:e,type:"button",active:t.active&&t.active(c),disabled:t.enable&&!t.enable(c)||v,onClick:function(e){e.preventDefault(),t.onClick(c,l,n)}},"string"!=typeof t.icon?t.icon:r.createElement("span",{dangerouslySetInnerHTML:{__html:t.icon}}))}))),f&&f.props&&f.props.children&&r.createElement("div",{className:"smartblock-custom-menu"},f))}},"7ILL":function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;nwindow.innerWidth)return{top:u,left:window.innerWidth-c}}return{left:s,top:u}}(s,h),p=function(t,e){var n=t.state.selection,r=(0,i.getOffset)(t.dom).left,o=t.coordsAtPos(n.$head.pos).left-50-r,a=e.current?e.current.offsetWidth:0;return e&&e.current&&e.current.offsetWidth&&o+a>window.innerWidth?o-window.innerWidth+a:20}(s,h),m=function(t){var e=t.blockMenu,n=t.view,i=n.state,o=e.find((function(t){return!(!t.active||!t.active(i))}));return!(!o||!o.customInlineMenu)&&r.createElement(r.Fragment,null,o.customInlineMenu(n))}({blockMenu:n,view:s});return!f||f.empty||0===e.length?r.createElement(r.Fragment,null):r.createElement("div",{style:d,ref:h,className:"smartblock-inline-menu"},r.createElement("div",{className:"smartblock-inline-menu-arrow",style:{left:"".concat(p,"px")}}),r.createElement("div",{className:"smartblock-inline-menu-inner"},u,e.map((function(t,e){return r.createElement(o.default,{key:"inline-".concat(e),type:"button",active:t.active&&t.active(c),disabled:t.enable&&!t.enable(c),onClick:function(e){e.preventDefault(),t.onClick(c,l)}},"string"!=typeof t.icon?t.icon:r.createElement("span",{dangerouslySetInnerHTML:{__html:t.icon}}))})),m&&m.props&&m.props.children&&r.createElement(r.Fragment,null,m)))}},"9Ojb":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("vm0/"),i=n("5VLk"),o=n("9HVD"),a=n("Zxxf"),u=n("vCGa"),s=n("sDAw");e.default=[new r.default,new a.default,new o.default,new i.default,new u.default,new s.default]},CUlp:function(t,e,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},r=n[t]=n[t]||[];return-1==r.indexOf(e)&&r.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var r=n.indexOf(e);return-1!=r&&n.splice(r,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var r=this._onceEvents&&this._onceEvents[t],i=0;i=t)return this._from=this._to,this._update(this._to),this._done=!0,this.emit("end"),this;var n=this._from,r=this._to,i=this._curr,o=(0,this._ease)((e-this._start)/t);if(this.isArray){for(var a=0;a= top_1) {\n if (/iPod|iPhone|iPad/.test(navigator.platform) && document.activeElement) {\n var activeElement = document.activeElement;\n if (activeElement.isContentEditable) {\n (0, scroll_to_1.default)(0, offsetTop - EDITMENUHEIGHT, {\n duration: 300\n });\n return true;\n }\n } else {\n (0, scroll_to_1.default)(0, offsetTop - EDITMENUHEIGHT, {\n duration: 300\n });\n return true;\n }\n }\n }\n }\n if (props.onChange) {\n var html = (0, utils_1.getHtmlFromNode)(doc, schema);\n var change = {\n json: doc.toJSON(),\n html: html,\n schema: schema\n };\n if (props.outputMarkdown && showdown) {\n var converter = new showdown.Converter();\n converter.setFlavor('github');\n change.markdown = converter.makeMd(html);\n }\n props.onChange(change);\n }\n if (props.autoSave) {\n var pathname = location.pathname;\n var html = (0, utils_1.getHtmlFromNode)(doc, schema);\n localStorage.setItem(\"smartblock:\".concat(pathname), html);\n }\n var childCount = doc.content.childCount;\n var lastNode = doc.content.child(childCount - 1);\n if (lastNode.type.name !== 'paragraph') {\n var paragraph = state.schema.nodes.paragraph;\n dispatch(state.tr.insert(state.doc.content.size, paragraph.createAndFill()));\n } else if (lastNode.textContent.length !== 0) {\n var paragraph = state.schema.nodes.paragraph;\n dispatch(state.tr.insert(state.doc.content.size, paragraph.createAndFill()));\n }\n return false;\n};\nvar getPlugins = function (extensions, schema) {\n var customPlugins = [];\n extensions.forEach(function (extension) {\n if (extension.plugins) {\n customPlugins = __spreadArray(__spreadArray([], customPlugins, true), extension.plugins, true);\n }\n });\n var keyPlugin = getKeys(extensions, schema);\n return __spreadArray(__spreadArray([], customPlugins, true), [keyPlugin], false);\n};\nvar getNodeViews = function (extensions) {\n var views = {};\n extensions.forEach(function (extension) {\n if (extension.view) {\n views[extension.name] = function (node, view, getPos) {\n return extension.view(node, view, getPos);\n };\n }\n });\n return views;\n};\nvar titleChanged = function (title, props) {\n var pathname = location.pathname;\n localStorage.setItem(\"smartblock-title:\".concat(pathname), title);\n if (props.onTitleChange) {\n props.onTitleChange(title);\n }\n};\nvar shouldRenderInlineMenu = function (view, blocks) {\n var node = (0, utils_1.getParentNodeFromState)(view.state);\n var currentBlock = blocks.find(function (block) {\n if (block.name === node.type.name) {\n return true;\n }\n return false;\n });\n if (currentBlock && currentBlock.hideInlineMenuOnFocus) {\n return false;\n }\n return true;\n};\nexports.default = function (props) {\n var defaultProps = {\n extensions: base_1.default,\n offsetTop: 0,\n showBackBtn: false,\n autoSave: false,\n showTitle: false,\n titleText: '',\n full: false\n };\n props = Object.assign({}, defaultProps, props);\n var html = props.html,\n json = props.json,\n extensions = props.extensions,\n showBackBtn = props.showBackBtn,\n showTitle = props.showTitle,\n markdown = props.markdown,\n showdown = props.showdown;\n var titleText = props.titleText;\n var schema = getSchemaFromExtensions(props.extensions);\n var realHtml = html;\n if (json) {\n var node = prosemirror_model_1.Node.fromJSON(schema, json);\n realHtml = (0, utils_1.getHtmlFromNode)(node, schema);\n }\n if (markdown && showdown) {\n var converter = new showdown.Converter();\n converter.setFlavor('github');\n realHtml = converter.makeHtml(markdown);\n }\n if (props.autoSave) {\n var pathname = location.pathname;\n var localHtml = localStorage.getItem(\"smartblock:\".concat(pathname));\n if (localHtml) {\n realHtml = localHtml;\n }\n if (showTitle) {\n titleText = localStorage.getItem(\"smartblock-title:\".concat(pathname));\n }\n }\n var _a = useState(null),\n options = _a[0],\n setOptions = _a[1];\n var app = useRef(null);\n useEffect(function () {\n var div = document.createElement('div');\n div.innerHTML = realHtml;\n var doc = prosemirror_model_1.DOMParser.fromSchema(schema).parse(div, {\n preserveWhitespace: true\n });\n if (props.onInit) {\n props.onInit({\n schema: schema\n });\n }\n if (props.getEditorRef) {\n props.getEditorRef(app);\n }\n var editorOptions = {\n schema: schema,\n plugins: getPlugins(extensions, schema),\n doc: doc\n };\n setOptions(editorOptions);\n }, []);\n var _b = useState(true),\n showMenus = _b[0],\n setShowMenus = _b[1];\n var containerId = React.useMemo(function () {\n return uuid();\n }, []);\n var container = useRef(null);\n var blocks = getBlocks(extensions);\n var marks = getMarks(extensions);\n var edits = getEdits(extensions);\n var nodeViews = getNodeViews(extensions);\n return React.createElement(\"div\", {\n id: containerId,\n onClick: function (e) {\n var target = e.target;\n if (target.getAttribute('id') === containerId) {\n setShowMenus(false);\n } else {\n setShowMenus(true);\n }\n },\n ref: app\n }, React.createElement(\"div\", {\n className: (0, classnames_1.default)('smartblock-container', {\n 'is-full': props.full\n })\n }, props.showTitle && React.createElement(title_1.default, {\n onChange: function (title) {\n titleChanged(title, props);\n },\n defaultValue: titleText\n }), React.createElement(\"div\", {\n className: \"smartblock-inner\"\n }, React.createElement(\"div\", {\n className: showMenus ? '' : 'ProseMirrorHideSelection',\n ref: container\n }, React.createElement(\"div\", {\n className: \"smartblock-input-area\"\n }, options && React.createElement(editor_1.default, {\n options: options,\n nodeViews: nodeViews,\n onChange: function (state, dispatch) {\n var shouldScroll = onChange(state, dispatch, props, schema, container, showdown);\n if (shouldScroll) {\n setTimeout(function () {\n setShowMenus(true);\n }, 700);\n }\n },\n render: function (_a) {\n var editor = _a.editor,\n view = _a.view,\n scrolling = _a.scrolling;\n if (scrolling) {\n setShowMenus(false);\n }\n return React.createElement(React.Fragment, null, showMenus && React.createElement(React.Fragment, null, React.createElement(menu_1.default, {\n view: view,\n menu: getMenu(blocks)\n }), React.createElement(edit_menu_1.default, {\n view: view,\n menu: getMenu(edits)\n }), shouldRenderInlineMenu(view, blocks) && React.createElement(inline_menu_1.default, {\n menu: getMenu(marks),\n blockMenu: getMenu(blocks),\n view: view\n }), React.createElement(custom_layout_1.default, {\n view: view,\n menu: getMenu(blocks)\n }), showBackBtn && React.createElement(back_btn_1.default, {\n view: view\n })), editor);\n }\n }))))));\n};\nfunction deepmarge(schema, schemaDependencies) {\n throw new Error('Function not implemented.');\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useScrolling = exports.useScroll = exports.useView = exports.useForceUpdate = void 0;\nvar react_1 = require(\"react\");\nvar prosemirror_state_1 = require(\"prosemirror-state\");\nvar prosemirror_view_1 = require(\"prosemirror-view\");\nvar _1 = require(\".\");\nvar useForceUpdate = function () {\n var _a = (0, react_1.useState)(0),\n setTick = _a[1];\n var update = function () {\n setTick(function (tick) {\n return tick + 1;\n });\n };\n return update;\n};\nexports.useForceUpdate = useForceUpdate;\nvar useView = function (props) {\n var forceUpdate = (0, exports.useForceUpdate)();\n var instance = (0, react_1.useMemo)(function () {\n var view = new prosemirror_view_1.EditorView(null, {\n state: prosemirror_state_1.EditorState.create(props.options),\n dispatchTransaction: function (transaction) {\n var _a = view.state.applyTransaction(transaction),\n state = _a.state,\n transactions = _a.transactions;\n view.updateState(state);\n if (transactions.some(function (tr) {\n return tr.docChanged;\n })) {\n props.onChange(state, view.dispatch);\n }\n forceUpdate();\n },\n attributes: props.attributes,\n nodeViews: props.nodeViews\n });\n props.onChange(view.state, view.dispatch);\n return view;\n }, []);\n return instance;\n};\nexports.useView = useView;\nvar useScroll = function () {\n var _a = (0, react_1.useState)((0, _1.getScrollTop)()),\n scrollTop = _a[0],\n setScrollTop = _a[1];\n (0, react_1.useEffect)(function () {\n var scrollEvent = function () {\n setScrollTop((0, _1.getScrollTop)());\n };\n window.addEventListener('scroll', scrollEvent);\n return function () {\n window.removeEventListener('scroll', scrollEvent);\n };\n }, [scrollTop]);\n return scrollTop;\n};\nexports.useScroll = useScroll;\nvar useScrolling = function (element, delay) {\n var _a = (0, react_1.useState)(false),\n scrolling = _a[0],\n setScrolling = _a[1];\n (0, react_1.useEffect)(function () {\n var debounceTimer = null;\n var count = 0;\n if (!element.current) {\n return;\n }\n var top = element.current.getBoundingClientRect().top;\n var eventHandler = function () {\n var localTop = element.current.getBoundingClientRect().top;\n if (localTop === top) {\n return;\n }\n top = localTop;\n count++;\n if (count === 3) {\n if (scrolling === false) {\n count = 0;\n setScrolling(true);\n }\n }\n clearTimeout(debounceTimer);\n debounceTimer = setTimeout(function () {\n setScrolling(false);\n count = 0;\n }, delay);\n };\n var interval = setInterval(eventHandler, 100);\n return function () {\n clearInterval(interval);\n };\n }, []);\n return scrolling;\n};\nexports.useScrolling = useScrolling;","\"use strict\";\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_model_1 = require(\"prosemirror-model\");\nvar prosemirror_state_1 = require(\"prosemirror-state\");\nvar prosemirror_view_1 = require(\"prosemirror-view\");\nvar utils_1 = require(\"../utils\");\nvar hooks_1 = require(\"../utils/hooks\");\nvar useRef = React.useRef,\n useEffect = React.useEffect;\nvar schemaDef = {\n nodes: {\n doc: {\n content: 'block'\n },\n text: {\n group: 'inline'\n },\n title: {\n group: 'block',\n content: 'text*',\n selectable: false,\n parseDOM: [{\n tag: 'h1'\n }],\n toDOM: function () {\n return ['h1', 0];\n }\n }\n }\n};\nvar placeholderPlugin = function () {\n return new prosemirror_state_1.Plugin({\n props: {\n decorations: function (state) {\n var decorations = [];\n var decorate = function (node, pos) {\n if (node.type.isBlock && node.childCount === 0) {\n decorations.push(prosemirror_view_1.Decoration.node(pos, pos + node.nodeSize, {\n class: 'empty-node'\n }));\n }\n };\n state.doc.descendants(decorate);\n return prosemirror_view_1.DecorationSet.create(state.doc, decorations);\n }\n }\n });\n};\nexports.default = function (props) {\n var defaultProps = {\n defaultValue: ''\n };\n props = Object.assign({}, defaultProps, props);\n var titleRef = useRef(null);\n var schema = new prosemirror_model_1.Schema(__assign({}, schemaDef));\n var div = document.createElement('div');\n div.innerHTML = props.defaultValue;\n var doc = prosemirror_model_1.DOMParser.fromSchema(schema).parse(div);\n var config = {\n onChange: function (state) {\n if (props.onChange) {\n var title = (0, utils_1.getHtmlFromNode)(state.doc, schema);\n title = title.replace(/

(.*)<\\/h1>/, '$1');\n props.onChange(title);\n }\n },\n options: {\n schema: schema,\n doc: doc,\n plugins: [placeholderPlugin()]\n }\n };\n var view = (0, hooks_1.useView)(config);\n useEffect(function () {\n if (titleRef.current) {\n titleRef.current.appendChild(view.dom);\n }\n }, []);\n return React.createElement(\"div\", {\n ref: titleRef,\n className: \"smartblock-title\"\n });\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_utils_1 = require(\"prosemirror-utils\");\nvar utils_1 = require(\"../utils\");\nvar button_1 = require(\"./button\");\nvar useState = React.useState,\n useEffect = React.useEffect;\nvar calculateStyle = function (props) {\n var view = props.view;\n var state = view.state;\n var selection = state.selection;\n if (!selection || !selection.empty) {\n return {\n top: -1000,\n right: 0\n };\n }\n var $anchor = selection.$anchor;\n if ($anchor.pos === 0) {\n return {\n top: -1000,\n right: 0\n };\n }\n var resolvedPos = state.doc.resolve($anchor.pos);\n var rowNumber = resolvedPos.path[1];\n var i = 0;\n var firstNode = (0, prosemirror_utils_1.findChildren)(state.doc, function (_node) {\n if (rowNumber === i || rowNumber + 1 === i) {\n i++;\n return true;\n }\n i++;\n return false;\n }, false)[0];\n if (!firstNode) {\n return {\n top: -1000\n };\n }\n var coords = view.coordsAtPos(firstNode.pos);\n var dom = view.nodeDOM(firstNode.pos);\n var elementTop = (0, utils_1.getOffset)(dom).top;\n var offsetTop = (0, utils_1.getOffset)(view.dom).top;\n if (coords.top === 0) {\n return {\n top: -1000\n };\n }\n if (dom && dom.offsetHeight) {\n return {\n left: 5,\n top: elementTop + dom.offsetHeight - offsetTop + 20\n };\n }\n return {\n left: 5,\n top: elementTop - offsetTop + 20\n };\n};\nvar getActiveMenu = function (props) {\n var menu = props.menu,\n view = props.view;\n var state = view.state;\n var activeItem = menu.find(function (item) {\n if (item.active && item.active(state)) {\n return true;\n }\n return false;\n });\n if (activeItem && activeItem.customMenu) {\n return React.createElement(React.Fragment, null, activeItem.customMenu(view));\n }\n return React.createElement(React.Fragment, null);\n};\nvar shouldRenderMenu = function (props) {\n var menu = props.menu,\n view = props.view;\n var node = (0, utils_1.getParentNodeFromState)(view.state);\n if (!node || !menu || !menu.length) {\n return;\n }\n var name = node.type.name;\n var selectedItem = menu.find(function (item) {\n if (item.name === name) {\n return true;\n }\n return false;\n });\n if (!selectedItem) {\n return true;\n }\n if (selectedItem.hideMenuOnFocus) {\n return false;\n }\n return true;\n};\nexports.default = function (props) {\n var menu = props.menu,\n view = props.view;\n var state = view.state,\n dispatch = view.dispatch;\n var CustomMenu = getActiveMenu(props);\n var shouldRender = shouldRenderMenu(props);\n var _a = useState({\n left: 0,\n top: 0\n }),\n style = _a[0],\n setState = _a[1];\n useEffect(function () {\n var nextStyle = calculateStyle(props);\n setState(nextStyle);\n }, [props]);\n if (!shouldRender) {\n return null;\n }\n var hideMenuOnFocus = false;\n var activeItem = menu.find(function (item) {\n if (item.active && item.active(state)) {\n return true;\n }\n return false;\n });\n if (activeItem && activeItem.hideBlockMenuOnFocus) {\n hideMenuOnFocus = true;\n }\n return React.createElement(\"div\", {\n style: style,\n className: \"smartblock-menu\"\n }, React.createElement(\"div\", {\n className: \"smartblock-menu-top\"\n }, menu.map(function (item, key) {\n if (item.customButton) {\n return item.customButton({\n state: state,\n dispatch: dispatch\n });\n }\n return React.createElement(button_1.default, {\n key: key,\n type: \"button\",\n active: item.active && item.active(state),\n disabled: item.enable && !item.enable(state) || hideMenuOnFocus,\n onClick: function (e) {\n e.preventDefault();\n item.onClick(state, dispatch, view);\n }\n }, typeof item.icon !== 'string' ? item.icon : React.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: item.icon\n }\n }));\n })), CustomMenu && CustomMenu.props && CustomMenu.props.children && React.createElement(\"div\", {\n className: \"smartblock-custom-menu\"\n }, CustomMenu));\n};","\"use strict\";\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar SvgUndo = function (props) {\n return React.createElement(\"svg\", __assign({\n width: 1792,\n height: 1792,\n viewBox: \"0 0 1792 1792\"\n }, props), React.createElement(\"title\", null, \"undo\"), React.createElement(\"g\", {\n id: \"bebf11ee-5e4c-414b-9c0e-9afbb64c0153\",\n \"data-name\": \"\\\\u30E9\\\\u30D9\\\\u30EB\"\n }, React.createElement(\"path\", {\n d: \"M715.62,1146.77v412.47L0,843.62,715.62,128V510.8l356.57,39.61c395.14,43.91,676.64,243.79,716.86,492,31.48,194.23-94.21,351.37-190.3,420.9-106.64,77.16-245,118.33-401.49,76.89,119.27-39.75,212.14-134.61,207.69-214.79-7-125.53-148.89-178.63-452-178.63Z\"\n })));\n};\nexports.default = SvgUndo;","/**\n * Module dependencies.\n */\n\nvar Tween = require('tween');\nvar raf = require('raf');\n\n/**\n * Expose `scrollTo`.\n */\n\nmodule.exports = scrollTo;\n\n/**\n * Scroll to `(x, y)`.\n *\n * @param {Number} x\n * @param {Number} y\n * @api public\n */\n\nfunction scrollTo(x, y, options) {\n options = options || {};\n\n // start position\n var start = scroll();\n\n // setup tween\n var tween = Tween(start).ease(options.ease || 'out-circ').to({\n top: y,\n left: x\n }).duration(options.duration || 1000);\n\n // scroll\n tween.update(function (o) {\n window.scrollTo(o.left | 0, o.top | 0);\n });\n\n // handle end\n tween.on('end', function () {\n animate = function () {};\n });\n\n // animate\n function animate() {\n raf(animate);\n tween.update();\n }\n animate();\n return tween;\n}\n\n/**\n * Return scroll position.\n *\n * @return {Object}\n * @api private\n */\n\nfunction scroll() {\n var y = window.pageYOffset || document.documentElement.scrollTop;\n var x = window.pageXOffset || document.documentElement.scrollLeft;\n return {\n top: y,\n left: x\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar utils_1 = require(\"../utils\");\nvar button_1 = require(\"./button\");\nvar useRef = React.useRef;\nvar ARROWOFFSET = 50;\nvar ARROWTOPOFFSET = 25;\nvar calculateStyle = function (view, container) {\n var selection = view.state.selection;\n var offsetLeft = (0, utils_1.getOffset)(view.dom).left;\n var coords = view.coordsAtPos(selection.$head.pos);\n var offsetTop = (0, utils_1.getOffset)(view.dom).top;\n var top = coords.top + (0, utils_1.getScrollTop)() + ARROWTOPOFFSET - offsetTop;\n var left = coords.left - ARROWOFFSET - offsetLeft;\n if (container && container.current && container.current.offsetWidth) {\n var width = container.current.offsetWidth;\n if (left + width > window.innerWidth) {\n return {\n top: top,\n left: window.innerWidth - width\n };\n }\n }\n return {\n left: left,\n top: top\n };\n};\nvar getActiveInlineMenu = function (props) {\n var blockMenu = props.blockMenu,\n view = props.view;\n var state = view.state;\n var activeItem = blockMenu.find(function (item) {\n if (item.active && item.active(state)) {\n return true;\n }\n return false;\n });\n if (activeItem && activeItem.customInlineMenu) {\n return React.createElement(React.Fragment, null, activeItem.customInlineMenu(view));\n }\n return false;\n};\nvar calculateArrowPos = function (view, container) {\n var selection = view.state.selection;\n var offsetLeft = (0, utils_1.getOffset)(view.dom).left;\n var coords = view.coordsAtPos(selection.$head.pos);\n var left = coords.left - ARROWOFFSET - offsetLeft;\n var width = container.current ? container.current.offsetWidth : 0;\n if (container && container.current && container.current.offsetWidth) {\n if (left + width > window.innerWidth) {\n return left - window.innerWidth + width;\n }\n }\n return 20;\n};\nvar MenuBar = function (_a) {\n var menu = _a.menu,\n blockMenu = _a.blockMenu,\n children = _a.children,\n view = _a.view;\n var state = view.state,\n dispatch = view.dispatch;\n var selection = view.state.selection;\n var container = useRef(null);\n var style = calculateStyle(view, container);\n var pos = calculateArrowPos(view, container);\n var inlineMenu = getActiveInlineMenu({\n blockMenu: blockMenu,\n view: view\n });\n if (!selection || selection.empty) {\n return React.createElement(React.Fragment, null);\n }\n if (menu.length === 0) {\n return React.createElement(React.Fragment, null);\n }\n return React.createElement(\"div\", {\n style: style,\n ref: container,\n className: \"smartblock-inline-menu\"\n }, React.createElement(\"div\", {\n className: \"smartblock-inline-menu-arrow\",\n style: {\n left: \"\".concat(pos, \"px\")\n }\n }), React.createElement(\"div\", {\n className: \"smartblock-inline-menu-inner\"\n }, children, menu.map(function (item, key) {\n return React.createElement(button_1.default, {\n key: \"inline-\".concat(key),\n type: \"button\",\n active: item.active && item.active(state),\n // title={item.title}\n disabled: item.enable && !item.enable(state),\n onClick: function (e) {\n e.preventDefault();\n item.onClick(state, dispatch);\n }\n }, typeof item.icon !== 'string' ? item.icon : React.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: item.icon\n }\n }));\n }), inlineMenu && inlineMenu.props && inlineMenu.props.children && React.createElement(React.Fragment, null, inlineMenu)));\n};\nexports.default = MenuBar;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar paragraph_1 = require(\"./paragraph\");\nvar trash_1 = require(\"./trash\");\nvar move_up_1 = require(\"./move-up\");\nvar move_down_1 = require(\"./move-down\");\nvar default_keys_1 = require(\"./default-keys\");\nvar default_plugins_1 = require(\"./default-plugins\");\nexports.default = [\n// blocks\nnew paragraph_1.default(), new move_down_1.default(), new move_up_1.default(), new trash_1.default(), new default_keys_1.default(), new default_plugins_1.default()];","/**\n * EvEmitter v1.1.0\n * Lil' event emitter\n * MIT License\n */\n\n/* jshint unused: true, undef: true, strict: true */\n\n(function (global, factory) {\n // universal module definition\n /* jshint strict: false */ /* globals define, module, window */\n if (typeof define == 'function' && define.amd) {\n // AMD - RequireJS\n define(factory);\n } else if (typeof module == 'object' && module.exports) {\n // CommonJS - Browserify, Webpack\n module.exports = factory();\n } else {\n // Browser globals\n global.EvEmitter = factory();\n }\n})(typeof window != 'undefined' ? window : this, function () {\n \"use strict\";\n\n function EvEmitter() {}\n var proto = EvEmitter.prototype;\n proto.on = function (eventName, listener) {\n if (!eventName || !listener) {\n return;\n }\n // set events hash\n var events = this._events = this._events || {};\n // set listeners array\n var listeners = events[eventName] = events[eventName] || [];\n // only add once\n if (listeners.indexOf(listener) == -1) {\n listeners.push(listener);\n }\n return this;\n };\n proto.once = function (eventName, listener) {\n if (!eventName || !listener) {\n return;\n }\n // add event\n this.on(eventName, listener);\n // set once flag\n // set onceEvents hash\n var onceEvents = this._onceEvents = this._onceEvents || {};\n // set onceListeners object\n var onceListeners = onceEvents[eventName] = onceEvents[eventName] || {};\n // set flag\n onceListeners[listener] = true;\n return this;\n };\n proto.off = function (eventName, listener) {\n var listeners = this._events && this._events[eventName];\n if (!listeners || !listeners.length) {\n return;\n }\n var index = listeners.indexOf(listener);\n if (index != -1) {\n listeners.splice(index, 1);\n }\n return this;\n };\n proto.emitEvent = function (eventName, args) {\n var listeners = this._events && this._events[eventName];\n if (!listeners || !listeners.length) {\n return;\n }\n // copy over to avoid interference if .off() in listener\n listeners = listeners.slice(0);\n args = args || [];\n // once stuff\n var onceListeners = this._onceEvents && this._onceEvents[eventName];\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n var isOnce = onceListeners && onceListeners[listener];\n if (isOnce) {\n // remove listener\n // remove before trigger to prevent recursion\n this.off(eventName, listener);\n // unset once flag\n delete onceListeners[listener];\n }\n // trigger listener\n listener.apply(this, args);\n }\n return this;\n };\n proto.allOff = function () {\n delete this._events;\n delete this._onceEvents;\n };\n return EvEmitter;\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar imagesloaded_1 = require(\"imagesloaded\");\nvar utils_1 = require(\"../utils\");\nvar useState = React.useState,\n useEffect = React.useEffect;\nvar getCustomLayout = function (props) {\n var menu = props.menu,\n view = props.view;\n var node = (0, utils_1.getParentNodeFromState)(view.state);\n if (!node || !menu || !menu.length) {\n return;\n }\n var name = node.type.name;\n var selectedItem = menu.find(function (item) {\n if (item.name === name) {\n return true;\n }\n return false;\n });\n if (!selectedItem) {\n return null;\n }\n if (selectedItem.customLayout) {\n return selectedItem.customLayout;\n }\n return null;\n};\nvar useImagesLoaded = function (dom) {\n var _a = useState({\n top: 0,\n left: 0,\n width: 0,\n height: 0\n }),\n size = _a[0],\n setSize = _a[1];\n useEffect(function () {\n (0, imagesloaded_1.default)(dom, function () {\n var newSize = dom.getBoundingClientRect();\n if (size.height !== newSize.height) {\n setSize(newSize);\n }\n });\n });\n return size;\n};\nexports.default = function (props) {\n var customLayout = getCustomLayout(props);\n if (!customLayout) {\n return null;\n }\n var view = props.view;\n var pos = (0, utils_1.calculateStyle)(props.view);\n var parentNode = (0, utils_1.getParentNodeFromState)(view.state);\n var parentPos = (0, utils_1.findNodePosition)(view.state.doc, parentNode);\n var dom = view.nodeDOM(parentPos);\n var style = {\n position: 'absolute',\n zIndex: 10,\n top: pos.top,\n left: 0,\n right: 0\n };\n var size = useImagesLoaded(dom);\n if (!size.height) {\n return null;\n }\n return React.createElement(\"div\", {\n style: style\n }, customLayout(props.view, dom));\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_utils_1 = require(\"prosemirror-utils\");\nvar utils_1 = require(\"../utils\");\nvar button_1 = require(\"./button\");\nvar useState = React.useState,\n useEffect = React.useEffect;\nvar getContainerOffset = function (container) {\n return (0, utils_1.getOffset)(container).top;\n};\nvar calculateStyle = function (props) {\n var view = props.view;\n var state = view.state;\n var selection = state.selection;\n if (!selection) {\n return {\n top: -1000\n };\n }\n var $anchor = selection.$anchor;\n var resolvedPos = state.doc.resolve($anchor.pos);\n var rowNumber = resolvedPos.path[1];\n var i = 0;\n if ($anchor.pos === 0) {\n return {\n top: -1000\n };\n }\n var firstNode = (0, prosemirror_utils_1.findChildren)(state.doc, function (_node) {\n if (rowNumber === i || rowNumber + 1 === i) {\n i++;\n return true;\n }\n i++;\n return false;\n }, false)[0];\n if (!firstNode) {\n return {\n top: -1000\n };\n }\n var coords = view.coordsAtPos(firstNode.pos);\n var dom = view.nodeDOM(firstNode.pos);\n var elementTop = (0, utils_1.getOffset)(dom).top;\n var offsetTop = getContainerOffset(view.dom);\n if (coords.top === 0) {\n return {\n top: -1000\n };\n }\n return {\n right: 20,\n top: elementTop - offsetTop - 40\n };\n};\nexports.default = function (props) {\n var _a = useState({\n right: 20,\n top: 0\n }),\n style = _a[0],\n setState = _a[1];\n var menu = props.menu,\n view = props.view;\n var state = view.state,\n dispatch = view.dispatch;\n useEffect(function () {\n var nextStyle = calculateStyle(props);\n setState(nextStyle);\n }, [props]);\n return React.createElement(\"div\", {\n style: style,\n className: \"smartblock-edit-menu\"\n }, menu.map(function (item, key) {\n return React.createElement(button_1.default, {\n className: \"smartblock-edit-btn\",\n key: \"edit-\".concat(key),\n type: \"button\",\n color: item.btnColor,\n active: item.active && item.active(state),\n disabled: item.enable && !item.enable(state),\n onClick: function (e) {\n e.preventDefault();\n item.onClick(state, dispatch, view);\n }\n }, item.icon);\n }));\n};","/**\n * Module dependencies.\n */\n\nvar Emitter = require('emitter');\nvar clone = require('clone');\nvar type = require('type');\nvar ease = require('ease');\n\n/**\n * Expose `Tween`.\n */\n\nmodule.exports = Tween;\n\n/**\n * Initialize a new `Tween` with `obj`.\n *\n * @param {Object|Array} obj\n * @api public\n */\n\nfunction Tween(obj) {\n if (!(this instanceof Tween)) return new Tween(obj);\n this._from = obj;\n this.ease('linear');\n this.duration(500);\n}\n\n/**\n * Mixin emitter.\n */\n\nEmitter(Tween.prototype);\n\n/**\n * Reset the tween.\n *\n * @api public\n */\n\nTween.prototype.reset = function () {\n this.isArray = 'array' === type(this._from);\n this._curr = clone(this._from);\n this._done = false;\n this._start = Date.now();\n return this;\n};\n\n/**\n * Tween to `obj` and reset internal state.\n *\n * tween.to({ x: 50, y: 100 })\n *\n * @param {Object|Array} obj\n * @return {Tween} self\n * @api public\n */\n\nTween.prototype.to = function (obj) {\n this.reset();\n this._to = obj;\n return this;\n};\n\n/**\n * Set duration to `ms` [500].\n *\n * @param {Number} ms\n * @return {Tween} self\n * @api public\n */\n\nTween.prototype.duration = function (ms) {\n this._duration = ms;\n return this;\n};\n\n/**\n * Set easing function to `fn`.\n *\n * tween.ease('in-out-sine')\n *\n * @param {String|Function} fn\n * @return {Tween}\n * @api public\n */\n\nTween.prototype.ease = function (fn) {\n fn = 'function' == typeof fn ? fn : ease[fn];\n if (!fn) throw new TypeError('invalid easing function');\n this._ease = fn;\n return this;\n};\n\n/**\n * Stop the tween and immediately emit \"stop\" and \"end\".\n *\n * @return {Tween}\n * @api public\n */\n\nTween.prototype.stop = function () {\n this.stopped = true;\n this._done = true;\n this.emit('stop');\n this.emit('end');\n return this;\n};\n\n/**\n * Perform a step.\n *\n * @return {Tween} self\n * @api private\n */\n\nTween.prototype.step = function () {\n if (this._done) return;\n\n // duration\n var duration = this._duration;\n var now = Date.now();\n var delta = now - this._start;\n var done = delta >= duration;\n\n // complete\n if (done) {\n this._from = this._to;\n this._update(this._to);\n this._done = true;\n this.emit('end');\n return this;\n }\n\n // tween\n var from = this._from;\n var to = this._to;\n var curr = this._curr;\n var fn = this._ease;\n var p = (now - this._start) / duration;\n var n = fn(p);\n\n // array\n if (this.isArray) {\n for (var i = 0; i < from.length; ++i) {\n curr[i] = from[i] + (to[i] - from[i]) * n;\n }\n this._update(curr);\n return this;\n }\n\n // objech\n for (var k in from) {\n curr[k] = from[k] + (to[k] - from[k]) * n;\n }\n this._update(curr);\n return this;\n};\n\n/**\n * Set update function to `fn` or\n * when no argument is given this performs\n * a \"step\".\n *\n * @param {Function} fn\n * @return {Tween} self\n * @api public\n */\n\nTween.prototype.update = function (fn) {\n if (0 == arguments.length) return this.step();\n this._update = fn;\n return this;\n};","/**\n * Expose `requestAnimationFrame()`.\n */\n\nexports = module.exports = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || fallback;\n\n/**\n * Fallback implementation.\n */\n\nvar prev = new Date().getTime();\nfunction fallback(fn) {\n var curr = new Date().getTime();\n var ms = Math.max(0, 16 - (curr - prev));\n var req = setTimeout(fn, ms);\n prev = curr;\n return req;\n}\n\n/**\n * Cancel.\n */\n\nvar cancel = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.clearTimeout;\nexports.cancel = function (id) {\n cancel.call(window, id);\n};","/**\n * Expose `Emitter`.\n */\n\nmodule.exports = Emitter;\n\n/**\n * Initialize a new `Emitter`.\n *\n * @api public\n */\n\nfunction Emitter(obj) {\n if (obj) return mixin(obj);\n}\n;\n\n/**\n * Mixin the emitter properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n return obj;\n}\n\n/**\n * Listen on the given `event` with `fn`.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) {\n this._callbacks = this._callbacks || {};\n (this._callbacks['$' + event] = this._callbacks['$' + event] || []).push(fn);\n return this;\n};\n\n/**\n * Adds an `event` listener that will be invoked a single\n * time then automatically removed.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.once = function (event, fn) {\n function on() {\n this.off(event, on);\n fn.apply(this, arguments);\n }\n on.fn = fn;\n this.on(event, on);\n return this;\n};\n\n/**\n * Remove the given callback for `event` or all\n * registered callbacks.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) {\n this._callbacks = this._callbacks || {};\n\n // all\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n }\n\n // specific event\n var callbacks = this._callbacks['$' + event];\n if (!callbacks) return this;\n\n // remove all handlers\n if (1 == arguments.length) {\n delete this._callbacks['$' + event];\n return this;\n }\n\n // remove specific handler\n var cb;\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n return this;\n};\n\n/**\n * Emit `event` with the given args.\n *\n * @param {String} event\n * @param {Mixed} ...\n * @return {Emitter}\n */\n\nEmitter.prototype.emit = function (event) {\n this._callbacks = this._callbacks || {};\n var args = [].slice.call(arguments, 1),\n callbacks = this._callbacks['$' + event];\n if (callbacks) {\n callbacks = callbacks.slice(0);\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n return this;\n};\n\n/**\n * Return array of callbacks for `event`.\n *\n * @param {String} event\n * @return {Array}\n * @api public\n */\n\nEmitter.prototype.listeners = function (event) {\n this._callbacks = this._callbacks || {};\n return this._callbacks['$' + event] || [];\n};\n\n/**\n * Check if this emitter has `event` handlers.\n *\n * @param {String} event\n * @return {Boolean}\n * @api public\n */\n\nEmitter.prototype.hasListeners = function (event) {\n return !!this.listeners(event).length;\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar hooks_1 = require(\"../utils/hooks\");\nvar useRef = React.useRef,\n useEffect = React.useEffect;\nexports.default = function (props) {\n var editorRef = useRef(null);\n var view = (0, hooks_1.useView)(props);\n // Object.keys(props.options).forEach((key) => console.log(key, {...props.options[key]}))\n useEffect(function () {\n if (editorRef.current) {\n editorRef.current.appendChild(view.dom);\n }\n if (props.autoFocus) {\n view.focus();\n }\n }, []);\n var scrolling = (0, hooks_1.useScrolling)(editorRef, 300);\n var editor = React.createElement(\"div\", {\n ref: editorRef\n });\n return props.render({\n editor: editor,\n view: view,\n scrolling: scrolling\n });\n};","/**\n * Module dependencies.\n */\n\nvar type;\ntry {\n type = require('component-type');\n} catch (_) {\n type = require('type');\n}\n\n/**\n * Module exports.\n */\n\nmodule.exports = clone;\n\n/**\n * Clones objects.\n *\n * @param {Mixed} any object\n * @api public\n */\n\nfunction clone(obj) {\n switch (type(obj)) {\n case 'object':\n var copy = {};\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n copy[key] = clone(obj[key]);\n }\n }\n return copy;\n case 'array':\n var copy = new Array(obj.length);\n for (var i = 0, l = obj.length; i < l; i++) {\n copy[i] = clone(obj[i]);\n }\n return copy;\n case 'regexp':\n // from millermedeiros/amd-utils - MIT\n var flags = '';\n flags += obj.multiline ? 'm' : '';\n flags += obj.global ? 'g' : '';\n flags += obj.ignoreCase ? 'i' : '';\n return new RegExp(obj.source, flags);\n case 'date':\n return new Date(obj.getTime());\n default:\n // string, number, boolean, …\n return obj;\n }\n}","// easing functions from \"Tween.js\"\n\nexports.linear = function (n) {\n return n;\n};\nexports.inQuad = function (n) {\n return n * n;\n};\nexports.outQuad = function (n) {\n return n * (2 - n);\n};\nexports.inOutQuad = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n;\n return -0.5 * (--n * (n - 2) - 1);\n};\nexports.inCube = function (n) {\n return n * n * n;\n};\nexports.outCube = function (n) {\n return --n * n * n + 1;\n};\nexports.inOutCube = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n * n;\n return 0.5 * ((n -= 2) * n * n + 2);\n};\nexports.inQuart = function (n) {\n return n * n * n * n;\n};\nexports.outQuart = function (n) {\n return 1 - --n * n * n * n;\n};\nexports.inOutQuart = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n * n * n;\n return -0.5 * ((n -= 2) * n * n * n - 2);\n};\nexports.inQuint = function (n) {\n return n * n * n * n * n;\n};\nexports.outQuint = function (n) {\n return --n * n * n * n * n + 1;\n};\nexports.inOutQuint = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n * n * n * n;\n return 0.5 * ((n -= 2) * n * n * n * n + 2);\n};\nexports.inSine = function (n) {\n return 1 - Math.cos(n * Math.PI / 2);\n};\nexports.outSine = function (n) {\n return Math.sin(n * Math.PI / 2);\n};\nexports.inOutSine = function (n) {\n return .5 * (1 - Math.cos(Math.PI * n));\n};\nexports.inExpo = function (n) {\n return 0 == n ? 0 : Math.pow(1024, n - 1);\n};\nexports.outExpo = function (n) {\n return 1 == n ? n : 1 - Math.pow(2, -10 * n);\n};\nexports.inOutExpo = function (n) {\n if (0 == n) return 0;\n if (1 == n) return 1;\n if ((n *= 2) < 1) return .5 * Math.pow(1024, n - 1);\n return .5 * (-Math.pow(2, -10 * (n - 1)) + 2);\n};\nexports.inCirc = function (n) {\n return 1 - Math.sqrt(1 - n * n);\n};\nexports.outCirc = function (n) {\n return Math.sqrt(1 - --n * n);\n};\nexports.inOutCirc = function (n) {\n n *= 2;\n if (n < 1) return -0.5 * (Math.sqrt(1 - n * n) - 1);\n return 0.5 * (Math.sqrt(1 - (n -= 2) * n) + 1);\n};\nexports.inBack = function (n) {\n var s = 1.70158;\n return n * n * ((s + 1) * n - s);\n};\nexports.outBack = function (n) {\n var s = 1.70158;\n return --n * n * ((s + 1) * n + s) + 1;\n};\nexports.inOutBack = function (n) {\n var s = 1.70158 * 1.525;\n if ((n *= 2) < 1) return 0.5 * (n * n * ((s + 1) * n - s));\n return 0.5 * ((n -= 2) * n * ((s + 1) * n + s) + 2);\n};\nexports.inBounce = function (n) {\n return 1 - exports.outBounce(1 - n);\n};\nexports.outBounce = function (n) {\n if (n < 1 / 2.75) {\n return 7.5625 * n * n;\n } else if (n < 2 / 2.75) {\n return 7.5625 * (n -= 1.5 / 2.75) * n + 0.75;\n } else if (n < 2.5 / 2.75) {\n return 7.5625 * (n -= 2.25 / 2.75) * n + 0.9375;\n } else {\n return 7.5625 * (n -= 2.625 / 2.75) * n + 0.984375;\n }\n};\nexports.inOutBounce = function (n) {\n if (n < .5) return exports.inBounce(n * 2) * .5;\n return exports.outBounce(n * 2 - 1) * .5 + .5;\n};\n\n// aliases\n\nexports['in-quad'] = exports.inQuad;\nexports['out-quad'] = exports.outQuad;\nexports['in-out-quad'] = exports.inOutQuad;\nexports['in-cube'] = exports.inCube;\nexports['out-cube'] = exports.outCube;\nexports['in-out-cube'] = exports.inOutCube;\nexports['in-quart'] = exports.inQuart;\nexports['out-quart'] = exports.outQuart;\nexports['in-out-quart'] = exports.inOutQuart;\nexports['in-quint'] = exports.inQuint;\nexports['out-quint'] = exports.outQuint;\nexports['in-out-quint'] = exports.inOutQuint;\nexports['in-sine'] = exports.inSine;\nexports['out-sine'] = exports.outSine;\nexports['in-out-sine'] = exports.inOutSine;\nexports['in-expo'] = exports.inExpo;\nexports['out-expo'] = exports.outExpo;\nexports['in-out-expo'] = exports.inOutExpo;\nexports['in-circ'] = exports.inCirc;\nexports['out-circ'] = exports.outCirc;\nexports['in-out-circ'] = exports.inOutCirc;\nexports['in-back'] = exports.inBack;\nexports['out-back'] = exports.outBack;\nexports['in-out-back'] = exports.inOutBack;\nexports['in-bounce'] = exports.inBounce;\nexports['out-bounce'] = exports.outBounce;\nexports['in-out-bounce'] = exports.inOutBounce;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_history_1 = require(\"prosemirror-history\");\nvar undo_1 = require(\"./icons/undo\");\nexports.default = function (props) {\n var _a = props.view,\n state = _a.state,\n dispatch = _a.dispatch;\n var depth = (0, prosemirror_history_1.undoDepth)(state);\n if (!depth) {\n return React.createElement(React.Fragment, null);\n }\n return React.createElement(\"button\", {\n className: \"smartblock-backbtn\",\n onClick: function () {\n (0, prosemirror_history_1.undo)(state, dispatch);\n }\n }, React.createElement(undo_1.default, {\n style: {\n width: '24px',\n height: '24px'\n }\n }));\n};","/**\n * toString ref.\n */\n\nvar toString = Object.prototype.toString;\n\n/**\n * Return the type of `val`.\n *\n * @param {Mixed} val\n * @return {String}\n * @api public\n */\n\nmodule.exports = function (val) {\n switch (toString.call(val)) {\n case '[object Date]':\n return 'date';\n case '[object RegExp]':\n return 'regexp';\n case '[object Arguments]':\n return 'arguments';\n case '[object Array]':\n return 'array';\n case '[object Error]':\n return 'error';\n }\n if (val === null) return 'null';\n if (val === undefined) return 'undefined';\n if (val !== val) return 'nan';\n if (val && val.nodeType === 1) return 'element';\n val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);\n return typeof val;\n};","/*!\n * imagesLoaded v4.1.4\n * JavaScript is all like \"You images are done yet or what?\"\n * MIT License\n */\n\n(function (window, factory) {\n 'use strict';\n\n // universal module definition\n\n /*global define: false, module: false, require: false */\n if (typeof define == 'function' && define.amd) {\n // AMD\n define(['ev-emitter/ev-emitter'], function (EvEmitter) {\n return factory(window, EvEmitter);\n });\n } else if (typeof module == 'object' && module.exports) {\n // CommonJS\n module.exports = factory(window, require('ev-emitter'));\n } else {\n // browser global\n window.imagesLoaded = factory(window, window.EvEmitter);\n }\n})(typeof window !== 'undefined' ? window : this,\n// -------------------------- factory -------------------------- //\n\nfunction factory(window, EvEmitter) {\n 'use strict';\n\n var $ = window.jQuery;\n var console = window.console;\n\n // -------------------------- helpers -------------------------- //\n\n // extend objects\n function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }\n var arraySlice = Array.prototype.slice;\n\n // turn element or nodeList into an array\n function makeArray(obj) {\n if (Array.isArray(obj)) {\n // use object if already an array\n return obj;\n }\n var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';\n if (isArrayLike) {\n // convert nodeList to array\n return arraySlice.call(obj);\n }\n\n // array of single index\n return [obj];\n }\n\n // -------------------------- imagesLoaded -------------------------- //\n\n /**\n * @param {Array, Element, NodeList, String} elem\n * @param {Object or Function} options - if function, use as callback\n * @param {Function} onAlways - callback function\n */\n function ImagesLoaded(elem, options, onAlways) {\n // coerce ImagesLoaded() without new, to be new ImagesLoaded()\n if (!(this instanceof ImagesLoaded)) {\n return new ImagesLoaded(elem, options, onAlways);\n }\n // use elem as selector string\n var queryElem = elem;\n if (typeof elem == 'string') {\n queryElem = document.querySelectorAll(elem);\n }\n // bail if bad element\n if (!queryElem) {\n console.error('Bad element for imagesLoaded ' + (queryElem || elem));\n return;\n }\n this.elements = makeArray(queryElem);\n this.options = extend({}, this.options);\n // shift arguments if no options set\n if (typeof options == 'function') {\n onAlways = options;\n } else {\n extend(this.options, options);\n }\n if (onAlways) {\n this.on('always', onAlways);\n }\n this.getImages();\n if ($) {\n // add jQuery Deferred object\n this.jqDeferred = new $.Deferred();\n }\n\n // HACK check async to allow time to bind listeners\n setTimeout(this.check.bind(this));\n }\n ImagesLoaded.prototype = Object.create(EvEmitter.prototype);\n ImagesLoaded.prototype.options = {};\n ImagesLoaded.prototype.getImages = function () {\n this.images = [];\n\n // filter & find items if we have an item selector\n this.elements.forEach(this.addElementImages, this);\n };\n\n /**\n * @param {Node} element\n */\n ImagesLoaded.prototype.addElementImages = function (elem) {\n // filter siblings\n if (elem.nodeName == 'IMG') {\n this.addImage(elem);\n }\n // get background image on element\n if (this.options.background === true) {\n this.addElementBackgroundImages(elem);\n }\n\n // find children\n // no non-element nodes, #143\n var nodeType = elem.nodeType;\n if (!nodeType || !elementNodeTypes[nodeType]) {\n return;\n }\n var childImgs = elem.querySelectorAll('img');\n // concat childElems to filterFound array\n for (var i = 0; i < childImgs.length; i++) {\n var img = childImgs[i];\n this.addImage(img);\n }\n\n // get child background images\n if (typeof this.options.background == 'string') {\n var children = elem.querySelectorAll(this.options.background);\n for (i = 0; i < children.length; i++) {\n var child = children[i];\n this.addElementBackgroundImages(child);\n }\n }\n };\n var elementNodeTypes = {\n 1: true,\n 9: true,\n 11: true\n };\n ImagesLoaded.prototype.addElementBackgroundImages = function (elem) {\n var style = getComputedStyle(elem);\n if (!style) {\n // Firefox returns null if in a hidden iframe https://bugzil.la/548397\n return;\n }\n // get url inside url(\"...\")\n var reURL = /url\\((['\"])?(.*?)\\1\\)/gi;\n var matches = reURL.exec(style.backgroundImage);\n while (matches !== null) {\n var url = matches && matches[2];\n if (url) {\n this.addBackground(url, elem);\n }\n matches = reURL.exec(style.backgroundImage);\n }\n };\n\n /**\n * @param {Image} img\n */\n ImagesLoaded.prototype.addImage = function (img) {\n var loadingImage = new LoadingImage(img);\n this.images.push(loadingImage);\n };\n ImagesLoaded.prototype.addBackground = function (url, elem) {\n var background = new Background(url, elem);\n this.images.push(background);\n };\n ImagesLoaded.prototype.check = function () {\n var _this = this;\n this.progressedCount = 0;\n this.hasAnyBroken = false;\n // complete if no images\n if (!this.images.length) {\n this.complete();\n return;\n }\n function onProgress(image, elem, message) {\n // HACK - Chrome triggers event before object properties have changed. #83\n setTimeout(function () {\n _this.progress(image, elem, message);\n });\n }\n this.images.forEach(function (loadingImage) {\n loadingImage.once('progress', onProgress);\n loadingImage.check();\n });\n };\n ImagesLoaded.prototype.progress = function (image, elem, message) {\n this.progressedCount++;\n this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;\n // progress event\n this.emitEvent('progress', [this, image, elem]);\n if (this.jqDeferred && this.jqDeferred.notify) {\n this.jqDeferred.notify(this, image);\n }\n // check if completed\n if (this.progressedCount == this.images.length) {\n this.complete();\n }\n if (this.options.debug && console) {\n console.log('progress: ' + message, image, elem);\n }\n };\n ImagesLoaded.prototype.complete = function () {\n var eventName = this.hasAnyBroken ? 'fail' : 'done';\n this.isComplete = true;\n this.emitEvent(eventName, [this]);\n this.emitEvent('always', [this]);\n if (this.jqDeferred) {\n var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';\n this.jqDeferred[jqMethod](this);\n }\n };\n\n // -------------------------- -------------------------- //\n\n function LoadingImage(img) {\n this.img = img;\n }\n LoadingImage.prototype = Object.create(EvEmitter.prototype);\n LoadingImage.prototype.check = function () {\n // If complete is true and browser supports natural sizes,\n // try to check for image status manually.\n var isComplete = this.getIsImageComplete();\n if (isComplete) {\n // report based on naturalWidth\n this.confirm(this.img.naturalWidth !== 0, 'naturalWidth');\n return;\n }\n\n // If none of the checks above matched, simulate loading on detached element.\n this.proxyImage = new Image();\n this.proxyImage.addEventListener('load', this);\n this.proxyImage.addEventListener('error', this);\n // bind to image as well for Firefox. #191\n this.img.addEventListener('load', this);\n this.img.addEventListener('error', this);\n this.proxyImage.src = this.img.src;\n };\n LoadingImage.prototype.getIsImageComplete = function () {\n // check for non-zero, non-undefined naturalWidth\n // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671\n return this.img.complete && this.img.naturalWidth;\n };\n LoadingImage.prototype.confirm = function (isLoaded, message) {\n this.isLoaded = isLoaded;\n this.emitEvent('progress', [this, this.img, message]);\n };\n\n // ----- events ----- //\n\n // trigger specified handler for event type\n LoadingImage.prototype.handleEvent = function (event) {\n var method = 'on' + event.type;\n if (this[method]) {\n this[method](event);\n }\n };\n LoadingImage.prototype.onload = function () {\n this.confirm(true, 'onload');\n this.unbindEvents();\n };\n LoadingImage.prototype.onerror = function () {\n this.confirm(false, 'onerror');\n this.unbindEvents();\n };\n LoadingImage.prototype.unbindEvents = function () {\n this.proxyImage.removeEventListener('load', this);\n this.proxyImage.removeEventListener('error', this);\n this.img.removeEventListener('load', this);\n this.img.removeEventListener('error', this);\n };\n\n // -------------------------- Background -------------------------- //\n\n function Background(url, element) {\n this.url = url;\n this.element = element;\n this.img = new Image();\n }\n\n // inherit LoadingImage prototype\n Background.prototype = Object.create(LoadingImage.prototype);\n Background.prototype.check = function () {\n this.img.addEventListener('load', this);\n this.img.addEventListener('error', this);\n this.img.src = this.url;\n // check if image is already complete\n var isComplete = this.getIsImageComplete();\n if (isComplete) {\n this.confirm(this.img.naturalWidth !== 0, 'naturalWidth');\n this.unbindEvents();\n }\n };\n Background.prototype.unbindEvents = function () {\n this.img.removeEventListener('load', this);\n this.img.removeEventListener('error', this);\n };\n Background.prototype.confirm = function (isLoaded, message) {\n this.isLoaded = isLoaded;\n this.emitEvent('progress', [this, this.element, message]);\n };\n\n // -------------------------- jQuery -------------------------- //\n\n ImagesLoaded.makeJQueryPlugin = function (jQuery) {\n jQuery = jQuery || window.jQuery;\n if (!jQuery) {\n return;\n }\n // set local variable\n $ = jQuery;\n // $().imagesLoaded()\n $.fn.imagesLoaded = function (options, callback) {\n var instance = new ImagesLoaded(this, options, callback);\n return instance.jqDeferred.promise($(this));\n };\n };\n // try making plugin\n ImagesLoaded.makeJQueryPlugin();\n\n // -------------------------- -------------------------- //\n\n return ImagesLoaded;\n});"],"sourceRoot":""} \ No newline at end of file diff --git a/11-f27a7d9ed9a6edfcb278.js b/11-f27a7d9ed9a6edfcb278.js new file mode 100644 index 0000000..34b4c74 --- /dev/null +++ b/11-f27a7d9ed9a6edfcb278.js @@ -0,0 +1,3 @@ +/*! For license information please see 11-f27a7d9ed9a6edfcb278.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{"+y9Y":function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=l){if(!/iPod|iPhone|iPad/.test(navigator.platform)||!document.activeElement)return(0,c.default)(0,f-80,{duration:300}),!0;if(document.activeElement.isContentEditable)return(0,c.default)(0,f-80,{duration:300}),!0}}}if(n.onChange){var h=(0,b.getHtmlFromNode)(a,r),d={json:a.toJSON(),html:h,schema:r};if(n.outputMarkdown&&o){var p=new o.Converter;p.setFlavor("github"),d.markdown=p.makeMd(h)}n.onChange(d)}if(n.autoSave){var m=location.pathname;h=(0,b.getHtmlFromNode)(a,r);localStorage.setItem("smartblock:".concat(m),h)}var v=a.content.childCount,g=a.content.child(v-1);if("paragraph"!==g.type.name){var y=t.schema.nodes.paragraph;e(t.tr.insert(t.doc.content.size,y.createAndFill()))}else if(0!==g.textContent.length){y=t.schema.nodes.paragraph;e(t.tr.insert(t.doc.content.size,y.createAndFill()))}return!1})(e,n,t,N,U,j)&&setTimeout((function(){R(!0)}),700)},render:function(t){var e=t.editor,n=t.view;return t.scrolling&&R(!1),o.createElement(o.Fragment,null,H&&o.createElement(o.Fragment,null,o.createElement(m.default,{view:n,menu:M($)}),o.createElement(p.default,{view:n,menu:M(X)}),function(t,e){var n=(0,b.getParentNodeFromState)(t.state),r=e.find((function(t){return t.name===n.type.name}));return!r||!r.hideInlineMenuOnFocus}(n,$)&&o.createElement(d.default,{menu:M(J),blockMenu:M($),view:n}),o.createElement(g.default,{view:n,menu:M($)}),u&&o.createElement(v.default,{view:n})),e)}}))))))}},"2wj0":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useScrolling=e.useScroll=e.useView=e.useForceUpdate=void 0;var r=n("q1tI"),i=n("b/sn"),o=n("Pc+3"),a=n("rNiN");e.useForceUpdate=function(){var t=(0,r.useState)(0)[1];return function(){t((function(t){return t+1}))}};e.useView=function(t){var n=(0,e.useForceUpdate)();return(0,r.useMemo)((function(){var e=new o.EditorView(null,{state:i.EditorState.create(t.options),dispatchTransaction:function(r){var i=e.state.applyTransaction(r),o=i.state,a=i.transactions;e.updateState(o),a.some((function(t){return t.docChanged}))&&t.onChange(o,e.dispatch),n()},attributes:t.attributes,nodeViews:t.nodeViews});return t.onChange(e.state,e.dispatch),e}),[])};e.useScroll=function(){var t=(0,r.useState)((0,a.getScrollTop)()),e=t[0],n=t[1];return(0,r.useEffect)((function(){var t=function(){n((0,a.getScrollTop)())};return window.addEventListener("scroll",t),function(){window.removeEventListener("scroll",t)}}),[e]),e};e.useScrolling=function(t,e){var n=(0,r.useState)(!1),i=n[0],o=n[1];return(0,r.useEffect)((function(){var n=null,r=0;if(t.current){var a=t.current.getBoundingClientRect().top,u=setInterval((function(){var u=t.current.getBoundingClientRect().top;u!==a&&(a=u,3===++r&&!1===i&&(r=0,o(!0)),clearTimeout(n),n=setTimeout((function(){o(!1),r=0}),e))}),100);return function(){clearInterval(u)}}}),[]),i}},"346+":function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n(.*)<\/h1>/,"$1"),t.onChange(n)}},options:{schema:h,doc:p,plugins:[(0,s.placeholderPlugin)({placeholder:t.placeholder||e.placeholder})]}},v=(0,u.useView)(m);return l((function(){n.current&&n.current.appendChild(v.dom)}),[]),i.createElement("div",{ref:n,className:"smartblock-title"})}},"5/KJ":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("q1tI"),i=n("mG1W"),o=n("rNiN"),a=n("y4gM"),u=r.useState,s=r.useEffect;e.default=function(t){var e=t.menu,n=t.view,c=n.state,l=n.dispatch,f=function(t){var e=t.menu,n=t.view,i=n.state,o=e.find((function(t){return!(!t.active||!t.active(i))}));return o&&o.customMenu?r.createElement(r.Fragment,null,o.customMenu(n)):r.createElement(r.Fragment,null)}(t),h=function(t){var e=t.menu,n=t.view,r=(0,o.getParentNodeFromState)(n.state);if(r&&e&&e.length){var i=r.type.name,a=e.find((function(t){return t.name===i}));return!a||!a.hideMenuOnFocus}}(t),d=u({left:0,top:0}),p=d[0],m=d[1];if(s((function(){var e=function(t){var e=t.view,n=e.state,r=n.selection;if(!r||!r.empty)return{top:-1e3,right:0};var a=r.$anchor;if(0===a.pos)return{top:-1e3,right:0};var u=n.doc.resolve(a.pos).path[1],s=0,c=(0,i.findChildren)(n.doc,(function(t){return u===s||u+1===s?(s++,!0):(s++,!1)}),!1)[0];if(!c)return{top:-1e3};var l=e.coordsAtPos(c.pos),f=e.nodeDOM(c.pos),h=(0,o.getOffset)(f).top,d=(0,o.getOffset)(e.dom).top;return 0===l.top?{top:-1e3}:f&&f.offsetHeight?{left:5,top:h+f.offsetHeight-d+20}:{left:5,top:h-d+20}}(t);m(e)}),[t]),!h)return null;var v=!1,g=e.find((function(t){return!(!t.active||!t.active(c))}));return g&&g.hideBlockMenuOnFocus&&(v=!0),r.createElement("div",{style:p,className:"smartblock-menu"},r.createElement("div",{className:"smartblock-menu-top"},e.map((function(t,e){return t.customButton?t.customButton({state:c,dispatch:l}):r.createElement(a.default,{key:e,type:"button",active:t.active&&t.active(c),disabled:t.enable&&!t.enable(c)||v,onClick:function(e){e.preventDefault(),t.onClick(c,l,n)}},"string"!=typeof t.icon?t.icon:r.createElement("span",{dangerouslySetInnerHTML:{__html:t.icon}}))}))),f&&f.props&&f.props.children&&r.createElement("div",{className:"smartblock-custom-menu"},f))}},"7ILL":function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;nwindow.innerWidth)return{top:u,left:window.innerWidth-c}}return{left:s,top:u}}(s,h),p=function(t,e){var n=t.state.selection,r=(0,i.getOffset)(t.dom).left,o=t.coordsAtPos(n.$head.pos).left-50-r,a=e.current?e.current.offsetWidth:0;return e&&e.current&&e.current.offsetWidth&&o+a>window.innerWidth?o-window.innerWidth+a:20}(s,h),m=function(t){var e=t.blockMenu,n=t.view,i=n.state,o=e.find((function(t){return!(!t.active||!t.active(i))}));return!(!o||!o.customInlineMenu)&&r.createElement(r.Fragment,null,o.customInlineMenu(n))}({blockMenu:n,view:s});return!f||f.empty||0===e.length?r.createElement(r.Fragment,null):r.createElement("div",{style:d,ref:h,className:"smartblock-inline-menu"},r.createElement("div",{className:"smartblock-inline-menu-arrow",style:{left:"".concat(p,"px")}}),r.createElement("div",{className:"smartblock-inline-menu-inner"},u,e.map((function(t,e){return r.createElement(o.default,{key:"inline-".concat(e),type:"button",active:t.active&&t.active(c),disabled:t.enable&&!t.enable(c),onClick:function(e){e.preventDefault(),t.onClick(c,l)}},"string"!=typeof t.icon?t.icon:r.createElement("span",{dangerouslySetInnerHTML:{__html:t.icon}}))})),m&&m.props&&m.props.children&&r.createElement(r.Fragment,null,m)))}},"9Ojb":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("vm0/"),i=n("5VLk"),o=n("9HVD"),a=n("Zxxf"),u=n("vCGa"),s=n("sDAw");e.default=[new r.default,new a.default,new o.default,new i.default,new u.default,new s.default]},CUlp:function(t,e,n){var r,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(r=function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},r=n[t]=n[t]||[];return-1==r.indexOf(e)&&r.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var r=n.indexOf(e);return-1!=r&&n.splice(r,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var r=this._onceEvents&&this._onceEvents[t],i=0;i=t)return this._from=this._to,this._update(this._to),this._done=!0,this.emit("end"),this;var n=this._from,r=this._to,i=this._curr,o=(0,this._ease)((e-this._start)/t);if(this.isArray){for(var a=0;a= top_1) {\n if (/iPod|iPhone|iPad/.test(navigator.platform) && document.activeElement) {\n var activeElement = document.activeElement;\n if (activeElement.isContentEditable) {\n (0, scroll_to_1.default)(0, offsetTop - EDITMENUHEIGHT, {\n duration: 300\n });\n return true;\n }\n } else {\n (0, scroll_to_1.default)(0, offsetTop - EDITMENUHEIGHT, {\n duration: 300\n });\n return true;\n }\n }\n }\n }\n if (props.onChange) {\n var html = (0, utils_1.getHtmlFromNode)(doc, schema);\n var change = {\n json: doc.toJSON(),\n html: html,\n schema: schema\n };\n if (props.outputMarkdown && showdown) {\n var converter = new showdown.Converter();\n converter.setFlavor('github');\n change.markdown = converter.makeMd(html);\n }\n props.onChange(change);\n }\n if (props.autoSave) {\n var pathname = location.pathname;\n var html = (0, utils_1.getHtmlFromNode)(doc, schema);\n localStorage.setItem(\"smartblock:\".concat(pathname), html);\n }\n var childCount = doc.content.childCount;\n var lastNode = doc.content.child(childCount - 1);\n if (lastNode.type.name !== 'paragraph') {\n var paragraph = state.schema.nodes.paragraph;\n dispatch(state.tr.insert(state.doc.content.size, paragraph.createAndFill()));\n } else if (lastNode.textContent.length !== 0) {\n var paragraph = state.schema.nodes.paragraph;\n dispatch(state.tr.insert(state.doc.content.size, paragraph.createAndFill()));\n }\n return false;\n};\nvar getPlugins = function (extensions, schema) {\n var customPlugins = [];\n extensions.forEach(function (extension) {\n if (extension.plugins) {\n customPlugins = __spreadArray(__spreadArray([], customPlugins, true), extension.plugins, true);\n }\n });\n var keyPlugin = getKeys(extensions, schema);\n return __spreadArray(__spreadArray([], customPlugins, true), [keyPlugin], false);\n};\nvar getNodeViews = function (extensions) {\n var views = {};\n extensions.forEach(function (extension) {\n if (extension.view) {\n views[extension.name] = function (node, view, getPos) {\n return extension.view(node, view, getPos);\n };\n }\n });\n return views;\n};\nvar titleChanged = function (title, props) {\n var pathname = location.pathname;\n localStorage.setItem(\"smartblock-title:\".concat(pathname), title);\n if (props.onTitleChange) {\n props.onTitleChange(title);\n }\n};\nvar shouldRenderInlineMenu = function (view, blocks) {\n var node = (0, utils_1.getParentNodeFromState)(view.state);\n var currentBlock = blocks.find(function (block) {\n if (block.name === node.type.name) {\n return true;\n }\n return false;\n });\n if (currentBlock && currentBlock.hideInlineMenuOnFocus) {\n return false;\n }\n return true;\n};\nexports.default = function (props) {\n var defaultProps = {\n extensions: base_1.default,\n offsetTop: 0,\n showBackBtn: false,\n autoSave: false,\n showTitle: false,\n titleText: '',\n full: false\n };\n props = Object.assign({}, defaultProps, props);\n var html = props.html,\n json = props.json,\n extensions = props.extensions,\n showBackBtn = props.showBackBtn,\n showTitle = props.showTitle,\n markdown = props.markdown,\n showdown = props.showdown;\n var titleText = props.titleText;\n var schema = getSchemaFromExtensions(props.extensions);\n var realHtml = html;\n if (json) {\n var node = prosemirror_model_1.Node.fromJSON(schema, json);\n realHtml = (0, utils_1.getHtmlFromNode)(node, schema);\n }\n if (markdown && showdown) {\n var converter = new showdown.Converter();\n converter.setFlavor('github');\n realHtml = converter.makeHtml(markdown);\n }\n if (props.autoSave) {\n var pathname = location.pathname;\n var localHtml = localStorage.getItem(\"smartblock:\".concat(pathname));\n if (localHtml) {\n realHtml = localHtml;\n }\n if (showTitle) {\n titleText = localStorage.getItem(\"smartblock-title:\".concat(pathname));\n }\n }\n var _a = useState(null),\n options = _a[0],\n setOptions = _a[1];\n var app = useRef(null);\n useEffect(function () {\n var div = document.createElement('div');\n div.innerHTML = realHtml;\n var doc = prosemirror_model_1.DOMParser.fromSchema(schema).parse(div, {\n preserveWhitespace: true\n });\n if (props.onInit) {\n props.onInit({\n schema: schema\n });\n }\n if (props.getEditorRef) {\n props.getEditorRef(app);\n }\n var editorOptions = {\n schema: schema,\n plugins: getPlugins(extensions, schema),\n doc: doc\n };\n setOptions(editorOptions);\n }, []);\n var _b = useState(true),\n showMenus = _b[0],\n setShowMenus = _b[1];\n var containerId = React.useMemo(function () {\n return uuid();\n }, []);\n var container = useRef(null);\n var blocks = getBlocks(extensions);\n var marks = getMarks(extensions);\n var edits = getEdits(extensions);\n var nodeViews = getNodeViews(extensions);\n return React.createElement(\"div\", {\n id: containerId,\n onClick: function (e) {\n var target = e.target;\n if (target.getAttribute('id') === containerId) {\n setShowMenus(false);\n } else {\n setShowMenus(true);\n }\n },\n ref: app\n }, React.createElement(\"div\", {\n className: (0, classnames_1.default)('smartblock-container', {\n 'is-full': props.full\n })\n }, props.showTitle && React.createElement(title_1.default, {\n placeholder: props.titlePlaceholder,\n onChange: function (title) {\n titleChanged(title, props);\n },\n defaultValue: titleText\n }), React.createElement(\"div\", {\n className: \"smartblock-inner\"\n }, React.createElement(\"div\", {\n className: showMenus ? '' : 'ProseMirrorHideSelection',\n ref: container\n }, React.createElement(\"div\", {\n className: \"smartblock-input-area\"\n }, options && React.createElement(editor_1.default, {\n options: options,\n nodeViews: nodeViews,\n onChange: function (state, dispatch) {\n var shouldScroll = onChange(state, dispatch, props, schema, container, showdown);\n if (shouldScroll) {\n setTimeout(function () {\n setShowMenus(true);\n }, 700);\n }\n },\n render: function (_a) {\n var editor = _a.editor,\n view = _a.view,\n scrolling = _a.scrolling;\n if (scrolling) {\n setShowMenus(false);\n }\n return React.createElement(React.Fragment, null, showMenus && React.createElement(React.Fragment, null, React.createElement(menu_1.default, {\n view: view,\n menu: getMenu(blocks)\n }), React.createElement(edit_menu_1.default, {\n view: view,\n menu: getMenu(edits)\n }), shouldRenderInlineMenu(view, blocks) && React.createElement(inline_menu_1.default, {\n menu: getMenu(marks),\n blockMenu: getMenu(blocks),\n view: view\n }), React.createElement(custom_layout_1.default, {\n view: view,\n menu: getMenu(blocks)\n }), showBackBtn && React.createElement(back_btn_1.default, {\n view: view\n })), editor);\n }\n }))))));\n};\nfunction deepmarge(schema, schemaDependencies) {\n throw new Error('Function not implemented.');\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.useScrolling = exports.useScroll = exports.useView = exports.useForceUpdate = void 0;\nvar react_1 = require(\"react\");\nvar prosemirror_state_1 = require(\"prosemirror-state\");\nvar prosemirror_view_1 = require(\"prosemirror-view\");\nvar _1 = require(\".\");\nvar useForceUpdate = function () {\n var _a = (0, react_1.useState)(0),\n setTick = _a[1];\n var update = function () {\n setTick(function (tick) {\n return tick + 1;\n });\n };\n return update;\n};\nexports.useForceUpdate = useForceUpdate;\nvar useView = function (props) {\n var forceUpdate = (0, exports.useForceUpdate)();\n var instance = (0, react_1.useMemo)(function () {\n var view = new prosemirror_view_1.EditorView(null, {\n state: prosemirror_state_1.EditorState.create(props.options),\n dispatchTransaction: function (transaction) {\n var _a = view.state.applyTransaction(transaction),\n state = _a.state,\n transactions = _a.transactions;\n view.updateState(state);\n if (transactions.some(function (tr) {\n return tr.docChanged;\n })) {\n props.onChange(state, view.dispatch);\n }\n forceUpdate();\n },\n attributes: props.attributes,\n nodeViews: props.nodeViews\n });\n props.onChange(view.state, view.dispatch);\n return view;\n }, []);\n return instance;\n};\nexports.useView = useView;\nvar useScroll = function () {\n var _a = (0, react_1.useState)((0, _1.getScrollTop)()),\n scrollTop = _a[0],\n setScrollTop = _a[1];\n (0, react_1.useEffect)(function () {\n var scrollEvent = function () {\n setScrollTop((0, _1.getScrollTop)());\n };\n window.addEventListener('scroll', scrollEvent);\n return function () {\n window.removeEventListener('scroll', scrollEvent);\n };\n }, [scrollTop]);\n return scrollTop;\n};\nexports.useScroll = useScroll;\nvar useScrolling = function (element, delay) {\n var _a = (0, react_1.useState)(false),\n scrolling = _a[0],\n setScrolling = _a[1];\n (0, react_1.useEffect)(function () {\n var debounceTimer = null;\n var count = 0;\n if (!element.current) {\n return;\n }\n var top = element.current.getBoundingClientRect().top;\n var eventHandler = function () {\n var localTop = element.current.getBoundingClientRect().top;\n if (localTop === top) {\n return;\n }\n top = localTop;\n count++;\n if (count === 3) {\n if (scrolling === false) {\n count = 0;\n setScrolling(true);\n }\n }\n clearTimeout(debounceTimer);\n debounceTimer = setTimeout(function () {\n setScrolling(false);\n count = 0;\n }, delay);\n };\n var interval = setInterval(eventHandler, 100);\n return function () {\n clearInterval(interval);\n };\n }, []);\n return scrolling;\n};\nexports.useScrolling = useScrolling;","\"use strict\";\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_model_1 = require(\"prosemirror-model\");\nvar utils_1 = require(\"../utils\");\nvar hooks_1 = require(\"../utils/hooks\");\nvar default_plugins_1 = require(\"../extensions/default-plugins\");\nvar useRef = React.useRef,\n useEffect = React.useEffect;\nvar schemaDef = {\n nodes: {\n doc: {\n content: 'block'\n },\n text: {\n group: 'inline'\n },\n title: {\n group: 'block',\n content: 'text*',\n selectable: false,\n parseDOM: [{\n tag: 'h1'\n }],\n toDOM: function () {\n return ['h1', 0];\n }\n }\n }\n};\nexports.default = function (props) {\n var defaultProps = {\n defaultValue: '',\n placeholder: 'Type Title here'\n };\n props = Object.assign({}, defaultProps, props);\n var titleRef = useRef(null);\n var schema = new prosemirror_model_1.Schema(__assign({}, schemaDef));\n var div = document.createElement('div');\n div.innerHTML = props.defaultValue;\n var doc = prosemirror_model_1.DOMParser.fromSchema(schema).parse(div);\n var config = {\n onChange: function (state) {\n if (props.onChange) {\n var title = (0, utils_1.getHtmlFromNode)(state.doc, schema);\n title = title.replace(/

(.*)<\\/h1>/, '$1');\n props.onChange(title);\n }\n },\n options: {\n schema: schema,\n doc: doc,\n plugins: [(0, default_plugins_1.placeholderPlugin)({\n placeholder: props.placeholder || defaultProps.placeholder\n })]\n }\n };\n var view = (0, hooks_1.useView)(config);\n useEffect(function () {\n if (titleRef.current) {\n titleRef.current.appendChild(view.dom);\n }\n }, []);\n return React.createElement(\"div\", {\n ref: titleRef,\n className: \"smartblock-title\"\n });\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_utils_1 = require(\"prosemirror-utils\");\nvar utils_1 = require(\"../utils\");\nvar button_1 = require(\"./button\");\nvar useState = React.useState,\n useEffect = React.useEffect;\nvar calculateStyle = function (props) {\n var view = props.view;\n var state = view.state;\n var selection = state.selection;\n if (!selection || !selection.empty) {\n return {\n top: -1000,\n right: 0\n };\n }\n var $anchor = selection.$anchor;\n if ($anchor.pos === 0) {\n return {\n top: -1000,\n right: 0\n };\n }\n var resolvedPos = state.doc.resolve($anchor.pos);\n var rowNumber = resolvedPos.path[1];\n var i = 0;\n var firstNode = (0, prosemirror_utils_1.findChildren)(state.doc, function (_node) {\n if (rowNumber === i || rowNumber + 1 === i) {\n i++;\n return true;\n }\n i++;\n return false;\n }, false)[0];\n if (!firstNode) {\n return {\n top: -1000\n };\n }\n var coords = view.coordsAtPos(firstNode.pos);\n var dom = view.nodeDOM(firstNode.pos);\n var elementTop = (0, utils_1.getOffset)(dom).top;\n var offsetTop = (0, utils_1.getOffset)(view.dom).top;\n if (coords.top === 0) {\n return {\n top: -1000\n };\n }\n if (dom && dom.offsetHeight) {\n return {\n left: 5,\n top: elementTop + dom.offsetHeight - offsetTop + 20\n };\n }\n return {\n left: 5,\n top: elementTop - offsetTop + 20\n };\n};\nvar getActiveMenu = function (props) {\n var menu = props.menu,\n view = props.view;\n var state = view.state;\n var activeItem = menu.find(function (item) {\n if (item.active && item.active(state)) {\n return true;\n }\n return false;\n });\n if (activeItem && activeItem.customMenu) {\n return React.createElement(React.Fragment, null, activeItem.customMenu(view));\n }\n return React.createElement(React.Fragment, null);\n};\nvar shouldRenderMenu = function (props) {\n var menu = props.menu,\n view = props.view;\n var node = (0, utils_1.getParentNodeFromState)(view.state);\n if (!node || !menu || !menu.length) {\n return;\n }\n var name = node.type.name;\n var selectedItem = menu.find(function (item) {\n if (item.name === name) {\n return true;\n }\n return false;\n });\n if (!selectedItem) {\n return true;\n }\n if (selectedItem.hideMenuOnFocus) {\n return false;\n }\n return true;\n};\nexports.default = function (props) {\n var menu = props.menu,\n view = props.view;\n var state = view.state,\n dispatch = view.dispatch;\n var CustomMenu = getActiveMenu(props);\n var shouldRender = shouldRenderMenu(props);\n var _a = useState({\n left: 0,\n top: 0\n }),\n style = _a[0],\n setState = _a[1];\n useEffect(function () {\n var nextStyle = calculateStyle(props);\n setState(nextStyle);\n }, [props]);\n if (!shouldRender) {\n return null;\n }\n var hideMenuOnFocus = false;\n var activeItem = menu.find(function (item) {\n if (item.active && item.active(state)) {\n return true;\n }\n return false;\n });\n if (activeItem && activeItem.hideBlockMenuOnFocus) {\n hideMenuOnFocus = true;\n }\n return React.createElement(\"div\", {\n style: style,\n className: \"smartblock-menu\"\n }, React.createElement(\"div\", {\n className: \"smartblock-menu-top\"\n }, menu.map(function (item, key) {\n if (item.customButton) {\n return item.customButton({\n state: state,\n dispatch: dispatch\n });\n }\n return React.createElement(button_1.default, {\n key: key,\n type: \"button\",\n active: item.active && item.active(state),\n disabled: item.enable && !item.enable(state) || hideMenuOnFocus,\n onClick: function (e) {\n e.preventDefault();\n item.onClick(state, dispatch, view);\n }\n }, typeof item.icon !== 'string' ? item.icon : React.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: item.icon\n }\n }));\n })), CustomMenu && CustomMenu.props && CustomMenu.props.children && React.createElement(\"div\", {\n className: \"smartblock-custom-menu\"\n }, CustomMenu));\n};","\"use strict\";\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar SvgUndo = function (props) {\n return React.createElement(\"svg\", __assign({\n width: 1792,\n height: 1792,\n viewBox: \"0 0 1792 1792\"\n }, props), React.createElement(\"title\", null, \"undo\"), React.createElement(\"g\", {\n id: \"bebf11ee-5e4c-414b-9c0e-9afbb64c0153\",\n \"data-name\": \"\\\\u30E9\\\\u30D9\\\\u30EB\"\n }, React.createElement(\"path\", {\n d: \"M715.62,1146.77v412.47L0,843.62,715.62,128V510.8l356.57,39.61c395.14,43.91,676.64,243.79,716.86,492,31.48,194.23-94.21,351.37-190.3,420.9-106.64,77.16-245,118.33-401.49,76.89,119.27-39.75,212.14-134.61,207.69-214.79-7-125.53-148.89-178.63-452-178.63Z\"\n })));\n};\nexports.default = SvgUndo;","/**\n * Module dependencies.\n */\n\nvar Tween = require('tween');\nvar raf = require('raf');\n\n/**\n * Expose `scrollTo`.\n */\n\nmodule.exports = scrollTo;\n\n/**\n * Scroll to `(x, y)`.\n *\n * @param {Number} x\n * @param {Number} y\n * @api public\n */\n\nfunction scrollTo(x, y, options) {\n options = options || {};\n\n // start position\n var start = scroll();\n\n // setup tween\n var tween = Tween(start).ease(options.ease || 'out-circ').to({\n top: y,\n left: x\n }).duration(options.duration || 1000);\n\n // scroll\n tween.update(function (o) {\n window.scrollTo(o.left | 0, o.top | 0);\n });\n\n // handle end\n tween.on('end', function () {\n animate = function () {};\n });\n\n // animate\n function animate() {\n raf(animate);\n tween.update();\n }\n animate();\n return tween;\n}\n\n/**\n * Return scroll position.\n *\n * @return {Object}\n * @api private\n */\n\nfunction scroll() {\n var y = window.pageYOffset || document.documentElement.scrollTop;\n var x = window.pageXOffset || document.documentElement.scrollLeft;\n return {\n top: y,\n left: x\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar utils_1 = require(\"../utils\");\nvar button_1 = require(\"./button\");\nvar useRef = React.useRef;\nvar ARROWOFFSET = 50;\nvar ARROWTOPOFFSET = 25;\nvar calculateStyle = function (view, container) {\n var selection = view.state.selection;\n var offsetLeft = (0, utils_1.getOffset)(view.dom).left;\n var coords = view.coordsAtPos(selection.$head.pos);\n var offsetTop = (0, utils_1.getOffset)(view.dom).top;\n var top = coords.top + (0, utils_1.getScrollTop)() + ARROWTOPOFFSET - offsetTop;\n var left = coords.left - ARROWOFFSET - offsetLeft;\n if (container && container.current && container.current.offsetWidth) {\n var width = container.current.offsetWidth;\n if (left + width > window.innerWidth) {\n return {\n top: top,\n left: window.innerWidth - width\n };\n }\n }\n return {\n left: left,\n top: top\n };\n};\nvar getActiveInlineMenu = function (props) {\n var blockMenu = props.blockMenu,\n view = props.view;\n var state = view.state;\n var activeItem = blockMenu.find(function (item) {\n if (item.active && item.active(state)) {\n return true;\n }\n return false;\n });\n if (activeItem && activeItem.customInlineMenu) {\n return React.createElement(React.Fragment, null, activeItem.customInlineMenu(view));\n }\n return false;\n};\nvar calculateArrowPos = function (view, container) {\n var selection = view.state.selection;\n var offsetLeft = (0, utils_1.getOffset)(view.dom).left;\n var coords = view.coordsAtPos(selection.$head.pos);\n var left = coords.left - ARROWOFFSET - offsetLeft;\n var width = container.current ? container.current.offsetWidth : 0;\n if (container && container.current && container.current.offsetWidth) {\n if (left + width > window.innerWidth) {\n return left - window.innerWidth + width;\n }\n }\n return 20;\n};\nvar MenuBar = function (_a) {\n var menu = _a.menu,\n blockMenu = _a.blockMenu,\n children = _a.children,\n view = _a.view;\n var state = view.state,\n dispatch = view.dispatch;\n var selection = view.state.selection;\n var container = useRef(null);\n var style = calculateStyle(view, container);\n var pos = calculateArrowPos(view, container);\n var inlineMenu = getActiveInlineMenu({\n blockMenu: blockMenu,\n view: view\n });\n if (!selection || selection.empty) {\n return React.createElement(React.Fragment, null);\n }\n if (menu.length === 0) {\n return React.createElement(React.Fragment, null);\n }\n return React.createElement(\"div\", {\n style: style,\n ref: container,\n className: \"smartblock-inline-menu\"\n }, React.createElement(\"div\", {\n className: \"smartblock-inline-menu-arrow\",\n style: {\n left: \"\".concat(pos, \"px\")\n }\n }), React.createElement(\"div\", {\n className: \"smartblock-inline-menu-inner\"\n }, children, menu.map(function (item, key) {\n return React.createElement(button_1.default, {\n key: \"inline-\".concat(key),\n type: \"button\",\n active: item.active && item.active(state),\n // title={item.title}\n disabled: item.enable && !item.enable(state),\n onClick: function (e) {\n e.preventDefault();\n item.onClick(state, dispatch);\n }\n }, typeof item.icon !== 'string' ? item.icon : React.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: item.icon\n }\n }));\n }), inlineMenu && inlineMenu.props && inlineMenu.props.children && React.createElement(React.Fragment, null, inlineMenu)));\n};\nexports.default = MenuBar;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar paragraph_1 = require(\"./paragraph\");\nvar trash_1 = require(\"./trash\");\nvar move_up_1 = require(\"./move-up\");\nvar move_down_1 = require(\"./move-down\");\nvar default_keys_1 = require(\"./default-keys\");\nvar default_plugins_1 = require(\"./default-plugins\");\nexports.default = [\n// blocks\nnew paragraph_1.default(), new move_down_1.default(), new move_up_1.default(), new trash_1.default(), new default_keys_1.default(), new default_plugins_1.default()];","/**\n * EvEmitter v1.1.0\n * Lil' event emitter\n * MIT License\n */\n\n/* jshint unused: true, undef: true, strict: true */\n\n(function (global, factory) {\n // universal module definition\n /* jshint strict: false */ /* globals define, module, window */\n if (typeof define == 'function' && define.amd) {\n // AMD - RequireJS\n define(factory);\n } else if (typeof module == 'object' && module.exports) {\n // CommonJS - Browserify, Webpack\n module.exports = factory();\n } else {\n // Browser globals\n global.EvEmitter = factory();\n }\n})(typeof window != 'undefined' ? window : this, function () {\n \"use strict\";\n\n function EvEmitter() {}\n var proto = EvEmitter.prototype;\n proto.on = function (eventName, listener) {\n if (!eventName || !listener) {\n return;\n }\n // set events hash\n var events = this._events = this._events || {};\n // set listeners array\n var listeners = events[eventName] = events[eventName] || [];\n // only add once\n if (listeners.indexOf(listener) == -1) {\n listeners.push(listener);\n }\n return this;\n };\n proto.once = function (eventName, listener) {\n if (!eventName || !listener) {\n return;\n }\n // add event\n this.on(eventName, listener);\n // set once flag\n // set onceEvents hash\n var onceEvents = this._onceEvents = this._onceEvents || {};\n // set onceListeners object\n var onceListeners = onceEvents[eventName] = onceEvents[eventName] || {};\n // set flag\n onceListeners[listener] = true;\n return this;\n };\n proto.off = function (eventName, listener) {\n var listeners = this._events && this._events[eventName];\n if (!listeners || !listeners.length) {\n return;\n }\n var index = listeners.indexOf(listener);\n if (index != -1) {\n listeners.splice(index, 1);\n }\n return this;\n };\n proto.emitEvent = function (eventName, args) {\n var listeners = this._events && this._events[eventName];\n if (!listeners || !listeners.length) {\n return;\n }\n // copy over to avoid interference if .off() in listener\n listeners = listeners.slice(0);\n args = args || [];\n // once stuff\n var onceListeners = this._onceEvents && this._onceEvents[eventName];\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n var isOnce = onceListeners && onceListeners[listener];\n if (isOnce) {\n // remove listener\n // remove before trigger to prevent recursion\n this.off(eventName, listener);\n // unset once flag\n delete onceListeners[listener];\n }\n // trigger listener\n listener.apply(this, args);\n }\n return this;\n };\n proto.allOff = function () {\n delete this._events;\n delete this._onceEvents;\n };\n return EvEmitter;\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar imagesLoaded = require(\"imagesloaded\");\nvar utils_1 = require(\"../utils\");\nvar useState = React.useState,\n useEffect = React.useEffect;\nvar getCustomLayout = function (props) {\n var menu = props.menu,\n view = props.view;\n var node = (0, utils_1.getParentNodeFromState)(view.state);\n if (!node || !menu || !menu.length) {\n return;\n }\n var name = node.type.name;\n var selectedItem = menu.find(function (item) {\n if (item.name === name) {\n return true;\n }\n return false;\n });\n if (!selectedItem) {\n return null;\n }\n if (selectedItem.customLayout) {\n return selectedItem.customLayout;\n }\n return null;\n};\nvar useImagesLoaded = function (dom) {\n var _a = useState({\n top: 0,\n left: 0,\n width: 0,\n height: 0\n }),\n size = _a[0],\n setSize = _a[1];\n useEffect(function () {\n imagesLoaded(dom, function () {\n var newSize = dom.getBoundingClientRect();\n if (size.height !== newSize.height) {\n setSize(newSize);\n }\n });\n });\n return size;\n};\nexports.default = function (props) {\n var customLayout = getCustomLayout(props);\n if (!customLayout) {\n return null;\n }\n var view = props.view;\n var pos = (0, utils_1.calculateStyle)(props.view);\n var parentNode = (0, utils_1.getParentNodeFromState)(view.state);\n var parentPos = (0, utils_1.findNodePosition)(view.state.doc, parentNode);\n var dom = view.nodeDOM(parentPos);\n var style = {\n position: 'absolute',\n zIndex: 10,\n top: pos.top,\n left: 0,\n right: 0\n };\n var size = useImagesLoaded(dom);\n if (!size.height) {\n return null;\n }\n return React.createElement(\"div\", {\n style: style\n }, customLayout(props.view, dom));\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_utils_1 = require(\"prosemirror-utils\");\nvar utils_1 = require(\"../utils\");\nvar button_1 = require(\"./button\");\nvar useState = React.useState,\n useEffect = React.useEffect;\nvar getContainerOffset = function (container) {\n return (0, utils_1.getOffset)(container).top;\n};\nvar calculateStyle = function (props) {\n var view = props.view;\n var state = view.state;\n var selection = state.selection;\n if (!selection) {\n return {\n top: -1000\n };\n }\n var $anchor = selection.$anchor;\n var resolvedPos = state.doc.resolve($anchor.pos);\n var rowNumber = resolvedPos.path[1];\n var i = 0;\n if ($anchor.pos === 0) {\n return {\n top: -1000\n };\n }\n var firstNode = (0, prosemirror_utils_1.findChildren)(state.doc, function (_node) {\n if (rowNumber === i || rowNumber + 1 === i) {\n i++;\n return true;\n }\n i++;\n return false;\n }, false)[0];\n if (!firstNode) {\n return {\n top: -1000\n };\n }\n var coords = view.coordsAtPos(firstNode.pos);\n var dom = view.nodeDOM(firstNode.pos);\n var elementTop = (0, utils_1.getOffset)(dom).top;\n var offsetTop = getContainerOffset(view.dom);\n if (coords.top === 0) {\n return {\n top: -1000\n };\n }\n return {\n right: 20,\n top: elementTop - offsetTop - 40\n };\n};\nexports.default = function (props) {\n var _a = useState({\n right: 20,\n top: 0\n }),\n style = _a[0],\n setState = _a[1];\n var menu = props.menu,\n view = props.view;\n var state = view.state,\n dispatch = view.dispatch;\n useEffect(function () {\n var nextStyle = calculateStyle(props);\n setState(nextStyle);\n }, [props]);\n return React.createElement(\"div\", {\n style: style,\n className: \"smartblock-edit-menu\"\n }, menu.map(function (item, key) {\n return React.createElement(button_1.default, {\n className: \"smartblock-edit-btn\",\n key: \"edit-\".concat(key),\n type: \"button\",\n color: item.btnColor,\n active: item.active && item.active(state),\n disabled: item.enable && !item.enable(state),\n onClick: function (e) {\n e.preventDefault();\n item.onClick(state, dispatch, view);\n }\n }, item.icon);\n }));\n};","/**\n * Module dependencies.\n */\n\nvar Emitter = require('emitter');\nvar clone = require('clone');\nvar type = require('type');\nvar ease = require('ease');\n\n/**\n * Expose `Tween`.\n */\n\nmodule.exports = Tween;\n\n/**\n * Initialize a new `Tween` with `obj`.\n *\n * @param {Object|Array} obj\n * @api public\n */\n\nfunction Tween(obj) {\n if (!(this instanceof Tween)) return new Tween(obj);\n this._from = obj;\n this.ease('linear');\n this.duration(500);\n}\n\n/**\n * Mixin emitter.\n */\n\nEmitter(Tween.prototype);\n\n/**\n * Reset the tween.\n *\n * @api public\n */\n\nTween.prototype.reset = function () {\n this.isArray = 'array' === type(this._from);\n this._curr = clone(this._from);\n this._done = false;\n this._start = Date.now();\n return this;\n};\n\n/**\n * Tween to `obj` and reset internal state.\n *\n * tween.to({ x: 50, y: 100 })\n *\n * @param {Object|Array} obj\n * @return {Tween} self\n * @api public\n */\n\nTween.prototype.to = function (obj) {\n this.reset();\n this._to = obj;\n return this;\n};\n\n/**\n * Set duration to `ms` [500].\n *\n * @param {Number} ms\n * @return {Tween} self\n * @api public\n */\n\nTween.prototype.duration = function (ms) {\n this._duration = ms;\n return this;\n};\n\n/**\n * Set easing function to `fn`.\n *\n * tween.ease('in-out-sine')\n *\n * @param {String|Function} fn\n * @return {Tween}\n * @api public\n */\n\nTween.prototype.ease = function (fn) {\n fn = 'function' == typeof fn ? fn : ease[fn];\n if (!fn) throw new TypeError('invalid easing function');\n this._ease = fn;\n return this;\n};\n\n/**\n * Stop the tween and immediately emit \"stop\" and \"end\".\n *\n * @return {Tween}\n * @api public\n */\n\nTween.prototype.stop = function () {\n this.stopped = true;\n this._done = true;\n this.emit('stop');\n this.emit('end');\n return this;\n};\n\n/**\n * Perform a step.\n *\n * @return {Tween} self\n * @api private\n */\n\nTween.prototype.step = function () {\n if (this._done) return;\n\n // duration\n var duration = this._duration;\n var now = Date.now();\n var delta = now - this._start;\n var done = delta >= duration;\n\n // complete\n if (done) {\n this._from = this._to;\n this._update(this._to);\n this._done = true;\n this.emit('end');\n return this;\n }\n\n // tween\n var from = this._from;\n var to = this._to;\n var curr = this._curr;\n var fn = this._ease;\n var p = (now - this._start) / duration;\n var n = fn(p);\n\n // array\n if (this.isArray) {\n for (var i = 0; i < from.length; ++i) {\n curr[i] = from[i] + (to[i] - from[i]) * n;\n }\n this._update(curr);\n return this;\n }\n\n // objech\n for (var k in from) {\n curr[k] = from[k] + (to[k] - from[k]) * n;\n }\n this._update(curr);\n return this;\n};\n\n/**\n * Set update function to `fn` or\n * when no argument is given this performs\n * a \"step\".\n *\n * @param {Function} fn\n * @return {Tween} self\n * @api public\n */\n\nTween.prototype.update = function (fn) {\n if (0 == arguments.length) return this.step();\n this._update = fn;\n return this;\n};","/**\n * Expose `requestAnimationFrame()`.\n */\n\nexports = module.exports = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || fallback;\n\n/**\n * Fallback implementation.\n */\n\nvar prev = new Date().getTime();\nfunction fallback(fn) {\n var curr = new Date().getTime();\n var ms = Math.max(0, 16 - (curr - prev));\n var req = setTimeout(fn, ms);\n prev = curr;\n return req;\n}\n\n/**\n * Cancel.\n */\n\nvar cancel = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.clearTimeout;\nexports.cancel = function (id) {\n cancel.call(window, id);\n};","/**\n * Expose `Emitter`.\n */\n\nmodule.exports = Emitter;\n\n/**\n * Initialize a new `Emitter`.\n *\n * @api public\n */\n\nfunction Emitter(obj) {\n if (obj) return mixin(obj);\n}\n;\n\n/**\n * Mixin the emitter properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n return obj;\n}\n\n/**\n * Listen on the given `event` with `fn`.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) {\n this._callbacks = this._callbacks || {};\n (this._callbacks['$' + event] = this._callbacks['$' + event] || []).push(fn);\n return this;\n};\n\n/**\n * Adds an `event` listener that will be invoked a single\n * time then automatically removed.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.once = function (event, fn) {\n function on() {\n this.off(event, on);\n fn.apply(this, arguments);\n }\n on.fn = fn;\n this.on(event, on);\n return this;\n};\n\n/**\n * Remove the given callback for `event` or all\n * registered callbacks.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) {\n this._callbacks = this._callbacks || {};\n\n // all\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n }\n\n // specific event\n var callbacks = this._callbacks['$' + event];\n if (!callbacks) return this;\n\n // remove all handlers\n if (1 == arguments.length) {\n delete this._callbacks['$' + event];\n return this;\n }\n\n // remove specific handler\n var cb;\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n return this;\n};\n\n/**\n * Emit `event` with the given args.\n *\n * @param {String} event\n * @param {Mixed} ...\n * @return {Emitter}\n */\n\nEmitter.prototype.emit = function (event) {\n this._callbacks = this._callbacks || {};\n var args = [].slice.call(arguments, 1),\n callbacks = this._callbacks['$' + event];\n if (callbacks) {\n callbacks = callbacks.slice(0);\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n return this;\n};\n\n/**\n * Return array of callbacks for `event`.\n *\n * @param {String} event\n * @return {Array}\n * @api public\n */\n\nEmitter.prototype.listeners = function (event) {\n this._callbacks = this._callbacks || {};\n return this._callbacks['$' + event] || [];\n};\n\n/**\n * Check if this emitter has `event` handlers.\n *\n * @param {String} event\n * @return {Boolean}\n * @api public\n */\n\nEmitter.prototype.hasListeners = function (event) {\n return !!this.listeners(event).length;\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar hooks_1 = require(\"../utils/hooks\");\nvar useRef = React.useRef,\n useEffect = React.useEffect;\nexports.default = function (props) {\n var editorRef = useRef(null);\n var view = (0, hooks_1.useView)(props);\n // Object.keys(props.options).forEach((key) => console.log(key, {...props.options[key]}))\n useEffect(function () {\n if (editorRef.current) {\n editorRef.current.appendChild(view.dom);\n }\n if (props.autoFocus) {\n view.focus();\n }\n }, []);\n var scrolling = (0, hooks_1.useScrolling)(editorRef, 300);\n var editor = React.createElement(\"div\", {\n ref: editorRef\n });\n return props.render({\n editor: editor,\n view: view,\n scrolling: scrolling\n });\n};","/**\n * Module dependencies.\n */\n\nvar type;\ntry {\n type = require('component-type');\n} catch (_) {\n type = require('type');\n}\n\n/**\n * Module exports.\n */\n\nmodule.exports = clone;\n\n/**\n * Clones objects.\n *\n * @param {Mixed} any object\n * @api public\n */\n\nfunction clone(obj) {\n switch (type(obj)) {\n case 'object':\n var copy = {};\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n copy[key] = clone(obj[key]);\n }\n }\n return copy;\n case 'array':\n var copy = new Array(obj.length);\n for (var i = 0, l = obj.length; i < l; i++) {\n copy[i] = clone(obj[i]);\n }\n return copy;\n case 'regexp':\n // from millermedeiros/amd-utils - MIT\n var flags = '';\n flags += obj.multiline ? 'm' : '';\n flags += obj.global ? 'g' : '';\n flags += obj.ignoreCase ? 'i' : '';\n return new RegExp(obj.source, flags);\n case 'date':\n return new Date(obj.getTime());\n default:\n // string, number, boolean, …\n return obj;\n }\n}","// easing functions from \"Tween.js\"\n\nexports.linear = function (n) {\n return n;\n};\nexports.inQuad = function (n) {\n return n * n;\n};\nexports.outQuad = function (n) {\n return n * (2 - n);\n};\nexports.inOutQuad = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n;\n return -0.5 * (--n * (n - 2) - 1);\n};\nexports.inCube = function (n) {\n return n * n * n;\n};\nexports.outCube = function (n) {\n return --n * n * n + 1;\n};\nexports.inOutCube = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n * n;\n return 0.5 * ((n -= 2) * n * n + 2);\n};\nexports.inQuart = function (n) {\n return n * n * n * n;\n};\nexports.outQuart = function (n) {\n return 1 - --n * n * n * n;\n};\nexports.inOutQuart = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n * n * n;\n return -0.5 * ((n -= 2) * n * n * n - 2);\n};\nexports.inQuint = function (n) {\n return n * n * n * n * n;\n};\nexports.outQuint = function (n) {\n return --n * n * n * n * n + 1;\n};\nexports.inOutQuint = function (n) {\n n *= 2;\n if (n < 1) return 0.5 * n * n * n * n * n;\n return 0.5 * ((n -= 2) * n * n * n * n + 2);\n};\nexports.inSine = function (n) {\n return 1 - Math.cos(n * Math.PI / 2);\n};\nexports.outSine = function (n) {\n return Math.sin(n * Math.PI / 2);\n};\nexports.inOutSine = function (n) {\n return .5 * (1 - Math.cos(Math.PI * n));\n};\nexports.inExpo = function (n) {\n return 0 == n ? 0 : Math.pow(1024, n - 1);\n};\nexports.outExpo = function (n) {\n return 1 == n ? n : 1 - Math.pow(2, -10 * n);\n};\nexports.inOutExpo = function (n) {\n if (0 == n) return 0;\n if (1 == n) return 1;\n if ((n *= 2) < 1) return .5 * Math.pow(1024, n - 1);\n return .5 * (-Math.pow(2, -10 * (n - 1)) + 2);\n};\nexports.inCirc = function (n) {\n return 1 - Math.sqrt(1 - n * n);\n};\nexports.outCirc = function (n) {\n return Math.sqrt(1 - --n * n);\n};\nexports.inOutCirc = function (n) {\n n *= 2;\n if (n < 1) return -0.5 * (Math.sqrt(1 - n * n) - 1);\n return 0.5 * (Math.sqrt(1 - (n -= 2) * n) + 1);\n};\nexports.inBack = function (n) {\n var s = 1.70158;\n return n * n * ((s + 1) * n - s);\n};\nexports.outBack = function (n) {\n var s = 1.70158;\n return --n * n * ((s + 1) * n + s) + 1;\n};\nexports.inOutBack = function (n) {\n var s = 1.70158 * 1.525;\n if ((n *= 2) < 1) return 0.5 * (n * n * ((s + 1) * n - s));\n return 0.5 * ((n -= 2) * n * ((s + 1) * n + s) + 2);\n};\nexports.inBounce = function (n) {\n return 1 - exports.outBounce(1 - n);\n};\nexports.outBounce = function (n) {\n if (n < 1 / 2.75) {\n return 7.5625 * n * n;\n } else if (n < 2 / 2.75) {\n return 7.5625 * (n -= 1.5 / 2.75) * n + 0.75;\n } else if (n < 2.5 / 2.75) {\n return 7.5625 * (n -= 2.25 / 2.75) * n + 0.9375;\n } else {\n return 7.5625 * (n -= 2.625 / 2.75) * n + 0.984375;\n }\n};\nexports.inOutBounce = function (n) {\n if (n < .5) return exports.inBounce(n * 2) * .5;\n return exports.outBounce(n * 2 - 1) * .5 + .5;\n};\n\n// aliases\n\nexports['in-quad'] = exports.inQuad;\nexports['out-quad'] = exports.outQuad;\nexports['in-out-quad'] = exports.inOutQuad;\nexports['in-cube'] = exports.inCube;\nexports['out-cube'] = exports.outCube;\nexports['in-out-cube'] = exports.inOutCube;\nexports['in-quart'] = exports.inQuart;\nexports['out-quart'] = exports.outQuart;\nexports['in-out-quart'] = exports.inOutQuart;\nexports['in-quint'] = exports.inQuint;\nexports['out-quint'] = exports.outQuint;\nexports['in-out-quint'] = exports.inOutQuint;\nexports['in-sine'] = exports.inSine;\nexports['out-sine'] = exports.outSine;\nexports['in-out-sine'] = exports.inOutSine;\nexports['in-expo'] = exports.inExpo;\nexports['out-expo'] = exports.outExpo;\nexports['in-out-expo'] = exports.inOutExpo;\nexports['in-circ'] = exports.inCirc;\nexports['out-circ'] = exports.outCirc;\nexports['in-out-circ'] = exports.inOutCirc;\nexports['in-back'] = exports.inBack;\nexports['out-back'] = exports.outBack;\nexports['in-out-back'] = exports.inOutBack;\nexports['in-bounce'] = exports.inBounce;\nexports['out-bounce'] = exports.outBounce;\nexports['in-out-bounce'] = exports.inOutBounce;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar React = require(\"react\");\nvar prosemirror_history_1 = require(\"prosemirror-history\");\nvar undo_1 = require(\"./icons/undo\");\nexports.default = function (props) {\n var _a = props.view,\n state = _a.state,\n dispatch = _a.dispatch;\n var depth = (0, prosemirror_history_1.undoDepth)(state);\n if (!depth) {\n return React.createElement(React.Fragment, null);\n }\n return React.createElement(\"button\", {\n className: \"smartblock-backbtn\",\n onClick: function () {\n (0, prosemirror_history_1.undo)(state, dispatch);\n }\n }, React.createElement(undo_1.default, {\n style: {\n width: '24px',\n height: '24px'\n }\n }));\n};","/**\n * toString ref.\n */\n\nvar toString = Object.prototype.toString;\n\n/**\n * Return the type of `val`.\n *\n * @param {Mixed} val\n * @return {String}\n * @api public\n */\n\nmodule.exports = function (val) {\n switch (toString.call(val)) {\n case '[object Date]':\n return 'date';\n case '[object RegExp]':\n return 'regexp';\n case '[object Arguments]':\n return 'arguments';\n case '[object Array]':\n return 'array';\n case '[object Error]':\n return 'error';\n }\n if (val === null) return 'null';\n if (val === undefined) return 'undefined';\n if (val !== val) return 'nan';\n if (val && val.nodeType === 1) return 'element';\n val = val.valueOf ? val.valueOf() : Object.prototype.valueOf.apply(val);\n return typeof val;\n};","/*!\n * imagesLoaded v4.1.4\n * JavaScript is all like \"You images are done yet or what?\"\n * MIT License\n */\n\n(function (window, factory) {\n 'use strict';\n\n // universal module definition\n\n /*global define: false, module: false, require: false */\n if (typeof define == 'function' && define.amd) {\n // AMD\n define(['ev-emitter/ev-emitter'], function (EvEmitter) {\n return factory(window, EvEmitter);\n });\n } else if (typeof module == 'object' && module.exports) {\n // CommonJS\n module.exports = factory(window, require('ev-emitter'));\n } else {\n // browser global\n window.imagesLoaded = factory(window, window.EvEmitter);\n }\n})(typeof window !== 'undefined' ? window : this,\n// -------------------------- factory -------------------------- //\n\nfunction factory(window, EvEmitter) {\n 'use strict';\n\n var $ = window.jQuery;\n var console = window.console;\n\n // -------------------------- helpers -------------------------- //\n\n // extend objects\n function extend(a, b) {\n for (var prop in b) {\n a[prop] = b[prop];\n }\n return a;\n }\n var arraySlice = Array.prototype.slice;\n\n // turn element or nodeList into an array\n function makeArray(obj) {\n if (Array.isArray(obj)) {\n // use object if already an array\n return obj;\n }\n var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';\n if (isArrayLike) {\n // convert nodeList to array\n return arraySlice.call(obj);\n }\n\n // array of single index\n return [obj];\n }\n\n // -------------------------- imagesLoaded -------------------------- //\n\n /**\n * @param {Array, Element, NodeList, String} elem\n * @param {Object or Function} options - if function, use as callback\n * @param {Function} onAlways - callback function\n */\n function ImagesLoaded(elem, options, onAlways) {\n // coerce ImagesLoaded() without new, to be new ImagesLoaded()\n if (!(this instanceof ImagesLoaded)) {\n return new ImagesLoaded(elem, options, onAlways);\n }\n // use elem as selector string\n var queryElem = elem;\n if (typeof elem == 'string') {\n queryElem = document.querySelectorAll(elem);\n }\n // bail if bad element\n if (!queryElem) {\n console.error('Bad element for imagesLoaded ' + (queryElem || elem));\n return;\n }\n this.elements = makeArray(queryElem);\n this.options = extend({}, this.options);\n // shift arguments if no options set\n if (typeof options == 'function') {\n onAlways = options;\n } else {\n extend(this.options, options);\n }\n if (onAlways) {\n this.on('always', onAlways);\n }\n this.getImages();\n if ($) {\n // add jQuery Deferred object\n this.jqDeferred = new $.Deferred();\n }\n\n // HACK check async to allow time to bind listeners\n setTimeout(this.check.bind(this));\n }\n ImagesLoaded.prototype = Object.create(EvEmitter.prototype);\n ImagesLoaded.prototype.options = {};\n ImagesLoaded.prototype.getImages = function () {\n this.images = [];\n\n // filter & find items if we have an item selector\n this.elements.forEach(this.addElementImages, this);\n };\n\n /**\n * @param {Node} element\n */\n ImagesLoaded.prototype.addElementImages = function (elem) {\n // filter siblings\n if (elem.nodeName == 'IMG') {\n this.addImage(elem);\n }\n // get background image on element\n if (this.options.background === true) {\n this.addElementBackgroundImages(elem);\n }\n\n // find children\n // no non-element nodes, #143\n var nodeType = elem.nodeType;\n if (!nodeType || !elementNodeTypes[nodeType]) {\n return;\n }\n var childImgs = elem.querySelectorAll('img');\n // concat childElems to filterFound array\n for (var i = 0; i < childImgs.length; i++) {\n var img = childImgs[i];\n this.addImage(img);\n }\n\n // get child background images\n if (typeof this.options.background == 'string') {\n var children = elem.querySelectorAll(this.options.background);\n for (i = 0; i < children.length; i++) {\n var child = children[i];\n this.addElementBackgroundImages(child);\n }\n }\n };\n var elementNodeTypes = {\n 1: true,\n 9: true,\n 11: true\n };\n ImagesLoaded.prototype.addElementBackgroundImages = function (elem) {\n var style = getComputedStyle(elem);\n if (!style) {\n // Firefox returns null if in a hidden iframe https://bugzil.la/548397\n return;\n }\n // get url inside url(\"...\")\n var reURL = /url\\((['\"])?(.*?)\\1\\)/gi;\n var matches = reURL.exec(style.backgroundImage);\n while (matches !== null) {\n var url = matches && matches[2];\n if (url) {\n this.addBackground(url, elem);\n }\n matches = reURL.exec(style.backgroundImage);\n }\n };\n\n /**\n * @param {Image} img\n */\n ImagesLoaded.prototype.addImage = function (img) {\n var loadingImage = new LoadingImage(img);\n this.images.push(loadingImage);\n };\n ImagesLoaded.prototype.addBackground = function (url, elem) {\n var background = new Background(url, elem);\n this.images.push(background);\n };\n ImagesLoaded.prototype.check = function () {\n var _this = this;\n this.progressedCount = 0;\n this.hasAnyBroken = false;\n // complete if no images\n if (!this.images.length) {\n this.complete();\n return;\n }\n function onProgress(image, elem, message) {\n // HACK - Chrome triggers event before object properties have changed. #83\n setTimeout(function () {\n _this.progress(image, elem, message);\n });\n }\n this.images.forEach(function (loadingImage) {\n loadingImage.once('progress', onProgress);\n loadingImage.check();\n });\n };\n ImagesLoaded.prototype.progress = function (image, elem, message) {\n this.progressedCount++;\n this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;\n // progress event\n this.emitEvent('progress', [this, image, elem]);\n if (this.jqDeferred && this.jqDeferred.notify) {\n this.jqDeferred.notify(this, image);\n }\n // check if completed\n if (this.progressedCount == this.images.length) {\n this.complete();\n }\n if (this.options.debug && console) {\n console.log('progress: ' + message, image, elem);\n }\n };\n ImagesLoaded.prototype.complete = function () {\n var eventName = this.hasAnyBroken ? 'fail' : 'done';\n this.isComplete = true;\n this.emitEvent(eventName, [this]);\n this.emitEvent('always', [this]);\n if (this.jqDeferred) {\n var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';\n this.jqDeferred[jqMethod](this);\n }\n };\n\n // -------------------------- -------------------------- //\n\n function LoadingImage(img) {\n this.img = img;\n }\n LoadingImage.prototype = Object.create(EvEmitter.prototype);\n LoadingImage.prototype.check = function () {\n // If complete is true and browser supports natural sizes,\n // try to check for image status manually.\n var isComplete = this.getIsImageComplete();\n if (isComplete) {\n // report based on naturalWidth\n this.confirm(this.img.naturalWidth !== 0, 'naturalWidth');\n return;\n }\n\n // If none of the checks above matched, simulate loading on detached element.\n this.proxyImage = new Image();\n this.proxyImage.addEventListener('load', this);\n this.proxyImage.addEventListener('error', this);\n // bind to image as well for Firefox. #191\n this.img.addEventListener('load', this);\n this.img.addEventListener('error', this);\n this.proxyImage.src = this.img.src;\n };\n LoadingImage.prototype.getIsImageComplete = function () {\n // check for non-zero, non-undefined naturalWidth\n // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671\n return this.img.complete && this.img.naturalWidth;\n };\n LoadingImage.prototype.confirm = function (isLoaded, message) {\n this.isLoaded = isLoaded;\n this.emitEvent('progress', [this, this.img, message]);\n };\n\n // ----- events ----- //\n\n // trigger specified handler for event type\n LoadingImage.prototype.handleEvent = function (event) {\n var method = 'on' + event.type;\n if (this[method]) {\n this[method](event);\n }\n };\n LoadingImage.prototype.onload = function () {\n this.confirm(true, 'onload');\n this.unbindEvents();\n };\n LoadingImage.prototype.onerror = function () {\n this.confirm(false, 'onerror');\n this.unbindEvents();\n };\n LoadingImage.prototype.unbindEvents = function () {\n this.proxyImage.removeEventListener('load', this);\n this.proxyImage.removeEventListener('error', this);\n this.img.removeEventListener('load', this);\n this.img.removeEventListener('error', this);\n };\n\n // -------------------------- Background -------------------------- //\n\n function Background(url, element) {\n this.url = url;\n this.element = element;\n this.img = new Image();\n }\n\n // inherit LoadingImage prototype\n Background.prototype = Object.create(LoadingImage.prototype);\n Background.prototype.check = function () {\n this.img.addEventListener('load', this);\n this.img.addEventListener('error', this);\n this.img.src = this.url;\n // check if image is already complete\n var isComplete = this.getIsImageComplete();\n if (isComplete) {\n this.confirm(this.img.naturalWidth !== 0, 'naturalWidth');\n this.unbindEvents();\n }\n };\n Background.prototype.unbindEvents = function () {\n this.img.removeEventListener('load', this);\n this.img.removeEventListener('error', this);\n };\n Background.prototype.confirm = function (isLoaded, message) {\n this.isLoaded = isLoaded;\n this.emitEvent('progress', [this, this.element, message]);\n };\n\n // -------------------------- jQuery -------------------------- //\n\n ImagesLoaded.makeJQueryPlugin = function (jQuery) {\n jQuery = jQuery || window.jQuery;\n if (!jQuery) {\n return;\n }\n // set local variable\n $ = jQuery;\n // $().imagesLoaded()\n $.fn.imagesLoaded = function (options, callback) {\n var instance = new ImagesLoaded(this, options, callback);\n return instance.jqDeferred.promise($(this));\n };\n };\n // try making plugin\n ImagesLoaded.makeJQueryPlugin();\n\n // -------------------------- -------------------------- //\n\n return ImagesLoaded;\n});"],"sourceRoot":""} \ No newline at end of file diff --git a/404.html b/404.html index 44a5daf..8e26fc9 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -404: Not Found | SmartBlock
Getting Started
Extensions
API
Community

GitHub Download

version 1.3.2

SmartBlock

Not Found

You just hit a route that doesn't exist... the sadness.

Document

Usage, introduction of other functions, component introduction etc.
are described in detail in the document.

Get Started

View on GitHub

SmartBlock was developed by @appleplecom and is open source (MIT license) on GitHub.
Please send us feedback, requests, bug reports and pull requests!

If you like it, please press Star ;)

GitHub page

If you like our project, we glad to have star! :)

GitHub
SmartBlock

A modern block styled editor built with React.
SmartBlock is provided with MIT license. Made by @appleple ♥ OSS

\ No newline at end of file +404: Not Found | SmartBlock
Getting Started
Extensions
API
Community

GitHub Download

version 1.3.2

SmartBlock

Not Found

You just hit a route that doesn't exist... the sadness.

Document

Usage, introduction of other functions, component introduction etc.
are described in detail in the document.

Get Started

View on GitHub

SmartBlock was developed by @appleplecom and is open source (MIT license) on GitHub.
Please send us feedback, requests, bug reports and pull requests!

If you like it, please press Star ;)

GitHub page

If you like our project, we glad to have star! :)

GitHub
SmartBlock

A modern block styled editor built with React.
SmartBlock is provided with MIT license. Made by @appleple ♥ OSS

\ No newline at end of file diff --git a/404/index.html b/404/index.html index 6472a03..5b178f7 100644 --- a/404/index.html +++ b/404/index.html @@ -1 +1 @@ -404: Not Found | SmartBlock
Getting Started
Extensions
API
Community

GitHub Download

version 1.3.2

SmartBlock

Not Found

You just hit a route that doesn't exist... the sadness.

Document

Usage, introduction of other functions, component introduction etc.
are described in detail in the document.

Get Started

View on GitHub

SmartBlock was developed by @appleplecom and is open source (MIT license) on GitHub.
Please send us feedback, requests, bug reports and pull requests!

If you like it, please press Star ;)

GitHub page

If you like our project, we glad to have star! :)

GitHub
SmartBlock

A modern block styled editor built with React.
SmartBlock is provided with MIT license. Made by @appleple ♥ OSS

\ No newline at end of file +404: Not Found | SmartBlock
Getting Started
Extensions
API
Community

GitHub Download

version 1.3.2

SmartBlock

Not Found

You just hit a route that doesn't exist... the sadness.

Document

Usage, introduction of other functions, component introduction etc.
are described in detail in the document.

Get Started

View on GitHub

SmartBlock was developed by @appleplecom and is open source (MIT license) on GitHub.
Please send us feedback, requests, bug reports and pull requests!

If you like it, please press Star ;)

GitHub page

If you like our project, we glad to have star! :)

GitHub
SmartBlock

A modern block styled editor built with React.
SmartBlock is provided with MIT license. Made by @appleple ♥ OSS

\ No newline at end of file diff --git a/app-293e545d1846e72cd1dd.js b/app-293e545d1846e72cd1dd.js deleted file mode 100644 index bbe95d3..0000000 --- a/app-293e545d1846e72cd1dd.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see app-293e545d1846e72cd1dd.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+ZDr":function(t,e,n){"use strict";var r=n("TqRt");e.__esModule=!0,e.withPrefix=h,e.withAssetPrefix=function(t){return h(t,m())},e.navigateTo=e.replace=e.push=e.navigate=e.default=void 0;var o=r(n("8OQS")),a=r(n("PJYZ")),i=r(n("VbXa")),s=r(n("pVnL")),c=r(n("17x9")),u=r(n("q1tI")),l=n("YwZP"),p=n("LYrO"),d=n("cu4x");e.parsePath=d.parsePath;var f=function(t){return null==t?void 0:t.startsWith("/")};function h(t,e){var n,r;if(void 0===e&&(e=v()),!g(t))return t;if(t.startsWith("./")||t.startsWith("../"))return t;var o=null!==(n=null!==(r=e)&&void 0!==r?r:m())&&void 0!==n?n:"/";return""+((null==o?void 0:o.endsWith("/"))?o.slice(0,-1):o)+(t.startsWith("/")?t:"/"+t)}var m=function(){return"/smartblock"},v=function(){return"/smartblock"},g=function(t){return t&&!t.startsWith("http://")&&!t.startsWith("https://")&&!t.startsWith("//")};var y=function(t,e){return"number"==typeof t?t:g(t)?f(t)?h(t):function(t,e){return f(t)?t:(0,p.resolve)(t,e)}(t,e):t},b={activeClassName:c.default.string,activeStyle:c.default.object,partiallyActive:c.default.bool};function w(t){return u.default.createElement(l.Location,null,(function(e){var n=e.location;return u.default.createElement(P,(0,s.default)({},t,{_location:n}))}))}var P=function(t){function e(e){var n;(n=t.call(this,e)||this).defaultGetProps=function(t){var e=t.isPartiallyCurrent,r=t.isCurrent;return(n.props.partiallyActive?e:r)?{className:[n.props.className,n.props.activeClassName].filter(Boolean).join(" "),style:(0,s.default)({},n.props.style,n.props.activeStyle)}:null};var r=!1;return"undefined"!=typeof window&&window.IntersectionObserver&&(r=!0),n.state={IOSupported:r},n.handleRef=n.handleRef.bind((0,a.default)(n)),n}(0,i.default)(e,t);var n=e.prototype;return n._prefetch=function(){var t=window.location.pathname;this.props._location&&this.props._location.pathname&&(t=this.props._location.pathname);var e=y(this.props.to,t),n=(0,d.parsePath)(e).pathname;t!==n&&___loader.enqueue(n)},n.componentDidUpdate=function(t,e){this.props.to===t.to||this.state.IOSupported||this._prefetch()},n.componentDidMount=function(){this.state.IOSupported||this._prefetch()},n.componentWillUnmount=function(){if(this.io){var t=this.io,e=t.instance,n=t.el;e.unobserve(n),e.disconnect()}},n.handleRef=function(t){var e,n,r,o=this;this.props.innerRef&&this.props.innerRef.hasOwnProperty("current")?this.props.innerRef.current=t:this.props.innerRef&&this.props.innerRef(t),this.state.IOSupported&&t&&(this.io=(e=t,n=function(){o._prefetch()},(r=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(r.unobserve(e),r.disconnect(),n())}))}))).observe(e),{instance:r,el:e}))},n.render=function(){var t=this,e=this.props,n=e.to,r=e.getProps,a=void 0===r?this.defaultGetProps:r,i=e.onClick,c=e.onMouseEnter,p=(e.activeClassName,e.activeStyle,e.innerRef,e.partiallyActive,e.state),f=e.replace,h=e._location,m=(0,o.default)(e,["to","getProps","onClick","onMouseEnter","activeClassName","activeStyle","innerRef","partiallyActive","state","replace","_location"]);var v=y(n,h.pathname);return g(v)?u.default.createElement(l.Link,(0,s.default)({to:v,state:p,getProps:a,innerRef:this.handleRef,onMouseEnter:function(t){c&&c(t),___loader.hovering((0,d.parsePath)(v).pathname)},onClick:function(e){if(i&&i(e),!(0!==e.button||t.props.target||e.defaultPrevented||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault();var n=f,r=encodeURI(v)===h.pathname;"boolean"!=typeof f&&r&&(n=!0),window.___navigate(v,{state:p,replace:n})}return!0}},m)):u.default.createElement("a",(0,s.default)({href:v},m))},e}(u.default.Component);P.propTypes=(0,s.default)({},b,{onClick:c.default.func,to:c.default.string.isRequired,replace:c.default.bool,state:c.default.object});var R=function(t,e,n){return console.warn('The "'+t+'" method is now deprecated and will be removed in Gatsby v'+n+'. Please use "'+e+'" instead.')},_=u.default.forwardRef((function(t,e){return u.default.createElement(w,(0,s.default)({innerRef:e},t))}));e.default=_;e.navigate=function(t,e){window.___navigate(y(t,window.location.pathname),e)};var O=function(t){R("push","navigate",3),window.___push(y(t,window.location.pathname))};e.push=O;e.replace=function(t){R("replace","navigate",3),window.___replace(y(t,window.location.pathname))};e.navigateTo=function(t){return R("navigateTo","navigate",3),O(t)}},"/hTd":function(t,e,n){"use strict";e.__esModule=!0,e.SessionStorage=void 0;var r=function(){function t(){}var e=t.prototype;return e.read=function(t,e){var n=this.getStateKey(t,e);try{var r=window.sessionStorage.getItem(n);return r?JSON.parse(r):0}catch(o){return window&&window.___GATSBY_REACT_ROUTER_SCROLL&&window.___GATSBY_REACT_ROUTER_SCROLL[n]?window.___GATSBY_REACT_ROUTER_SCROLL[n]:0}},e.save=function(t,e,n){var r=this.getStateKey(t,e),o=JSON.stringify(n);try{window.sessionStorage.setItem(r,o)}catch(a){window&&window.___GATSBY_REACT_ROUTER_SCROLL||(window.___GATSBY_REACT_ROUTER_SCROLL={}),window.___GATSBY_REACT_ROUTER_SCROLL[r]=JSON.parse(o)}},e.getStateKey=function(t,e){var n="@@scroll|"+t.pathname;return null==e?n:n+"|"+e},t}();e.SessionStorage=r},"284h":function(t,e,n){var r=n("cDf5").default;function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(o=function(t){return t?n:e})(t)}t.exports=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=o(e);if(n&&n.has(t))return n.get(t);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var c=i?Object.getOwnPropertyDescriptor(t,s):null;c&&(c.get||c.set)?Object.defineProperty(a,s,c):a[s]=t[s]}return a.default=t,n&&n.set(t,a),a},t.exports.__esModule=!0,t.exports.default=t.exports},"30RF":function(t,e,n){"use strict";n.d(e,"d",(function(){return l})),n.d(e,"a",(function(){return p})),n.d(e,"c",(function(){return d})),n.d(e,"b",(function(){return f}));var r=n("LYrO"),o=n("cSJ8"),a=t=>void 0===t?t:"/"===t?"/":"/"===t.charAt(t.length-1)?t.slice(0,-1):t;const i=new Map;let s=[];const c=t=>{const e=decodeURIComponent(t);return Object(o.a)(e,"/smartblock").split("#")[0].split("?")[0]};function u(t){return t.startsWith("/")||t.startsWith("https://")||t.startsWith("http://")?t:new URL(t,window.location.href+(window.location.href.endsWith("/")?"":"/")).pathname}const l=t=>{s=t},p=t=>{const e=h(t),n=s.map(t=>{let{path:e,matchPath:n}=t;return{path:n,originalPath:e}}),o=Object(r.pick)(n,e);return o?a(o.route.originalPath):null},d=t=>{const e=h(t),n=s.map(t=>{let{path:e,matchPath:n}=t;return{path:n,originalPath:e}}),o=Object(r.pick)(n,e);return o?o.params:{}},f=t=>{const e=c(u(t));if(i.has(e))return i.get(e);let n=p(e);return n||(n=h(t)),i.set(e,n),n},h=t=>{let e=c(u(t));return"/index.html"===e&&(e="/"),e=a(e),e}},"3uz+":function(t,e,n){"use strict";e.__esModule=!0,e.useScrollRestoration=function(t){var e=(0,a.useLocation)(),n=(0,o.useContext)(r.ScrollContext),i=(0,o.useRef)();return(0,o.useLayoutEffect)((function(){if(i.current){var r=n.read(e,t);i.current.scrollTo(0,r||0)}}),[]),{ref:i,onScroll:function(){i.current&&n.save(e,t,i.current.scrollTop)}}};var r=n("Enzk"),o=n("q1tI"),a=n("YwZP")},"5yr3":function(t,e,n){"use strict";const r=function(t){return t=t||Object.create(null),{on:function(e,n){(t[e]||(t[e]=[])).push(n)},off:function(e,n){t[e]&&t[e].splice(t[e].indexOf(n)>>>0,1)},emit:function(e,n){(t[e]||[]).slice().map((function(t){t(n)})),(t["*"]||[]).slice().map((function(t){t(e,n)}))}}}();e.a=r},"7hJ6":function(t,e,n){"use strict";e.__esModule=!0,e.useScrollRestoration=e.ScrollContainer=e.ScrollContext=void 0;var r=n("Enzk");e.ScrollContext=r.ScrollHandler;var o=n("hd9s");e.ScrollContainer=o.ScrollContainer;var a=n("3uz+");e.useScrollRestoration=a.useScrollRestoration},"8OQS":function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o},t.exports.__esModule=!0,t.exports.default=t.exports},"94VI":function(t,e){e.polyfill=t=>t},"9Xx/":function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i}));var r=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},u=c.state,l=c.replace,p=void 0!==l&&l;if("number"==typeof e)t.history.go(e);else{u=r({},u,{key:Date.now()+""});try{i||p?t.history.replaceState(u,null,e):t.history.pushState(u,null,e)}catch(f){t.location[p?"replace":"assign"](e)}}a=o(t),i=!0;var d=new Promise((function(t){return s=t}));return n.forEach((function(t){return t({location:a,action:"PUSH"})})),d}}},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=t.indexOf("?"),n={pathname:e>-1?t.substr(0,e):t,search:e>-1?t.substr(e):""},r=0,o=[n],a=[null];return{get location(){return o[r]},addEventListener:function(t,e){},removeEventListener:function(t,e){},history:{get entries(){return o},get index(){return r},get state(){return a[r]},pushState:function(t,e,n){var i=n.split("?"),s=i[0],c=i[1],u=void 0===c?"":c;r++,o.push({pathname:s,search:u.length?"?"+u:u}),a.push(t)},replaceState:function(t,e,n){var i=n.split("?"),s=i[0],c=i[1],u=void 0===c?"":c;o[r]={pathname:s,search:u},a[r]=t},go:function(t){var e=r+t;e<0||e>a.length-1||(r=e)}}}},s=!("undefined"==typeof window||!window.document||!window.document.createElement),c=a(s?window:i()),u=c.navigate},"9hXx":function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;e.default=function(t,e){if(!Array.isArray(e))return"manifest.webmanifest";var n=e.find((function(e){return t.startsWith(e.start_url)}));return n?"manifest_"+n.lang+".webmanifest":"manifest.webmanifest"}},Enzk:function(t,e,n){"use strict";var r=n("284h"),o=n("TqRt");e.__esModule=!0,e.ScrollHandler=e.ScrollContext=void 0;var a=o(n("PJYZ")),i=o(n("VbXa")),s=r(n("q1tI")),c=o(n("17x9")),u=n("/hTd"),l=s.createContext(new u.SessionStorage);e.ScrollContext=l,l.displayName="GatsbyScrollContext";var p=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o{let{result:n}=e;return{element:n,props:t}}).pop()},e}(a.a.Component);e.a=u},JeVI:function(t){t.exports=JSON.parse("[]")},KQm4:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.score?-1:t.index-e.index}))},v=function(t){return t.replace(/(^\/+|\/+$)/g,"").split("/")},g=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r0})))&&n.length>0?"?"+n.join("&"):"")},y=["uri","path"],b=function(t,e){var n=Object.keys(t);return n.length===Object.keys(e).length&&n.every((function(n){return e.hasOwnProperty(n)&&t[n]===e[n]}))}},LeKB:function(t,e,n){t.exports=[{plugin:n("q9nr"),options:{plugins:[],maxWidth:590,pathPrefix:"/smartblock"}},{plugin:n("pWkz"),options:{plugins:[],head:!1,anonymize:!1,respectDNT:!1,exclude:[],pageTransitionDelay:0}},{plugin:n("npZl"),options:{plugins:[],name:"SmartBlock",short_name:"SmartBlock",start_url:"/",background_color:"#ffffff",theme_color:"#663399",display:"minimal-ui",icon:"static/favicon.png",legacy:!0,theme_color_in_head:!0,cache_busting_mode:"query",crossOrigin:"anonymous",include_favicon:!0,cacheDigest:"084321a740e799687cc736487af34310"}},{plugin:n("GddB"),options:{plugins:[]}}]},MMVs:function(t,e,n){t.exports=function(){var t=!1;-1!==navigator.appVersion.indexOf("MSIE 10")&&(t=!0);var e,n=[],r="object"==typeof document&&document,o=t?r.documentElement.doScroll("left"):r.documentElement.doScroll,a=r&&(o?/^loaded|^c/:/^loaded|^i|^c/).test(r.readyState);return!a&&r&&r.addEventListener("DOMContentLoaded",e=function(){for(r.removeEventListener("DOMContentLoaded",e),a=1;e=n.shift();)e()}),function(t){a?setTimeout(t,0):n.push(t)}}()},NSX3:function(t,e,n){"use strict";n.r(e);var r=n("xtsi");"https:"!==window.location.protocol&&"localhost"!==window.location.hostname?console.error("Service workers can only be used over HTTPS, or on localhost for development"):"serviceWorker"in navigator&&navigator.serviceWorker.register("/smartblock/sw.js").then((function(t){t.addEventListener("updatefound",()=>{Object(r.apiRunner)("onServiceWorkerUpdateFound",{serviceWorker:t});const e=t.installing;console.log("installingWorker",e),e.addEventListener("statechange",()=>{switch(e.state){case"installed":navigator.serviceWorker.controller?(window.___swUpdated=!0,Object(r.apiRunner)("onServiceWorkerUpdateReady",{serviceWorker:t}),window.___failedResources&&(console.log("resources failed, SW updated - reloading"),window.location.reload())):(console.log("Content is now available offline!"),Object(r.apiRunner)("onServiceWorkerInstalled",{serviceWorker:t}));break;case"redundant":console.error("The installing service worker became redundant."),Object(r.apiRunner)("onServiceWorkerRedundant",{serviceWorker:t});break;case"activated":Object(r.apiRunner)("onServiceWorkerActive",{serviceWorker:t})}})})})).catch((function(t){console.error("Error during service worker registration:",t)}))},NsGk:function(t,e,n){e.components={"component---src-pages-404-js":()=>Promise.all([n.e(0),n.e(3)]).then(n.bind(null,"w2l6")),"component---src-pages-index-js":()=>Promise.all([n.e(9),n.e(6),n.e(0),n.e(4)]).then(n.bind(null,"RXBc")),"component---src-templates-blog-post-js":()=>Promise.all([n.e(0),n.e(5)]).then(n.bind(null,"yZlL"))}},PJYZ:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},QLaP:function(t,e,n){"use strict";t.exports=function(t,e,n,r,o,a,i,s){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,s],l=0;(c=new Error(e.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},SksO:function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},TqRt:function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},UxWs:function(t,e,n){"use strict";n.r(e);var r=n("dI71"),o=n("xtsi"),a=n("q1tI"),i=n.n(a),s=n("i8i4"),c=n.n(s),u=n("YwZP"),l=n("7hJ6"),p=n("MMVs"),d=n.n(p),f=n("Wbzz"),h=n("emEt"),m=n("YLt+"),v=n("5yr3");const g={id:"gatsby-announcer",style:{position:"absolute",top:0,width:1,height:1,padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},"aria-live":"assertive","aria-atomic":"true"};var y=n("9Xx/"),b=n("+ZDr");const w=new Map,P=new Map;function R(t){let e=w.get(t);return e||(e=P.get(t.toLowerCase())),null!=e&&(window.___replace(e.toPath),!0)}m.forEach(t=>{t.ignoreCase?P.set(t.fromPath,t):w.set(t.fromPath,t)});const _=(t,e)=>{R(t.pathname)||Object(o.apiRunner)("onPreRouteUpdate",{location:t,prevLocation:e})},O=(t,e)=>{R(t.pathname)||Object(o.apiRunner)("onRouteUpdate",{location:t,prevLocation:e})},S=function(t,e){if(void 0===e&&(e={}),"number"==typeof t)return void y.c.navigate(t);let{pathname:n}=Object(b.parsePath)(t),r=w.get(n);if(r||(r=P.get(n.toLowerCase())),r&&(t=r.toPath,n=Object(b.parsePath)(t).pathname),window.___swUpdated)return void(window.location=n);const a=setTimeout(()=>{v.a.emit("onDelayedLoadPageResources",{pathname:n}),Object(o.apiRunner)("onRouteUpdateDelayed",{location:window.location})},1e3);h.default.loadPage(n).then(r=>{if(!r||r.status===h.PageResourceStatus.Error)return window.history.replaceState({},"",location.href),window.location=n,void clearTimeout(a);r&&r.page.webpackCompilationHash!==window.___webpackCompilationHash&&("serviceWorker"in navigator&&null!==navigator.serviceWorker.controller&&"activated"===navigator.serviceWorker.controller.state&&navigator.serviceWorker.controller.postMessage({gatsbyApi:"clearPathResources"}),window.location=n),Object(u.navigate)(t,e),clearTimeout(a)})};function x(t,e){let{location:n}=e;const{pathname:r,hash:a}=n,i=Object(o.apiRunner)("shouldUpdateScroll",{prevRouterProps:t,pathname:r,routerProps:{location:n},getSavedScrollPosition:t=>[0,this._stateStorage.read(t,t.key)]});if(i.length>0)return i[i.length-1];if(t){const{location:{pathname:e}}=t;if(e===r)return a?decodeURI(a.slice(1)):[0,0]}return!0}let E=function(t){function e(e){var n;return(n=t.call(this,e)||this).announcementRef=i.a.createRef(),n}Object(r.a)(e,t);var n=e.prototype;return n.componentDidUpdate=function(t,e){requestAnimationFrame(()=>{let t="new page at "+this.props.location.pathname;document.title&&(t=document.title);const e=document.querySelectorAll("#gatsby-focus-wrapper h1");e&&e.length&&(t=e[0].textContent);const n="Navigated to "+t;if(this.announcementRef.current){this.announcementRef.current.innerText!==n&&(this.announcementRef.current.innerText=n)}})},n.render=function(){return i.a.createElement("div",Object.assign({},g,{ref:this.announcementRef}))},e}(i.a.Component);const C=(t,e)=>{var n,r;return t.href!==e.href||(null==t||null===(n=t.state)||void 0===n?void 0:n.key)!==(null==e||null===(r=e.state)||void 0===r?void 0:r.key)};let j=function(t){function e(e){var n;return n=t.call(this,e)||this,_(e.location,null),n}Object(r.a)(e,t);var n=e.prototype;return n.componentDidMount=function(){O(this.props.location,null)},n.shouldComponentUpdate=function(t){return!!C(t.location,this.props.location)&&(_(this.props.location,t.location),!0)},n.componentDidUpdate=function(t){C(t.location,this.props.location)&&O(this.props.location,t.location)},n.render=function(){return i.a.createElement(i.a.Fragment,null,this.props.children,i.a.createElement(E,{location:location}))},e}(i.a.Component);var k=n("IOVJ"),L=n("NsGk"),T=n.n(L);function D(t,e){for(var n in t)if(!(n in e))return!0;for(var r in e)if(t[r]!==e[r])return!0;return!1}var M=function(t){function e(e){var n;n=t.call(this)||this;const{location:r,pageResources:o}=e;return n.state={location:{...r},pageResources:o||h.default.loadPageSync(r.pathname)},n}Object(r.a)(e,t),e.getDerivedStateFromProps=function(t,e){let{location:n}=t;if(e.location.href!==n.href){return{pageResources:h.default.loadPageSync(n.pathname),location:{...n}}}return{location:{...n}}};var n=e.prototype;return n.loadResources=function(t){h.default.loadPage(t).then(e=>{e&&e.status!==h.PageResourceStatus.Error?this.setState({location:{...window.location},pageResources:e}):(window.history.replaceState({},"",location.href),window.location=t)})},n.shouldComponentUpdate=function(t,e){return e.pageResources?this.state.pageResources!==e.pageResources||(this.state.pageResources.component!==e.pageResources.component||(this.state.pageResources.json!==e.pageResources.json||(!(this.state.location.key===e.location.key||!e.pageResources.page||!e.pageResources.page.matchPath&&!e.pageResources.page.path)||function(t,e,n){return D(t.props,e)||D(t.state,n)}(this,t,e)))):(this.loadResources(t.location.pathname),!1)},n.render=function(){return this.props.children(this.state)},e}(i.a.Component),U=n("cSJ8"),A=n("JeVI");const q=new h.ProdLoader(T.a,A);Object(h.setLoader)(q),q.setApiRunner(o.apiRunner),window.asyncRequires=T.a,window.___emitter=v.a,window.___loader=h.publicLoader,y.c.listen(t=>{t.location.action=t.action}),window.___push=t=>S(t,{replace:!1}),window.___replace=t=>S(t,{replace:!0}),window.___navigate=(t,e)=>S(t,e),R(window.location.pathname),Object(o.apiRunnerAsync)("onClientEntry").then(()=>{Object(o.apiRunner)("registerServiceWorker").length>0&&n("NSX3");const t=t=>i.a.createElement(u.BaseContext.Provider,{value:{baseuri:"/",basepath:"/"}},i.a.createElement(k.a,t)),e=i.a.createContext({});let a=function(t){function n(){return t.apply(this,arguments)||this}return Object(r.a)(n,t),n.prototype.render=function(){const{children:t}=this.props;return i.a.createElement(u.Location,null,n=>{let{location:r}=n;return i.a.createElement(M,{location:r},n=>{let{pageResources:r,location:o}=n;const a=Object(h.getStaticQueryResults)();return i.a.createElement(f.StaticQueryContext.Provider,{value:a},i.a.createElement(e.Provider,{value:{pageResources:r,location:o}},t))})})},n}(i.a.Component),s=function(n){function o(){return n.apply(this,arguments)||this}return Object(r.a)(o,n),o.prototype.render=function(){return i.a.createElement(e.Consumer,null,e=>{let{pageResources:n,location:r}=e;return i.a.createElement(j,{location:r},i.a.createElement(l.ScrollContext,{location:r,shouldUpdateScroll:x},i.a.createElement(u.Router,{basepath:"/smartblock",location:r,id:"gatsby-focus-wrapper"},i.a.createElement(t,Object.assign({path:"/404.html"===n.page.path?Object(U.a)(r.pathname,"/smartblock"):encodeURI(n.page.matchPath||n.page.path)},this.props,{location:r,pageResources:n},n.json)))))})},o}(i.a.Component);const{pagePath:p,location:m}=window;p&&"/smartblock"+p!==m.pathname&&!(q.findMatchPath(Object(U.a)(m.pathname,"/smartblock"))||"/404.html"===p||p.match(/^\/404\/?$/)||p.match(/^\/offline-plugin-app-shell-fallback\/?$/))&&Object(u.navigate)("/smartblock"+p+m.search+m.hash,{replace:!0}),h.publicLoader.loadPage(m.pathname).then(t=>{if(!t||t.status===h.PageResourceStatus.Error)throw new Error(`page resources for ${m.pathname} not found. Not rendering React`);window.___webpackCompilationHash=t.page.webpackCompilationHash;const e=Object(o.apiRunner)("wrapRootElement",{element:i.a.createElement(s,null)},i.a.createElement(s,null),t=>{let{result:e}=t;return{element:e}}).pop(),n=()=>i.a.createElement(a,null,e),r=Object(o.apiRunner)("replaceHydrateFunction",void 0,c.a.hydrate)[0];d()(()=>{r(i.a.createElement(n,null),"undefined"!=typeof window?document.getElementById("___gatsby"):void 0,()=>{Object(o.apiRunner)("onInitialClientRender")})})})})},VbXa:function(t,e,n){var r=n("SksO");t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},Wbzz:function(t,e,n){"use strict";n.r(e),n.d(e,"graphql",(function(){return m})),n.d(e,"StaticQueryContext",(function(){return p})),n.d(e,"StaticQuery",(function(){return f})),n.d(e,"useStaticQuery",(function(){return h})),n.d(e,"prefetchPathname",(function(){return l}));var r=n("q1tI"),o=n.n(r),a=n("+ZDr"),i=n.n(a);n.d(e,"Link",(function(){return i.a})),n.d(e,"withAssetPrefix",(function(){return a.withAssetPrefix})),n.d(e,"withPrefix",(function(){return a.withPrefix})),n.d(e,"parsePath",(function(){return a.parsePath})),n.d(e,"navigate",(function(){return a.navigate})),n.d(e,"push",(function(){return a.push})),n.d(e,"replace",(function(){return a.replace})),n.d(e,"navigateTo",(function(){return a.navigateTo}));var s=n("7hJ6");n.d(e,"useScrollRestoration",(function(){return s.useScrollRestoration}));var c=n("lw3w"),u=n.n(c);n.d(e,"PageRenderer",(function(){return u.a}));const l=n("emEt").default.enqueue,p=o.a.createContext({});function d(t){let{staticQueryData:e,data:n,query:r,render:a}=t;const i=n?n.data:e[r]&&e[r].data;return o.a.createElement(o.a.Fragment,null,i&&a(i),!i&&o.a.createElement("div",null,"Loading (StaticQuery)"))}const f=t=>{const{data:e,query:n,render:r,children:a}=t;return o.a.createElement(p.Consumer,null,t=>o.a.createElement(d,{data:e,query:n,render:r||a,staticQueryData:t}))},h=t=>{var e;o.a.useContext;const n=o.a.useContext(p);if(isNaN(Number(t)))throw new Error(`useStaticQuery was called with a string but expects to be called using \`graphql\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\`${t}\`);\n`);if(null!==(e=n[t])&&void 0!==e&&e.data)return n[t].data;throw new Error("The result of this StaticQuery could not be fetched.\n\nThis is likely a bug in Gatsby and if refreshing the page does not fix it, please open an issue in https://github.com/gatsbyjs/gatsby/issues")};function m(){throw new Error("It appears like Gatsby is misconfigured. Gatsby related `graphql` calls are supposed to only be evaluated at compile time, and then compiled away. Unfortunately, something went wrong and the query was left in the compiled code.\n\nUnless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.")}},"YLt+":function(t){t.exports=JSON.parse("[]")},YVoz:function(t,e,n){"use strict";t.exports=Object.assign},YwZP:function(t,e,n){"use strict";n.r(e),n.d(e,"Link",(function(){return T})),n.d(e,"Location",(function(){return b})),n.d(e,"LocationProvider",(function(){return w})),n.d(e,"Match",(function(){return I})),n.d(e,"Redirect",(function(){return q})),n.d(e,"Router",(function(){return _})),n.d(e,"ServerLocation",(function(){return P})),n.d(e,"isRedirect",(function(){return M})),n.d(e,"redirectTo",(function(){return U})),n.d(e,"useLocation",(function(){return W})),n.d(e,"useNavigate",(function(){return F})),n.d(e,"useParams",(function(){return N})),n.d(e,"useMatch",(function(){return J})),n.d(e,"BaseContext",(function(){return R}));var r=n("q1tI"),o=n.n(r),a=(n("17x9"),n("QLaP")),i=n.n(a),s=n("nqlD"),c=n.n(s),u=n("94VI"),l=n("LYrO");n.d(e,"matchPath",(function(){return l.match}));var p=n("9Xx/");n.d(e,"createHistory",(function(){return p.a})),n.d(e,"createMemorySource",(function(){return p.b})),n.d(e,"navigate",(function(){return p.d})),n.d(e,"globalHistory",(function(){return p.c}));var d=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var g=function(t,e){var n=c()(e);return n.displayName=t,n},y=g("Location"),b=function(t){var e=t.children;return o.a.createElement(y.Consumer,null,(function(t){return t?e(t):o.a.createElement(w,null,e)}))},w=function(t){function e(){var n,r;h(this,e);for(var o=arguments.length,a=Array(o),i=0;i-1?(a=e.substring(0,r),i=e.substring(r)):a=e,o.a.createElement(y.Provider,{value:{location:{pathname:a,search:i,hash:""},navigate:function(){throw new Error("You can't call navigate on the server.")}}},n)},R=g("Base",{baseuri:"/",basepath:"/"}),_=function(t){return o.a.createElement(R.Consumer,null,(function(e){return o.a.createElement(b,null,(function(n){return o.a.createElement(O,d({},e,n,t))}))}))},O=function(t){function e(){return h(this,e),m(this,t.apply(this,arguments))}return v(e,t),e.prototype.render=function(){var t=this.props,e=t.location,n=t.navigate,r=t.basepath,a=t.primary,i=t.children,s=(t.baseuri,t.component),c=void 0===s?"div":s,u=f(t,["location","navigate","basepath","primary","children","baseuri","component"]),p=o.a.Children.toArray(i).reduce((function(t,e){var n=G(r)(e);return t.concat(n)}),[]),h=e.pathname,m=Object(l.pick)(p,h);if(m){var v=m.params,g=m.uri,y=m.route,b=m.route.value;r=y.default?r:y.path.replace(/\*$/,"");var w=d({},v,{uri:g,location:e,navigate:function(t,e){return n(Object(l.resolve)(t,g),e)}}),P=o.a.cloneElement(b,w,b.props.children?o.a.createElement(_,{location:e,primary:a},b.props.children):void 0),O=a?x:c,S=a?d({uri:g,location:e,component:c},u):u;return o.a.createElement(R.Provider,{value:{baseuri:g,basepath:r}},o.a.createElement(O,S,P))}return null},e}(o.a.PureComponent);O.defaultProps={primary:!0};var S=g("Focus"),x=function(t){var e=t.uri,n=t.location,r=t.component,a=f(t,["uri","location","component"]);return o.a.createElement(S.Consumer,null,(function(t){return o.a.createElement(j,d({},a,{component:r,requestFocus:t,uri:e,location:n}))}))},E=!0,C=0,j=function(t){function e(){var n,r;h(this,e);for(var o=arguments.length,a=Array(o),i=0;i{if("undefined"==typeof document)return void r();const o=document.createElement("link");o.setAttribute("rel","prefetch"),o.setAttribute("href",t),Object.keys(e).forEach(t=>{o.setAttribute(t,e[t])}),o.onload=n,o.onerror=r;(document.getElementsByTagName("head")[0]||document.getElementsByName("script")[0].parentNode).appendChild(o)})}:function(t){return new Promise((e,n)=>{const r=new XMLHttpRequest;r.open("GET",t,!0),r.onload=()=>{200===r.status?e():n()},r.send(null)})},i={};var s=function(t,e){return new Promise(n=>{i[t]?n():a(t,e).then(()=>{n(),i[t]=!0}).catch(()=>{})})},c=n("5yr3"),u=n("30RF");const l={Error:"error",Success:"success"},p=t=>t&&t.default||t,d=t=>{var e;return`/smartblock/page-data/${"/"===t?"index":e=(e="/"===(e=t)[0]?e.slice(1):e).endsWith("/")?e.slice(0,-1):e}/page-data.json`};function f(t,e){return void 0===e&&(e="GET"),new Promise((n,r)=>{const o=new XMLHttpRequest;o.open(e,t,!0),o.onreadystatechange=()=>{4==o.readyState&&n(o)},o.send(null)})}const h=function(t,e){void 0===e&&(e=null);const n={componentChunkName:t.componentChunkName,path:t.path,webpackCompilationHash:t.webpackCompilationHash,matchPath:t.matchPath,staticQueryHashes:t.staticQueryHashes};return{component:e,json:t.result,page:n}};let m=function(){function t(t,e){this.inFlightNetworkRequests=new Map,this.pageDb=new Map,this.inFlightDb=new Map,this.staticQueryDb={},this.pageDataDb=new Map,this.prefetchTriggered=new Set,this.prefetchCompleted=new Set,this.loadComponent=t,Object(u.d)(e)}var e=t.prototype;return e.memoizedGet=function(t){let e=this.inFlightNetworkRequests.get(t);return e||(e=f(t,"GET"),this.inFlightNetworkRequests.set(t,e)),e.then(e=>(this.inFlightNetworkRequests.delete(t),e)).catch(e=>{throw this.inFlightNetworkRequests.delete(t),e})},e.setApiRunner=function(t){this.apiRunner=t,this.prefetchDisabled=t("disableCorePrefetching").some(t=>t)},e.fetchPageDataJson=function(t){const{pagePath:e,retries:n=0}=t,r=d(e);return this.memoizedGet(r).then(r=>{const{status:o,responseText:a}=r;if(200===o)try{const e=JSON.parse(a);if(void 0===e.path)throw new Error("not a valid pageData response");return Object.assign(t,{status:l.Success,payload:e})}catch(i){}return 404===o||200===o?"/404.html"===e?Object.assign(t,{status:l.Error}):this.fetchPageDataJson(Object.assign(t,{pagePath:"/404.html",notFound:!0})):500===o?Object.assign(t,{status:l.Error}):n<3?this.fetchPageDataJson(Object.assign(t,{retries:n+1})):Object.assign(t,{status:l.Error})})},e.loadPageDataJson=function(t){const e=Object(u.b)(t);if(this.pageDataDb.has(e)){const t=this.pageDataDb.get(e);return Promise.resolve(t)}return this.fetchPageDataJson({pagePath:e}).then(t=>(this.pageDataDb.set(e,t),t))},e.findMatchPath=function(t){return Object(u.a)(t)},e.loadPage=function(t){const e=Object(u.b)(t);if(this.pageDb.has(e)){const t=this.pageDb.get(e);return Promise.resolve(t.payload)}if(this.inFlightDb.has(e))return this.inFlightDb.get(e);const n=Promise.all([this.loadAppData(),this.loadPageDataJson(e)]).then(t=>{const n=t[1];if(n.status===l.Error)return{status:l.Error};let r=n.payload;const{componentChunkName:o,staticQueryHashes:a=[]}=r,i={},s=this.loadComponent(o).then(e=>{let o;return i.createdAt=new Date,e?(i.status=l.Success,!0===n.notFound&&(i.notFound=!0),r=Object.assign(r,{webpackCompilationHash:t[0]?t[0].webpackCompilationHash:""}),o=h(r,e)):i.status=l.Error,o}),u=Promise.all(a.map(t=>{if(this.staticQueryDb[t]){const e=this.staticQueryDb[t];return{staticQueryHash:t,jsonPayload:e}}return this.memoizedGet(`/smartblock/page-data/sq/d/${t}.json`).then(e=>{const n=JSON.parse(e.responseText);return{staticQueryHash:t,jsonPayload:n}})})).then(t=>{const e={};return t.forEach(t=>{let{staticQueryHash:n,jsonPayload:r}=t;e[n]=r,this.staticQueryDb[n]=r}),e});return Promise.all([s,u]).then(t=>{let n,[r,o]=t;return r&&(n={...r,staticQueryResults:o},i.payload=n,c.a.emit("onPostLoadPageResources",{page:n,pageResources:n})),this.pageDb.set(e,i),n})});return n.then(t=>{this.inFlightDb.delete(e)}).catch(t=>{throw this.inFlightDb.delete(e),t}),this.inFlightDb.set(e,n),n},e.loadPageSync=function(t){const e=Object(u.b)(t);if(this.pageDb.has(e)){return this.pageDb.get(e).payload}},e.shouldPrefetch=function(t){return!!(()=>{if("connection"in navigator&&void 0!==navigator.connection){if((navigator.connection.effectiveType||"").includes("2g"))return!1;if(navigator.connection.saveData)return!1}return!0})()&&!this.pageDb.has(t)},e.prefetch=function(t){if(!this.shouldPrefetch(t))return!1;if(this.prefetchTriggered.has(t)||(this.apiRunner("onPrefetchPathname",{pathname:t}),this.prefetchTriggered.add(t)),this.prefetchDisabled)return!1;const e=Object(u.b)(t);return this.doPrefetch(e).then(()=>{this.prefetchCompleted.has(t)||(this.apiRunner("onPostPrefetchPathname",{pathname:t}),this.prefetchCompleted.add(t))}),!0},e.doPrefetch=function(t){const e=d(t);return s(e,{crossOrigin:"anonymous",as:"fetch"}).then(()=>this.loadPageDataJson(t))},e.hovering=function(t){this.loadPage(t)},e.getResourceURLsForPathname=function(t){const e=Object(u.b)(t),n=this.pageDataDb.get(e);if(n){const t=h(n.payload);return[].concat(Object(o.a)(v(t.page.componentChunkName)),[d(e)])}return null},e.isPageNotFound=function(t){const e=Object(u.b)(t),n=this.pageDb.get(e);return!n||n.notFound},e.loadAppData=function(t){return void 0===t&&(t=0),this.memoizedGet("/smartblock/page-data/app-data.json").then(e=>{const{status:n,responseText:r}=e;let o;if(200!==n&&t<3)return this.loadAppData(t+1);if(200===n)try{const t=JSON.parse(r);if(void 0===t.webpackCompilationHash)throw new Error("not a valid app-data response");o=t}catch(a){}return o})},t}();const v=t=>(window.___chunkMapping[t]||[]).map(t=>"/smartblock"+t);let g,y=function(t){function e(e,n){return t.call(this,t=>e.components[t]?e.components[t]().then(p).catch(()=>null):Promise.resolve(),n)||this}Object(r.a)(e,t);var n=e.prototype;return n.doPrefetch=function(e){return t.prototype.doPrefetch.call(this,e).then(t=>{if(t.status!==l.Success)return Promise.resolve();const e=t.payload,n=e.componentChunkName,r=v(n);return Promise.all(r.map(s)).then(()=>e)})},n.loadPageDataJson=function(e){return t.prototype.loadPageDataJson.call(this,e).then(t=>t.notFound?f(e,"HEAD").then(e=>200===e.status?{status:l.Error}:t):t)},e}(m);const b=t=>{g=t},w={getResourcesForPathname:t=>(console.warn("Warning: getResourcesForPathname is deprecated. Use loadPage instead"),g.i.loadPage(t)),getResourcesForPathnameSync:t=>(console.warn("Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead"),g.i.loadPageSync(t)),enqueue:t=>g.prefetch(t),getResourceURLsForPathname:t=>g.getResourceURLsForPathname(t),loadPage:t=>g.loadPage(t),loadPageSync:t=>g.loadPageSync(t),prefetch:t=>g.prefetch(t),isPageNotFound:t=>g.isPageNotFound(t),hovering:t=>g.hovering(t),loadAppData:()=>g.loadAppData()};e.default=w;function P(){return g?g.staticQueryDb:{}}},hd9s:function(t,e,n){"use strict";var r=n("284h"),o=n("TqRt");e.__esModule=!0,e.ScrollContainer=void 0;var a=o(n("pVnL")),i=o(n("VbXa")),s=r(n("q1tI")),c=o(n("i8i4")),u=o(n("17x9")),l=n("Enzk"),p=n("YwZP"),d={scrollKey:u.default.string.isRequired,shouldUpdateScroll:u.default.func,children:u.default.element.isRequired},f=function(t){function e(e){return t.call(this,e)||this}(0,i.default)(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=this,e=c.default.findDOMNode(this),n=this.props,r=n.location,o=n.scrollKey;if(e){e.addEventListener("scroll",(function(){t.props.context.save(r,o,e.scrollTop)}));var a=this.props.context.read(r,o);e.scrollTo(0,a||0)}},n.render=function(){return this.props.children},e}(s.Component),h=function(t){return s.createElement(p.Location,null,(function(e){var n=e.location;return s.createElement(l.ScrollContext.Consumer,null,(function(e){return s.createElement(f,(0,a.default)({},t,{context:e,location:n}))}))}))};e.ScrollContainer=h,h.propTypes=d},lw3w:function(t,e,n){var r;t.exports=(r=n("rzlk"))&&r.default||r},npZl:function(t,e,n){"use strict";var r=n("TqRt");n("Wbzz"),r(n("9hXx"))},nqlD:function(t,e,n){const{createContext:r}=n("q1tI");t.exports=r,t.exports.default=r},nwwn:function(t,e,n){"use strict";e.DEFAULT_OPTIONS={maxWidth:650,wrapperStyle:"",backgroundColor:"white",linkImagesToOriginal:!0,showCaptions:!1,markdownCaptions:!1,withWebp:!1,withAvif:!1,tracedSVG:!1,loading:"lazy",disableBgImageOnAlpha:!1,disableBgImage:!1},e.EMPTY_ALT="GATSBY_EMPTY_ALT",e.imageClass="gatsby-resp-image-image",e.imageWrapperClass="gatsby-resp-image-wrapper",e.imageBackgroundClass="gatsby-resp-image-background-image"},pVnL:function(t,e){function n(){return t.exports=n=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let{location:e}=t;const n=a.default.loadPageSync(e.pathname);return n?o.a.createElement(i.a,{location:e,pageResources:n,...n.json}):null}},xtsi:function(t,e,n){const r=n("LeKB"),{getResourcesForPathname:o,getResourcesForPathnameSync:a,getResourceURLsForPathname:i,loadPage:s,loadPageSync:c}=n("emEt").publicLoader;e.apiRunner=function(t,e,n,u){void 0===e&&(e={});let l=r.map(n=>{if(!n.plugin[t])return;e.getResourcesForPathnameSync=a,e.getResourcesForPathname=o,e.getResourceURLsForPathname=i,e.loadPage=s,e.loadPageSync=c;const r=n.plugin[t](e,n.options);return r&&u&&(e=u({args:e,result:r,plugin:n})),r});return l=l.filter(t=>void 0!==t),l.length>0?l:n?[n]:[]},e.apiRunnerAsync=(t,e,n)=>r.reduce((n,r)=>r.plugin[t]?n.then(()=>r.plugin[t](e,r.options)):n,Promise.resolve())}},[["UxWs",1,7]]]); -//# sourceMappingURL=app-293e545d1846e72cd1dd.js.map \ No newline at end of file diff --git a/app-293e545d1846e72cd1dd.js.map b/app-293e545d1846e72cd1dd.js.map deleted file mode 100644 index de30c16..0000000 --- a/app-293e545d1846e72cd1dd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///./node_modules/gatsby-link/index.js","webpack:///./node_modules/gatsby-react-router-scroll/session-storage.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireWildcard.js","webpack:///./.cache/normalize-page-path.js","webpack:///./.cache/find-path.js","webpack:///./node_modules/gatsby-react-router-scroll/use-scroll-restoration.js","webpack:///./.cache/emitter.js","webpack:///./node_modules/mitt/dist/mitt.es.js","webpack:///./node_modules/gatsby-react-router-scroll/index.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./.cache/react-lifecycles-compat.js","webpack:///./node_modules/@reach/router/es/lib/history.js","webpack:///./node_modules/gatsby-plugin-manifest/get-manifest-pathname.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-handler.js","webpack:///./.cache/page-renderer.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/@reach/router/es/lib/utils.js","webpack:///./.cache/api-runner-browser-plugins.js","webpack:///./node_modules/@mikaelkristiansson/domready/ready.js","webpack:///./.cache/register-service-worker.js","webpack:///./.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js","webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./.cache/route-announcer-props.js","webpack:///./.cache/navigation.js","webpack:///./node_modules/shallow-compare/es/index.js","webpack:///./.cache/ensure-resources.js","webpack:///./.cache/production-app.js","webpack:///./node_modules/@babel/runtime/helpers/inheritsLoose.js","webpack:///./.cache/gatsby-browser-entry.js","webpack:///./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js","webpack:///./node_modules/@reach/router/es/index.js","webpack:///./node_modules/@babel/runtime/helpers/typeof.js","webpack:///./.cache/strip-prefix.js","webpack:///./node_modules/gatsby-link/parse-path.js","webpack:///./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///./.cache/prefetch.js","webpack:///./.cache/loader.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-container.js","webpack:///./.cache/public-page-renderer.js","webpack:///./node_modules/gatsby-plugin-manifest/gatsby-browser.js","webpack:///./.cache/create-react-context.js","webpack:///./node_modules/gatsby-remark-images/constants.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/gatsby-plugin-google-analytics/gatsby-browser.js","webpack:///./node_modules/gatsby-remark-images/gatsby-browser.js","webpack:///./.cache/public-page-renderer-prod.js","webpack:///./.cache/api-runner-browser.js"],"names":["_interopRequireDefault","exports","__esModule","withPrefix","withAssetPrefix","path","getGlobalPathPrefix","navigateTo","replace","push","navigate","default","_objectWithoutPropertiesLoose2","_assertThisInitialized2","_inheritsLoose2","_extends2","_propTypes","_react","_router","_utils","_parsePath","parsePath","isAbsolutePath","startsWith","prefix","_ref","_prefix","getGlobalBasePrefix","isLocalLink","base","endsWith","slice","rewriteLinkPath","relativeTo","current","resolve","absolutify","NavLinkPropTypes","activeClassName","string","activeStyle","object","partiallyActive","bool","GatsbyLinkLocationWrapper","props","createElement","Location","_ref2","location","GatsbyLink","_location","_React$Component","_this","call","this","defaultGetProps","_ref3","isPartiallyCurrent","isCurrent","className","filter","Boolean","join","style","IOSupported","window","IntersectionObserver","state","handleRef","bind","_proto","prototype","_prefetch","currentPath","pathname","rewrittenPath","to","newPathName","___loader","enqueue","componentDidUpdate","prevProps","prevState","componentDidMount","componentWillUnmount","io","_this$io","instance","el","unobserve","disconnect","ref","cb","_this2","innerRef","hasOwnProperty","entries","forEach","entry","target","isIntersecting","intersectionRatio","observe","render","_this3","_this$props","_this$props$getProps","getProps","_onClick","onClick","_onMouseEnter","onMouseEnter","rest","prefixedTo","Link","e","hovering","button","defaultPrevented","metaKey","altKey","ctrlKey","shiftKey","preventDefault","shouldReplace","encodeURI","___navigate","href","Component","propTypes","func","isRequired","showDeprecationWarning","functionName","altFunctionName","version","console","warn","_default","forwardRef","options","___push","___replace","SessionStorage","read","key","stateKey","getStateKey","value","sessionStorage","getItem","JSON","parse","save","storedValue","stringify","setItem","stateKeyBase","_typeof","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","module","obj","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","desc","set","undefined","charAt","length","pathCache","Map","matchPaths","trimPathname","rawPathname","decodeURIComponent","stripPrefix","__BASE_PATH__","split","URL","setMatchPaths","findMatchPath","trimmedPathname","cleanPath","pickPaths","map","matchPath","originalPath","pick","normalizePagePath","route","grabMatchParams","params","findPath","foundPath","useScrollRestoration","identifier","useLocation","useContext","_scrollHandler","ScrollContext","useRef","useLayoutEffect","position","scrollTo","onScroll","scrollTop","emitter","all","create","on","type","handler","off","splice","indexOf","emit","evt","mitt","ScrollContainer","ScrollHandler","_scrollContainer","_useScrollRestoration","source","excluded","i","sourceKeys","keys","polyfill","_extends","assign","arguments","getLocation","_source$location","search","hash","origin","protocol","host","hostname","port","canUseDOM","decodeURI","history","createHistory","listeners","transitioning","resolveTransition","_onTransitionComplete","listen","listener","popstateListener","action","addEventListener","removeEventListener","fn","_ref$replace","go","Date","now","replaceState","pushState","transition","Promise","res","createMemorySource","initialPath","searchIndex","initialLocation","substr","index","stack","states","name","_","uri","_uri$split","_uri$split$","_uri$split2","_uri$split2$","newIndex","document","globalHistory","localizedManifests","Array","isArray","localizedManifest","find","app","start_url","lang","_interopRequireWildcard","React","_sessionStorage","createContext","displayName","_len","args","_key","apply","concat","_stateStorage","scrollListener","scrollY","windowScroll","shouldUpdateScroll","scrollToHash","node","getElementById","substring","scrollIntoView","prevRouterProps","routerProps","scrollPosition","_this$props$location","_this$props$location2","Provider","children","element","PageRenderer","_inheritsLoose","pageResources","json","pageContext","__params","pathContext","replacementElement","apiRunner","loader","publicLoader","pageElement","component","page","result","pop","_arrayLikeToArray","arr","len","arr2","_toConsumableArray","iter","Symbol","iterator","from","o","minLen","n","toString","constructor","test","TypeError","routes","match","default_","uriPathname","uriSegments","segmentize","isRootUri","ranked","rankRoutes","l","missed","routeSegments","max","Math","routeSegment","uriSegment","isSplat","dynamicMatch","paramRe","exec","reservedNames","_to$split","toPathname","toQuery","basePathname","toSegments","baseSegments","addQuery","allSegments","segments","segment","insertParams","_path$split","pathBase","_path$split$","query","constructedPath","_params$location","_params$location$sear","searchSplit","validateRedirect","isDynamic","sort","rankRoute","score","reduce","isRootSegment","SEGMENT_POINTS","a","b","q","shallowCompare","obj1","obj2","obj1Keys","every","plugin","require","ie10","navigator","appVersion","fns","doc","hack","documentElement","doScroll","loaded","readyState","shift","setTimeout","definition","error","serviceWorker","register","then","reg","installingWorker","installing","log","controller","___swUpdated","___failedResources","reload","catch","components","component---src-pages-404-js","component---src-pages-index-js","component---src-templates-blog-post-js","self","ReferenceError","condition","format","c","d","f","Error","argIndex","framesToPop","_setPrototypeOf","p","setPrototypeOf","__proto__","RouteAnnouncerProps","id","top","width","height","padding","overflow","clip","whiteSpace","border","redirectMap","redirectIgnoreCaseMap","maybeRedirect","redirect","toLowerCase","toPath","redirects","ignoreCase","fromPath","onPreRouteUpdate","prevLocation","onRouteUpdate","timeoutId","loadPage","status","PageResourceStatus","clearTimeout","webpackCompilationHash","___webpackCompilationHash","postMessage","gatsbyApi","reachNavigate","results","getSavedScrollPosition","oldPathname","RouteAnnouncer","announcementRef","createRef","nextProps","requestAnimationFrame","pageName","title","pageHeadings","querySelectorAll","textContent","newAnnouncement","innerText","compareLocationProps","nextLocation","_prevLocation$state","_nextLocation$state","RouteUpdates","_React$Component2","_proto2","shouldComponentUpdate","Fragment","shallowDiffers","_i","EnsureResources","loadPageSync","getDerivedStateFromProps","loadResources","rawPath","setState","nextState","ProdLoader","asyncRequires","setLoader","setApiRunner","___emitter","apiRunnerAsync","RouteHandler","BaseContext","baseuri","basepath","DataContext","GatsbyRoot","staticQueryResults","getStaticQueryResults","StaticQueryContext","LocationHandler","Consumer","Router","pagePath","browserLoc","SiteRoot","_ref4","App","renderer","ReactDOM","hydrate","domReady","subClass","superClass","prefetchPathname","StaticQueryDataRenderer","staticQueryData","data","finalData","StaticQuery","useStaticQuery","_context$query","context","isNaN","Number","graphql","_objectWithoutProperties","_classCallCheck","Constructor","_possibleConstructorReturn","_inherits","enumerable","writable","configurable","createNamedContext","defaultValue","Ctx","LocationContext","LocationProvider","_temp","getContext","refs","unlisten","_props$history","componentDidCatch","info","isRedirect","_navigate","unmounted","defaultProps","ServerLocation","url","baseContext","locationContext","RouterImpl","_React$PureComponent","_props","_navigate2","primary","_props$component","domProps","Children","toArray","array","child","createRoute","clone","cloneElement","FocusWrapper","FocusHandler","wrapperProps","PureComponent","FocusContext","requestFocus","FocusHandlerImpl","initialRender","focusHandlerCount","_temp2","_this4","_len2","_key2","shouldFocus","focus","myURIChanged","navigatedUpToMe","contains","activeElement","_this5","_props2","_props2$component","Comp","outline","tabIndex","k","C","_ref5","_ref6","_props$getProps","anchorProps","encodedHref","event","shouldNavigate","_location$state","restState","RedirectRequest","redirectTo","RedirectImpl","_React$Component3","_props3","_props3$replace","noThrow","resolvedTo","_props4","Redirect","_ref7","Match","_ref8","_ref9","_ref10","resolvedPath","useNavigate","useParams","useMatch","stripSlashes","str","elementPath","hashIndex","supportedPrefetchStrategy","feature","fakeLink","relList","supports","err","support","reject","link","setAttribute","onload","onerror","getElementsByTagName","getElementsByName","parentNode","appendChild","req","XMLHttpRequest","open","send","preFetched","prefetch","Success","preferDefault","m","createPageDataUrl","s","doFetch","method","onreadystatechange","toPageResources","pageData","componentChunkName","staticQueryHashes","BaseLoader","loadComponent","inFlightNetworkRequests","pageDb","inFlightDb","staticQueryDb","pageDataDb","prefetchTriggered","Set","prefetchCompleted","memoizedGet","inFlightPromise","response","delete","prefetchDisabled","some","fetchPageDataJson","loadObj","retries","responseText","jsonPayload","payload","notFound","loadPageDataJson","loadAppData","allData","finalResult","componentChunkPromise","createdAt","staticQueryBatchPromise","staticQueryHash","staticQueryResultsMap","shouldPrefetch","doesConnectionSupportPrefetch","connection","effectiveType","includes","saveData","add","realPath","doPrefetch","pageDataUrl","prefetchHelper","crossOrigin","as","getResourceURLsForPathname","createComponentUrls","isPageNotFound","appData","___chunkMapping","chunk","__PATH_PREFIX__","_BaseLoader","chunkName","componentUrls","_loader","getResourcesForPathname","getResourcesForPathnameSync","_reactDom","scrollKey","ScrollContainerImplementation","findDOMNode","DEFAULT_OPTIONS","maxWidth","wrapperStyle","backgroundColor","linkImagesToOriginal","showCaptions","markdownCaptions","withWebp","withAvif","tracedSVG","loading","disableBgImageOnAlpha","disableBgImage","EMPTY_ALT","imageClass","imageWrapperClass","imageBackgroundClass","pluginOptions","ga","excludeGAPaths","rx","delay","pageTransitionDelay","_require","apiCallbackContext","imageWrappers","_loop","imageWrapper","backgroundElement","querySelector","imageElement","onImageLoad","onImageComplete","opacity","color","boxShadow","complete","ProdPageRenderer","InternalPageRenderer","plugins","api","defaultReturn","argTransform","previous","next"],"mappings":";6FAEA,IAAIA,EAAyB,EAAQ,QAErCC,EAAQC,YAAa,EACrBD,EAAQE,WAAaA,EACrBF,EAAQG,gBA4DR,SAAyBC,GACvB,OAAOF,EAAWE,EAAMC,MA5D1BL,EAAQM,WAAaN,EAAQO,QAAUP,EAAQQ,KAAOR,EAAQS,SAAWT,EAAQU,aAAU,EAE3F,IAAIC,EAAiCZ,EAAuB,EAAQ,SAEhEa,EAA0Bb,EAAuB,EAAQ,SAEzDc,EAAkBd,EAAuB,EAAQ,SAEjDe,EAAYf,EAAuB,EAAQ,SAE3CgB,EAAahB,EAAuB,EAAQ,SAE5CiB,EAASjB,EAAuB,EAAQ,SAExCkB,EAAU,EAAQ,QAElBC,EAAS,EAAQ,QAEjBC,EAAa,EAAQ,QAEzBnB,EAAQoB,UAAYD,EAAWC,UAE/B,IAAIC,EAAiB,SAAwBjB,GAC3C,OAAOA,aAAmC,EAASA,EAAKkB,WAAW,MAGrE,SAASpB,EAAWE,EAAMmB,GACxB,IAAIC,EAAMC,EAMV,QAJe,IAAXF,IACFA,EAASG,MAGNC,EAAYvB,GACf,OAAOA,EAGT,GAAIA,EAAKkB,WAAW,OAASlB,EAAKkB,WAAW,OAC3C,OAAOlB,EAGT,IAAIwB,EAAwG,QAAhGJ,EAA8B,QAAtBC,EAAUF,SAAgC,IAAZE,EAAqBA,EAAUpB,WAA4C,IAATmB,EAAkBA,EAAO,IAC7I,MAAO,KAAOI,aAAmC,EAASA,EAAKC,SAAS,MAAQD,EAAKE,MAAM,GAAI,GAAKF,IAASxB,EAAKkB,WAAW,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MAAMyd,EAAUnY,EAAS,SACnB,wBACJsV,EAAuB,4BACvBC,EAA2B,2BAC3BZ,EAA0B,SAC1BvQ,EAAQ,aACRoC,GACExG,EAAS,QAAW/E,aAExBlV,EAAQgV,UAAY,SAACqd,EAAKnf,EAAWof,EAAeC,QAAtB,IAAJrf,MAAO,IAY/B,IAAI4L,EAAUsT,EAAQlmB,IAAI8N,IACxB,IAAKA,EAAOA,OAAOqY,GACjB,OAIFnf,EAAKsc,4BAA8BA,EAEnCtc,EAAKqc,wBAA0BA,EAC/Brc,EAAK0b,2BAA6BA,EAClC1b,EAAKmL,SAAWA,EAChBnL,EAAKuN,aAAeA,EAEpB,MAAMnL,EAAS0E,EAAOA,OAAOqY,GAAKnf,EAAM8G,EAAOpR,SAI/C,OAHI0M,GAAUid,IACZrf,EAAOqf,EAAa,CAAErf,OAAMoC,SAAQ0E,YAE/B1E,IAMT,OAFAwJ,EAAUA,EAAQlb,OAAO0R,QAA6B,IAAZA,GAEtCwJ,EAAQ5T,OAAS,EACZ4T,EACEwT,EACF,CAACA,GAED,IAIXtyB,EAAQohB,eAAiB,CAACiR,EAAKnf,EAAMof,IACnCF,EAAQ/Y,OACN,CAACmZ,EAAUC,IACTA,EAAKzY,OAAOqY,GACRG,EAAStX,KAAK,IAAMuX,EAAKzY,OAAOqY,GAAKnf,EAAMuf,EAAK7pB,UAChD4pB,EACNxhB,QAAQ9O,a","file":"app-293e545d1846e72cd1dd.js","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.withPrefix = withPrefix;\nexports.withAssetPrefix = withAssetPrefix;\nexports.navigateTo = exports.replace = exports.push = exports.navigate = exports.default = void 0;\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _router = require(\"@reach/router\");\n\nvar _utils = require(\"@reach/router/lib/utils\");\n\nvar _parsePath = require(\"./parse-path\");\n\nexports.parsePath = _parsePath.parsePath;\n\nvar isAbsolutePath = function isAbsolutePath(path) {\n return path === null || path === void 0 ? void 0 : path.startsWith(\"/\");\n};\n\nfunction withPrefix(path, prefix) {\n var _ref, _prefix;\n\n if (prefix === void 0) {\n prefix = getGlobalBasePrefix();\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n if (path.startsWith(\"./\") || path.startsWith(\"../\")) {\n return path;\n }\n\n var base = (_ref = (_prefix = prefix) !== null && _prefix !== void 0 ? _prefix : getGlobalPathPrefix()) !== null && _ref !== void 0 ? _ref : \"/\";\n return \"\" + ((base === null || base === void 0 ? void 0 : base.endsWith(\"/\")) ? base.slice(0, -1) : base) + (path.startsWith(\"/\") ? path : \"/\" + path);\n} // These global values are wrapped in typeof clauses to ensure the values exist.\n// This is especially problematic in unit testing of this component.\n\n\nvar getGlobalPathPrefix = function getGlobalPathPrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __PATH_PREFIX__ !== \"undefined\" ? __PATH_PREFIX__ : undefined : __PATH_PREFIX__;\n};\n\nvar getGlobalBasePrefix = function getGlobalBasePrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __BASE_PATH__ !== \"undefined\" ? __BASE_PATH__ : undefined : __BASE_PATH__;\n};\n\nvar isLocalLink = function isLocalLink(path) {\n return path && !path.startsWith(\"http://\") && !path.startsWith(\"https://\") && !path.startsWith(\"//\");\n};\n\nfunction withAssetPrefix(path) {\n return withPrefix(path, getGlobalPathPrefix());\n}\n\nfunction absolutify(path, current) {\n // If it's already absolute, return as-is\n if (isAbsolutePath(path)) {\n return path;\n }\n\n return (0, _utils.resolve)(path, current);\n}\n\nvar rewriteLinkPath = function rewriteLinkPath(path, relativeTo) {\n if (typeof path === \"number\") {\n return path;\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n return isAbsolutePath(path) ? withPrefix(path) : absolutify(path, relativeTo);\n};\n\nvar NavLinkPropTypes = {\n activeClassName: _propTypes.default.string,\n activeStyle: _propTypes.default.object,\n partiallyActive: _propTypes.default.bool\n}; // Set up IntersectionObserver\n\nvar createIntersectionObserver = function createIntersectionObserver(el, cb) {\n var io = new window.IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n if (el === entry.target) {\n // Check if element is within viewport, remove listener, destroy observer, and run link callback.\n // MSEdge doesn't currently support isIntersecting, so also test for an intersectionRatio > 0\n if (entry.isIntersecting || entry.intersectionRatio > 0) {\n io.unobserve(el);\n io.disconnect();\n cb();\n }\n }\n });\n }); // Add element to the observer\n\n io.observe(el);\n return {\n instance: io,\n el: el\n };\n};\n\nfunction GatsbyLinkLocationWrapper(props) {\n return /*#__PURE__*/_react.default.createElement(_router.Location, null, function (_ref2) {\n var location = _ref2.location;\n return /*#__PURE__*/_react.default.createElement(GatsbyLink, (0, _extends2.default)({}, props, {\n _location: location\n }));\n });\n}\n\nvar GatsbyLink = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(GatsbyLink, _React$Component);\n\n function GatsbyLink(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // Default to no support for IntersectionObserver\n\n _this.defaultGetProps = function (_ref3) {\n var isPartiallyCurrent = _ref3.isPartiallyCurrent,\n isCurrent = _ref3.isCurrent;\n\n if (_this.props.partiallyActive ? isPartiallyCurrent : isCurrent) {\n return {\n className: [_this.props.className, _this.props.activeClassName].filter(Boolean).join(\" \"),\n style: (0, _extends2.default)({}, _this.props.style, _this.props.activeStyle)\n };\n }\n\n return null;\n };\n\n var IOSupported = false;\n\n if (typeof window !== \"undefined\" && window.IntersectionObserver) {\n IOSupported = true;\n }\n\n _this.state = {\n IOSupported: IOSupported\n };\n _this.handleRef = _this.handleRef.bind((0, _assertThisInitialized2.default)(_this));\n return _this;\n }\n\n var _proto = GatsbyLink.prototype;\n\n _proto._prefetch = function _prefetch() {\n var currentPath = window.location.pathname; // reach router should have the correct state\n\n if (this.props._location && this.props._location.pathname) {\n currentPath = this.props._location.pathname;\n }\n\n var rewrittenPath = rewriteLinkPath(this.props.to, currentPath);\n var newPathName = (0, _parsePath.parsePath)(rewrittenPath).pathname; // Prefech is used to speed up next navigations. When you use it on the current navigation,\n // there could be a race-condition where Chrome uses the stale data instead of waiting for the network to complete\n\n if (currentPath !== newPathName) {\n ___loader.enqueue(newPathName);\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Preserve non IO functionality if no support\n if (this.props.to !== prevProps.to && !this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n // Preserve non IO functionality if no support\n if (!this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (!this.io) {\n return;\n }\n\n var _this$io = this.io,\n instance = _this$io.instance,\n el = _this$io.el;\n instance.unobserve(el);\n instance.disconnect();\n };\n\n _proto.handleRef = function handleRef(ref) {\n var _this2 = this;\n\n if (this.props.innerRef && this.props.innerRef.hasOwnProperty(\"current\")) {\n this.props.innerRef.current = ref;\n } else if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n if (this.state.IOSupported && ref) {\n // If IO supported and element reference found, setup Observer functionality\n this.io = createIntersectionObserver(ref, function () {\n _this2._prefetch();\n });\n }\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var _this$props = this.props,\n to = _this$props.to,\n _this$props$getProps = _this$props.getProps,\n getProps = _this$props$getProps === void 0 ? this.defaultGetProps : _this$props$getProps,\n _onClick = _this$props.onClick,\n _onMouseEnter = _this$props.onMouseEnter,\n $activeClassName = _this$props.activeClassName,\n $activeStyle = _this$props.activeStyle,\n $innerRef = _this$props.innerRef,\n partiallyActive = _this$props.partiallyActive,\n state = _this$props.state,\n replace = _this$props.replace,\n _location = _this$props._location,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"to\", \"getProps\", \"onClick\", \"onMouseEnter\", \"activeClassName\", \"activeStyle\", \"innerRef\", \"partiallyActive\", \"state\", \"replace\", \"_location\"]);\n\n if (process.env.NODE_ENV !== \"production\" && !isLocalLink(to)) {\n console.warn(\"External link \" + to + \" was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links\");\n }\n\n var prefixedTo = rewriteLinkPath(to, _location.pathname);\n\n if (!isLocalLink(prefixedTo)) {\n return /*#__PURE__*/_react.default.createElement(\"a\", (0, _extends2.default)({\n href: prefixedTo\n }, rest));\n }\n\n return /*#__PURE__*/_react.default.createElement(_router.Link, (0, _extends2.default)({\n to: prefixedTo,\n state: state,\n getProps: getProps,\n innerRef: this.handleRef,\n onMouseEnter: function onMouseEnter(e) {\n if (_onMouseEnter) {\n _onMouseEnter(e);\n }\n\n ___loader.hovering((0, _parsePath.parsePath)(prefixedTo).pathname);\n },\n onClick: function onClick(e) {\n if (_onClick) {\n _onClick(e);\n }\n\n if (e.button === 0 && // ignore right clicks\n !_this3.props.target && // let browser handle \"target=_blank\"\n !e.defaultPrevented && // onClick prevented default\n !e.metaKey && // ignore clicks with modifier keys...\n !e.altKey && !e.ctrlKey && !e.shiftKey) {\n e.preventDefault();\n var shouldReplace = replace;\n\n var isCurrent = encodeURI(prefixedTo) === _location.pathname;\n\n if (typeof replace !== \"boolean\" && isCurrent) {\n shouldReplace = true;\n } // Make sure the necessary scripts and data are\n // loaded before continuing.\n\n\n window.___navigate(prefixedTo, {\n state: state,\n replace: shouldReplace\n });\n }\n\n return true;\n }\n }, rest));\n };\n\n return GatsbyLink;\n}(_react.default.Component);\n\nGatsbyLink.propTypes = (0, _extends2.default)({}, NavLinkPropTypes, {\n onClick: _propTypes.default.func,\n to: _propTypes.default.string.isRequired,\n replace: _propTypes.default.bool,\n state: _propTypes.default.object\n});\n\nvar showDeprecationWarning = function showDeprecationWarning(functionName, altFunctionName, version) {\n return console.warn(\"The \\\"\" + functionName + \"\\\" method is now deprecated and will be removed in Gatsby v\" + version + \". Please use \\\"\" + altFunctionName + \"\\\" instead.\");\n};\n\nvar _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n return /*#__PURE__*/_react.default.createElement(GatsbyLinkLocationWrapper, (0, _extends2.default)({\n innerRef: ref\n }, props));\n});\n\nexports.default = _default;\n\nvar navigate = function navigate(to, options) {\n window.___navigate(rewriteLinkPath(to, window.location.pathname), options);\n};\n\nexports.navigate = navigate;\n\nvar push = function push(to) {\n showDeprecationWarning(\"push\", \"navigate\", 3);\n\n window.___push(rewriteLinkPath(to, window.location.pathname));\n};\n\nexports.push = push;\n\nvar replace = function replace(to) {\n showDeprecationWarning(\"replace\", \"navigate\", 3);\n\n window.___replace(rewriteLinkPath(to, window.location.pathname));\n}; // TODO: Remove navigateTo for Gatsby v3\n\n\nexports.replace = replace;\n\nvar navigateTo = function navigateTo(to) {\n showDeprecationWarning(\"navigateTo\", \"navigate\", 3);\n return push(to);\n};\n\nexports.navigateTo = navigateTo;","\"use strict\";\n\nexports.__esModule = true;\nexports.SessionStorage = void 0;\nvar STATE_KEY_PREFIX = \"@@scroll|\";\nvar GATSBY_ROUTER_SCROLL_STATE = \"___GATSBY_REACT_ROUTER_SCROLL\";\n\nvar SessionStorage = /*#__PURE__*/function () {\n function SessionStorage() {}\n\n var _proto = SessionStorage.prototype;\n\n _proto.read = function read(location, key) {\n var stateKey = this.getStateKey(location, key);\n\n try {\n var value = window.sessionStorage.getItem(stateKey);\n return value ? JSON.parse(value) : 0;\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to access sessionStorage; sessionStorage is not available.\");\n }\n\n if (window && window[GATSBY_ROUTER_SCROLL_STATE] && window[GATSBY_ROUTER_SCROLL_STATE][stateKey]) {\n return window[GATSBY_ROUTER_SCROLL_STATE][stateKey];\n }\n\n return 0;\n }\n };\n\n _proto.save = function save(location, key, value) {\n var stateKey = this.getStateKey(location, key);\n var storedValue = JSON.stringify(value);\n\n try {\n window.sessionStorage.setItem(stateKey, storedValue);\n } catch (e) {\n if (window && window[GATSBY_ROUTER_SCROLL_STATE]) {\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n } else {\n window[GATSBY_ROUTER_SCROLL_STATE] = {};\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to save state in sessionStorage; sessionStorage is not available.\");\n }\n }\n };\n\n _proto.getStateKey = function getStateKey(location, key) {\n var stateKeyBase = \"\" + STATE_KEY_PREFIX + location.pathname;\n return key === null || typeof key === \"undefined\" ? stateKeyBase : stateKeyBase + \"|\" + key;\n };\n\n return SessionStorage;\n}();\n\nexports.SessionStorage = SessionStorage;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n var cache = _getRequireWildcardCache(nodeInterop);\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj[\"default\"] = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nmodule.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default path => {\n if (path === undefined) {\n return path\n }\n if (path === `/`) {\n return `/`\n }\n if (path.charAt(path.length - 1) === `/`) {\n return path.slice(0, -1)\n }\n return path\n}\n","import { pick } from \"@reach/router/lib/utils\"\nimport stripPrefix from \"./strip-prefix\"\nimport normalizePagePath from \"./normalize-page-path\"\n\nconst pathCache = new Map()\nlet matchPaths = []\n\nconst trimPathname = rawPathname => {\n const pathname = decodeURIComponent(rawPathname)\n // Remove the pathPrefix from the pathname.\n const trimmedPathname = stripPrefix(pathname, __BASE_PATH__)\n // Remove any hashfragment\n .split(`#`)[0]\n // Remove search query\n .split(`?`)[0]\n\n return trimmedPathname\n}\n\nfunction absolutify(path) {\n // If it's already absolute, return as-is\n if (\n path.startsWith(`/`) ||\n path.startsWith(`https://`) ||\n path.startsWith(`http://`)\n ) {\n return path\n }\n // Calculate path relative to current location, adding a trailing slash to\n // match behavior of @reach/router\n return new URL(\n path,\n window.location.href + (window.location.href.endsWith(`/`) ? `` : `/`)\n ).pathname\n}\n\n/**\n * Set list of matchPaths\n *\n * @param {Array<{path: string, matchPath: string}>} value collection of matchPaths\n */\nexport const setMatchPaths = value => {\n matchPaths = value\n}\n\n/**\n * Return a matchpath url\n * if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n * `/foo?bar=far` => `/page1`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string|null}\n */\nexport const findMatchPath = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return normalizePagePath(path.route.originalPath)\n }\n\n return null\n}\n\n/**\n * Return a matchpath params from reach/router rules\n * if `match-paths.json` contains `{ \":bar/*foo\" }`, and the path is /baz/zaz/zoo\n * then it returns\n * { bar: baz, foo: zaz/zoo }\n *\n * @param {string} rawPathname A raw pathname\n * @return {object}\n */\nexport const grabMatchParams = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return path.params\n }\n\n return {}\n}\n\n// Given a raw URL path, returns the cleaned version of it (trim off\n// `#` and query params), or if it matches an entry in\n// `match-paths.json`, its matched path is returned\n//\n// E.g. `/foo?bar=far` => `/foo`\n//\n// Or if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n// `/foo?bar=far` => `/page1`\nexport const findPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n if (pathCache.has(trimmedPathname)) {\n return pathCache.get(trimmedPathname)\n }\n\n let foundPath = findMatchPath(trimmedPathname)\n\n if (!foundPath) {\n foundPath = cleanPath(rawPathname)\n }\n\n pathCache.set(trimmedPathname, foundPath)\n\n return foundPath\n}\n\n/**\n * Clean a url and converts /index.html => /\n * E.g. `/foo?bar=far` => `/foo`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string}\n */\nexport const cleanPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n\n let foundPath = trimmedPathname\n if (foundPath === `/index.html`) {\n foundPath = `/`\n }\n\n foundPath = normalizePagePath(foundPath)\n\n return foundPath\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = useScrollRestoration;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _react = require(\"react\");\n\nvar _router = require(\"@reach/router\");\n\nfunction useScrollRestoration(identifier) {\n var location = (0, _router.useLocation)();\n var state = (0, _react.useContext)(_scrollHandler.ScrollContext);\n var ref = (0, _react.useRef)();\n (0, _react.useLayoutEffect)(function () {\n if (ref.current) {\n var position = state.read(location, identifier);\n ref.current.scrollTo(0, position || 0);\n }\n }, []);\n return {\n ref: ref,\n onScroll: function onScroll() {\n if (ref.current) {\n state.save(location, identifier, ref.current.scrollTop);\n }\n }\n };\n}","import mitt from \"mitt\"\n\nconst emitter = mitt()\nexport default emitter\n","// \n// An event handler can take an optional event argument\n// and should not return a value\n \n \n\n// An array of all currently registered event handlers for a type\n \n \n// A map of event types and their corresponding event handlers.\n \n \n \n \n\n/** Mitt: Tiny (~200b) functional event emitter / pubsub.\n * @name mitt\n * @returns {Mitt}\n */\nfunction mitt(all ) {\n\tall = all || Object.create(null);\n\n\treturn {\n\t\t/**\n\t\t * Register an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to listen for, or `\"*\"` for all events\n\t\t * @param {Function} handler Function to call in response to given event\n\t\t * @memberOf mitt\n\t\t */\n\t\ton: function on(type , handler ) {\n\t\t\t(all[type] || (all[type] = [])).push(handler);\n\t\t},\n\n\t\t/**\n\t\t * Remove an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to unregister `handler` from, or `\"*\"`\n\t\t * @param {Function} handler Handler function to remove\n\t\t * @memberOf mitt\n\t\t */\n\t\toff: function off(type , handler ) {\n\t\t\tif (all[type]) {\n\t\t\t\tall[type].splice(all[type].indexOf(handler) >>> 0, 1);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Invoke all handlers for the given type.\n\t\t * If present, `\"*\"` handlers are invoked after type-matched handlers.\n\t\t *\n\t\t * @param {String} type The event type to invoke\n\t\t * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler\n\t\t * @memberOf mitt\n\t\t */\n\t\temit: function emit(type , evt ) {\n\t\t\t(all[type] || []).slice().map(function (handler) { handler(evt); });\n\t\t\t(all['*'] || []).slice().map(function (handler) { handler(type, evt); });\n\t\t}\n\t};\n}\n\nexport default mitt;\n//# sourceMappingURL=mitt.es.js.map\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = exports.ScrollContainer = exports.ScrollContext = void 0;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nexports.ScrollContext = _scrollHandler.ScrollHandler;\n\nvar _scrollContainer = require(\"./scroll-container\");\n\nexports.ScrollContainer = _scrollContainer.ScrollContainer;\n\nvar _useScrollRestoration = require(\"./use-scroll-restoration\");\n\nexports.useScrollRestoration = _useScrollRestoration.useScrollRestoration;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","exports.polyfill = Component => Component\n","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n\n\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\n\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n var resolveTransition = function resolveTransition() {};\n\n return {\n get location() {\n return location;\n },\n\n get transitioning() {\n return transitioning;\n },\n\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({ location: location, action: \"POP\" });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, { key: Date.now() + \"\" });\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({ location: location, action: \"PUSH\" });\n });\n return transition;\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n\n return {\n get location() {\n return stack[index];\n },\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n\n index++;\n stack.push({ pathname: pathname, search: search.length ? \"?\" + search : search });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n\n stack[index] = { pathname: pathname, search: search };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n\n index = newIndex;\n }\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\n\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate;\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport { globalHistory, navigate, createHistory, createMemorySource };","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @return string\n */\nvar _default = function _default(pathname, localizedManifests) {\n var defaultFilename = \"manifest.webmanifest\";\n\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n\n var localizedManifest = localizedManifests.find(function (app) {\n return pathname.startsWith(app.start_url);\n });\n\n if (!localizedManifest) {\n return defaultFilename;\n }\n\n return \"manifest_\" + localizedManifest.lang + \".webmanifest\";\n};\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollHandler = exports.ScrollContext = void 0;\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _sessionStorage = require(\"./session-storage\");\n\nvar ScrollContext = /*#__PURE__*/React.createContext(new _sessionStorage.SessionStorage());\nexports.ScrollContext = ScrollContext;\nScrollContext.displayName = \"GatsbyScrollContext\";\n\nvar ScrollHandler = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollHandler, _React$Component);\n\n function ScrollHandler() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this._stateStorage = new _sessionStorage.SessionStorage();\n\n _this.scrollListener = function () {\n var key = _this.props.location.key;\n\n if (key) {\n _this._stateStorage.save(_this.props.location, key, window.scrollY);\n }\n };\n\n _this.windowScroll = function (position, prevProps) {\n if (_this.shouldUpdateScroll(prevProps, _this.props)) {\n window.scrollTo(0, position);\n }\n };\n\n _this.scrollToHash = function (hash, prevProps) {\n var node = document.getElementById(hash.substring(1));\n\n if (node && _this.shouldUpdateScroll(prevProps, _this.props)) {\n node.scrollIntoView();\n }\n };\n\n _this.shouldUpdateScroll = function (prevRouterProps, routerProps) {\n var shouldUpdateScroll = _this.props.shouldUpdateScroll;\n\n if (!shouldUpdateScroll) {\n return true;\n } // Hack to allow accessing this._stateStorage.\n\n\n return shouldUpdateScroll.call((0, _assertThisInitialized2.default)(_this), prevRouterProps, routerProps);\n };\n\n return _this;\n }\n\n var _proto = ScrollHandler.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n window.addEventListener(\"scroll\", this.scrollListener);\n var scrollPosition;\n var _this$props$location = this.props.location,\n key = _this$props$location.key,\n hash = _this$props$location.hash;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n\n if (scrollPosition) {\n this.windowScroll(scrollPosition, undefined);\n } else if (hash) {\n this.scrollToHash(decodeURI(hash), undefined);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.scrollListener);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props$location2 = this.props.location,\n hash = _this$props$location2.hash,\n key = _this$props$location2.key;\n var scrollPosition;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n /** There are two pieces of state: the browser url and\n * history state which keeps track of scroll position\n * Native behaviour prescribes that we ought to restore scroll position\n * when a user navigates back in their browser (this is the `POP` action)\n * Currently, reach router has a bug that prevents this at https://github.com/reach/router/issues/228\n * So we _always_ stick to the url as a source of truth — if the url\n * contains a hash, we scroll to it\n */\n\n\n if (hash) {\n this.scrollToHash(decodeURI(hash), prevProps);\n } else {\n this.windowScroll(scrollPosition, prevProps);\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(ScrollContext.Provider, {\n value: this._stateStorage\n }, this.props.children);\n };\n\n return ScrollHandler;\n}(React.Component);\n\nexports.ScrollHandler = ScrollHandler;\nScrollHandler.propTypes = {\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired,\n location: _propTypes.default.object.isRequired\n};","import React, { createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { publicLoader } from \"./loader\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\n\n// Renders page\nclass PageRenderer extends React.Component {\n render() {\n const props = {\n ...this.props,\n params: {\n ...grabMatchParams(this.props.location.pathname),\n ...this.props.pageResources.json.pageContext.__params,\n },\n pathContext: this.props.pageContext,\n }\n\n const [replacementElement] = apiRunner(`replaceComponentRenderer`, {\n props: this.props,\n loader: publicLoader,\n })\n\n const pageElement =\n replacementElement ||\n createElement(this.props.pageResources.component, {\n ...props,\n key: this.props.path || this.props.pageResources.page.path,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n { element: pageElement, props },\n pageElement,\n ({ result }) => {\n return { element: result, props }\n }\n ).pop()\n\n return wrappedPage\n }\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import invariant from \"invariant\";\n\n////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n var dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : invariant(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\nvar match = function match(path, uri) {\n return pick([{ path: path }], uri);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\n};\n\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar paramRe = /^:(.+)/;\n\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\n\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\n\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return { route: route, score: score, index: index };\n};\n\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\n\nvar segmentize = function segmentize(uri) {\n return uri\n // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\n\nvar addQuery = function addQuery(pathname) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\n};\n\nvar reservedNames = [\"uri\", \"path\"];\n\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n};\n\n////////////////////////////////////////////////////////////////////////////////\nexport { startsWith, pick, match, resolve, insertParams, validateRedirect, shallowCompare };","module.exports = [{\n plugin: require('../node_modules/gatsby-remark-images/gatsby-browser.js'),\n options: {\"plugins\":[],\"maxWidth\":590,\"pathPrefix\":\"/smartblock\"},\n },{\n plugin: require('../node_modules/gatsby-plugin-google-analytics/gatsby-browser.js'),\n options: {\"plugins\":[],\"head\":false,\"anonymize\":false,\"respectDNT\":false,\"exclude\":[],\"pageTransitionDelay\":0},\n },{\n plugin: require('../node_modules/gatsby-plugin-manifest/gatsby-browser.js'),\n options: {\"plugins\":[],\"name\":\"SmartBlock\",\"short_name\":\"SmartBlock\",\"start_url\":\"/\",\"background_color\":\"#ffffff\",\"theme_color\":\"#663399\",\"display\":\"minimal-ui\",\"icon\":\"static/favicon.png\",\"legacy\":true,\"theme_color_in_head\":true,\"cache_busting_mode\":\"query\",\"crossOrigin\":\"anonymous\",\"include_favicon\":true,\"cacheDigest\":\"084321a740e799687cc736487af34310\"},\n },{\n plugin: require('../gatsby-browser.js'),\n options: {\"plugins\":[]},\n }]\n","/*!\n * domready (c) Dustin Diaz 2014 - License MIT\n * ie10 fix - Mikael Kristiansson 2019\n */\n!(function(name, definition) {\n if (typeof module != \"undefined\") module.exports = definition();\n else if (typeof define == \"function\" && typeof define.amd == \"object\")\n define(definition);\n else this[name] = definition();\n})(\"domready\", function() {\n var ie10 = false;\n if (navigator.appVersion.indexOf(\"MSIE 10\") !== -1) {\n ie10 = true;\n }\n\n var fns = [],\n listener,\n doc = typeof document === \"object\" && document,\n hack = ie10\n ? doc.documentElement.doScroll(\"left\")\n : doc.documentElement.doScroll,\n domContentLoaded = \"DOMContentLoaded\",\n loaded =\n doc && (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);\n\n if (!loaded && doc)\n doc.addEventListener(\n domContentLoaded,\n (listener = function() {\n doc.removeEventListener(domContentLoaded, listener);\n loaded = 1;\n while ((listener = fns.shift())) listener();\n })\n );\n\n return function(fn) {\n loaded ? setTimeout(fn, 0) : fns.push(fn);\n };\n});\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","// prefer default export if available\nconst preferDefault = m => (m && m.default) || m\n\nexports.components = {\n \"component---src-pages-404-js\": () => import(\"./../../../src/pages/404.js\" /* webpackChunkName: \"component---src-pages-404-js\" */),\n \"component---src-pages-index-js\": () => import(\"./../../../src/pages/index.js\" /* webpackChunkName: \"component---src-pages-index-js\" */),\n \"component---src-templates-blog-post-js\": () => import(\"./../../../src/templates/blog-post.js\" /* webpackChunkName: \"component---src-templates-blog-post-js\" */)\n}\n\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport redirects from \"./redirects.json\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport { navigate as reachNavigate } from \"@reach/router\"\nimport { globalHistory } from \"@reach/router/lib/history\"\nimport { parsePath } from \"gatsby-link\"\n\n// Convert to a map for faster lookup in maybeRedirect()\n\nconst redirectMap = new Map()\nconst redirectIgnoreCaseMap = new Map()\n\nredirects.forEach(redirect => {\n if (redirect.ignoreCase) {\n redirectIgnoreCaseMap.set(redirect.fromPath, redirect)\n } else {\n redirectMap.set(redirect.fromPath, redirect)\n }\n})\n\nfunction maybeRedirect(pathname) {\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n\n if (redirect != null) {\n if (process.env.NODE_ENV !== `production`) {\n if (!loader.isPageNotFound(pathname)) {\n console.error(\n `The route \"${pathname}\" matches both a page and a redirect; this is probably not intentional.`\n )\n }\n }\n\n window.___replace(redirect.toPath)\n return true\n } else {\n return false\n }\n}\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_EXPERIMENTAL_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n let { pathname } = parsePath(to)\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath\n pathname = parsePath(to).pathname\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n\n // Check for initial page-load redirect\n maybeRedirect(window.location.pathname)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
\n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onPreRouteUpdate(this.props.location, prevProps.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n \n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources: pageResources || loader.loadPageSync(location.pathname),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(location.pathname)\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (process.env.NODE_ENV !== `production` && !this.state.pageResources) {\n throw new Error(\n `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n )\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { Router, navigate, Location, BaseContext } from \"@reach/router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport domReady from \"@mikaelkristiansson/domready\"\nimport { StaticQueryContext } from \"gatsby\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n \n \n \n )\n\n const DataContext = React.createContext({})\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n \n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n return (\n \n \n {children}\n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n \n {({ pageResources, location }) => (\n \n \n \n \n
\n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). But\n // only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !== browserLoc.pathname &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath === `/404.html` ||\n pagePath.match(/^\\/404\\/?$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(__BASE_PATH__ + pagePath + browserLoc.search + browserLoc.hash, {\n replace: true,\n })\n }\n\n publicLoader.loadPage(browserLoc.pathname).then(page => {\n if (!page || page.status === PageResourceStatus.Error) {\n throw new Error(\n `page resources for ${browserLoc.pathname} not found. Not rendering React`\n )\n }\n\n window.___webpackCompilationHash = page.page.webpackCompilationHash\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element: },\n ,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = () => {SiteRoot}\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n ReactDOM.hydrate\n )[0]\n\n domReady(() => {\n renderer(\n ,\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : void 0,\n () => {\n apiRunner(`onInitialClientRender`)\n }\n )\n })\n })\n})\n","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Link, {\n withPrefix,\n withAssetPrefix,\n navigate,\n push,\n replace,\n navigateTo,\n parsePath,\n} from \"gatsby-link\"\nimport { useScrollRestoration } from \"gatsby-react-router-scroll\"\nimport PageRenderer from \"./public-page-renderer\"\nimport loader from \"./loader\"\n\nconst prefetchPathname = loader.enqueue\n\nconst StaticQueryContext = React.createContext({})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n \n {finalData && render(finalData)}\n {!finalData &&
Loading (StaticQuery)
}\n
\n )\n}\n\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n return (\n \n {staticQueryData => (\n \n )}\n \n )\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nfunction graphql() {\n throw new Error(\n `It appears like Gatsby is misconfigured. Gatsby related \\`graphql\\` calls ` +\n `are supposed to only be evaluated at compile time, and then compiled away. ` +\n `Unfortunately, something went wrong and the query was left in the compiled code.\\n\\n` +\n `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`\n )\n}\n\nexport {\n Link,\n withAssetPrefix,\n withPrefix,\n graphql,\n parsePath,\n navigate,\n push, // TODO replace for v3\n replace, // TODO remove replace for v3\n navigateTo, // TODO: remove navigateTo for v3\n useScrollRestoration,\n StaticQueryContext,\n StaticQuery,\n PageRenderer,\n useStaticQuery,\n prefetchPathname,\n}\n","\"use strict\";\n\nmodule.exports = Object.assign;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint-disable jsx-a11y/anchor-has-content */\nimport React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport createContext from \"create-react-context\";\nimport { polyfill } from \"react-lifecycles-compat\";\nimport { startsWith, pick, resolve, match, insertParams, validateRedirect, shallowCompare } from \"./lib/utils\";\nimport { globalHistory, navigate, createHistory, createMemorySource } from \"./lib/history\";\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar createNamedContext = function createNamedContext(name, defaultValue) {\n var Ctx = createContext(defaultValue);\n Ctx.displayName = name;\n return Ctx;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Location Context/Provider\nvar LocationContext = createNamedContext(\"Location\");\n\n// sets up a listener if there isn't one already so apps don't need to be\n// wrapped in some top level provider\nvar Location = function Location(_ref) {\n var children = _ref.children;\n return React.createElement(\n LocationContext.Consumer,\n null,\n function (context) {\n return context ? children(context) : React.createElement(\n LocationProvider,\n null,\n children\n );\n }\n );\n};\n\nvar LocationProvider = function (_React$Component) {\n _inherits(LocationProvider, _React$Component);\n\n function LocationProvider() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, LocationProvider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n context: _this.getContext(),\n refs: { unlisten: null }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n LocationProvider.prototype.getContext = function getContext() {\n var _props$history = this.props.history,\n navigate = _props$history.navigate,\n location = _props$history.location;\n\n return { navigate: navigate, location: location };\n };\n\n LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {\n if (isRedirect(error)) {\n var _navigate = this.props.history.navigate;\n\n _navigate(error.uri, { replace: true });\n } else {\n throw error;\n }\n };\n\n LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevState.context.location !== this.state.context.location) {\n this.props.history._onTransitionComplete();\n }\n };\n\n LocationProvider.prototype.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n var refs = this.state.refs,\n history = this.props.history;\n\n history._onTransitionComplete();\n refs.unlisten = history.listen(function () {\n Promise.resolve().then(function () {\n // TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306\n requestAnimationFrame(function () {\n if (!_this2.unmounted) {\n _this2.setState(function () {\n return { context: _this2.getContext() };\n });\n }\n });\n });\n });\n };\n\n LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n var refs = this.state.refs;\n\n this.unmounted = true;\n refs.unlisten();\n };\n\n LocationProvider.prototype.render = function render() {\n var context = this.state.context,\n children = this.props.children;\n\n return React.createElement(\n LocationContext.Provider,\n { value: context },\n typeof children === \"function\" ? children(context) : children || null\n );\n };\n\n return LocationProvider;\n}(React.Component);\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nLocationProvider.defaultProps = {\n history: globalHistory\n};\nprocess.env.NODE_ENV !== \"production\" ? LocationProvider.propTypes = {\n history: PropTypes.object.isRequired\n} : void 0;\nvar ServerLocation = function ServerLocation(_ref2) {\n var url = _ref2.url,\n children = _ref2.children;\n\n var searchIndex = url.indexOf(\"?\");\n var searchExists = searchIndex > -1;\n var pathname = void 0;\n var search = \"\";\n var hash = \"\";\n\n if (searchExists) {\n pathname = url.substring(0, searchIndex);\n search = url.substring(searchIndex);\n } else {\n pathname = url;\n }\n\n return React.createElement(\n LocationContext.Provider,\n {\n value: {\n location: {\n pathname: pathname,\n search: search,\n hash: hash\n },\n navigate: function navigate() {\n throw new Error(\"You can't call navigate on the server.\");\n }\n }\n },\n children\n );\n};\n////////////////////////////////////////////////////////////////////////////////\n// Sets baseuri and basepath for nested routers and links\nvar BaseContext = createNamedContext(\"Base\", { baseuri: \"/\", basepath: \"/\" });\n\n////////////////////////////////////////////////////////////////////////////////\n// The main event, welcome to the show everybody.\nvar Router = function Router(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (baseContext) {\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RouterImpl, _extends({}, baseContext, locationContext, props));\n }\n );\n }\n );\n};\n\nvar RouterImpl = function (_React$PureComponent) {\n _inherits(RouterImpl, _React$PureComponent);\n\n function RouterImpl() {\n _classCallCheck(this, RouterImpl);\n\n return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));\n }\n\n RouterImpl.prototype.render = function render() {\n var _props = this.props,\n location = _props.location,\n _navigate2 = _props.navigate,\n basepath = _props.basepath,\n primary = _props.primary,\n children = _props.children,\n baseuri = _props.baseuri,\n _props$component = _props.component,\n component = _props$component === undefined ? \"div\" : _props$component,\n domProps = _objectWithoutProperties(_props, [\"location\", \"navigate\", \"basepath\", \"primary\", \"children\", \"baseuri\", \"component\"]);\n\n var routes = React.Children.toArray(children).reduce(function (array, child) {\n var routes = createRoute(basepath)(child);\n return array.concat(routes);\n }, []);\n var pathname = location.pathname;\n\n\n var match = pick(routes, pathname);\n\n if (match) {\n var params = match.params,\n uri = match.uri,\n route = match.route,\n element = match.route.value;\n\n // remove the /* from the end for child routes relative paths\n\n basepath = route.default ? basepath : route.path.replace(/\\*$/, \"\");\n\n var props = _extends({}, params, {\n uri: uri,\n location: location,\n navigate: function navigate(to, options) {\n return _navigate2(resolve(to, uri), options);\n }\n });\n\n var clone = React.cloneElement(element, props, element.props.children ? React.createElement(\n Router,\n { location: location, primary: primary },\n element.props.children\n ) : undefined);\n\n // using 'div' for < 16.3 support\n var FocusWrapper = primary ? FocusHandler : component;\n // don't pass any props to 'div'\n var wrapperProps = primary ? _extends({ uri: uri, location: location, component: component }, domProps) : domProps;\n\n return React.createElement(\n BaseContext.Provider,\n { value: { baseuri: uri, basepath: basepath } },\n React.createElement(\n FocusWrapper,\n wrapperProps,\n clone\n )\n );\n } else {\n // Not sure if we want this, would require index routes at every level\n // warning(\n // false,\n // `\\n\\nNothing matched:\\n\\t${\n // location.pathname\n // }\\n\\nPaths checked: \\n\\t${routes\n // .map(route => route.path)\n // .join(\n // \"\\n\\t\"\n // )}\\n\\nTo get rid of this warning, add a default NotFound component as child of Router:\n // \\n\\tlet NotFound = () =>
Not Found!
\n // \\n\\t\\n\\t \\n\\t {/* ... */}\\n\\t`\n // );\n return null;\n }\n };\n\n return RouterImpl;\n}(React.PureComponent);\n\nRouterImpl.defaultProps = {\n primary: true\n};\n\n\nvar FocusContext = createNamedContext(\"Focus\");\n\nvar FocusHandler = function FocusHandler(_ref3) {\n var uri = _ref3.uri,\n location = _ref3.location,\n component = _ref3.component,\n domProps = _objectWithoutProperties(_ref3, [\"uri\", \"location\", \"component\"]);\n\n return React.createElement(\n FocusContext.Consumer,\n null,\n function (requestFocus) {\n return React.createElement(FocusHandlerImpl, _extends({}, domProps, {\n component: component,\n requestFocus: requestFocus,\n uri: uri,\n location: location\n }));\n }\n );\n};\n\n// don't focus on initial render\nvar initialRender = true;\nvar focusHandlerCount = 0;\n\nvar FocusHandlerImpl = function (_React$Component2) {\n _inherits(FocusHandlerImpl, _React$Component2);\n\n function FocusHandlerImpl() {\n var _temp2, _this4, _ret2;\n\n _classCallCheck(this, FocusHandlerImpl);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this4 = _possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {\n if (!_this4.state.shouldFocus && node) {\n node.focus();\n }\n }, _temp2), _possibleConstructorReturn(_this4, _ret2);\n }\n\n FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var initial = prevState.uri == null;\n if (initial) {\n return _extends({\n shouldFocus: true\n }, nextProps);\n } else {\n var myURIChanged = nextProps.uri !== prevState.uri;\n var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;\n return _extends({\n shouldFocus: myURIChanged || navigatedUpToMe\n }, nextProps);\n }\n };\n\n FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {\n focusHandlerCount++;\n this.focus();\n };\n\n FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {\n focusHandlerCount--;\n if (focusHandlerCount === 0) {\n initialRender = true;\n }\n };\n\n FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevProps.location !== this.props.location && this.state.shouldFocus) {\n this.focus();\n }\n };\n\n FocusHandlerImpl.prototype.focus = function focus() {\n if (process.env.NODE_ENV === \"test\") {\n // getting cannot read property focus of null in the tests\n // and that bit of global `initialRender` state causes problems\n // should probably figure it out!\n return;\n }\n\n var requestFocus = this.props.requestFocus;\n\n\n if (requestFocus) {\n requestFocus(this.node);\n } else {\n if (initialRender) {\n initialRender = false;\n } else if (this.node) {\n // React polyfills [autofocus] and it fires earlier than cDM,\n // so we were stealing focus away, this line prevents that.\n if (!this.node.contains(document.activeElement)) {\n this.node.focus();\n }\n }\n }\n };\n\n FocusHandlerImpl.prototype.render = function render() {\n var _this5 = this;\n\n var _props2 = this.props,\n children = _props2.children,\n style = _props2.style,\n requestFocus = _props2.requestFocus,\n _props2$component = _props2.component,\n Comp = _props2$component === undefined ? \"div\" : _props2$component,\n uri = _props2.uri,\n location = _props2.location,\n domProps = _objectWithoutProperties(_props2, [\"children\", \"style\", \"requestFocus\", \"component\", \"uri\", \"location\"]);\n\n return React.createElement(\n Comp,\n _extends({\n style: _extends({ outline: \"none\" }, style),\n tabIndex: \"-1\",\n ref: function ref(n) {\n return _this5.node = n;\n }\n }, domProps),\n React.createElement(\n FocusContext.Provider,\n { value: this.requestFocus },\n this.props.children\n )\n );\n };\n\n return FocusHandlerImpl;\n}(React.Component);\n\npolyfill(FocusHandlerImpl);\n\nvar k = function k() {};\n\n////////////////////////////////////////////////////////////////////////////////\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = function forwardRef(C) {\n return C;\n };\n}\n\nvar Link = forwardRef(function (_ref4, ref) {\n var innerRef = _ref4.innerRef,\n props = _objectWithoutProperties(_ref4, [\"innerRef\"]);\n\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref5) {\n var basepath = _ref5.basepath,\n baseuri = _ref5.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref6) {\n var location = _ref6.location,\n navigate = _ref6.navigate;\n\n var to = props.to,\n state = props.state,\n replace = props.replace,\n _props$getProps = props.getProps,\n getProps = _props$getProps === undefined ? k : _props$getProps,\n anchorProps = _objectWithoutProperties(props, [\"to\", \"state\", \"replace\", \"getProps\"]);\n\n var href = resolve(to, baseuri);\n var encodedHref = encodeURI(href);\n var isCurrent = location.pathname === encodedHref;\n var isPartiallyCurrent = startsWith(location.pathname, encodedHref);\n\n return React.createElement(\"a\", _extends({\n ref: ref || innerRef,\n \"aria-current\": isCurrent ? \"page\" : undefined\n }, anchorProps, getProps({ isCurrent: isCurrent, isPartiallyCurrent: isPartiallyCurrent, href: href, location: location }), {\n href: href,\n onClick: function onClick(event) {\n if (anchorProps.onClick) anchorProps.onClick(event);\n if (shouldNavigate(event)) {\n event.preventDefault();\n var shouldReplace = replace;\n if (typeof replace !== \"boolean\" && isCurrent) {\n var _location$state = _extends({}, location.state),\n key = _location$state.key,\n restState = _objectWithoutProperties(_location$state, [\"key\"]);\n\n shouldReplace = shallowCompare(_extends({}, state), restState);\n }\n navigate(href, {\n state: state,\n replace: shouldReplace\n });\n }\n }\n }));\n }\n );\n }\n );\n});\n\nLink.displayName = \"Link\";\n\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nfunction RedirectRequest(uri) {\n this.uri = uri;\n}\n\nvar isRedirect = function isRedirect(o) {\n return o instanceof RedirectRequest;\n};\n\nvar redirectTo = function redirectTo(to) {\n throw new RedirectRequest(to);\n};\n\nvar RedirectImpl = function (_React$Component3) {\n _inherits(RedirectImpl, _React$Component3);\n\n function RedirectImpl() {\n _classCallCheck(this, RedirectImpl);\n\n return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));\n }\n\n // Support React < 16 with this hook\n RedirectImpl.prototype.componentDidMount = function componentDidMount() {\n var _props3 = this.props,\n navigate = _props3.navigate,\n to = _props3.to,\n from = _props3.from,\n _props3$replace = _props3.replace,\n replace = _props3$replace === undefined ? true : _props3$replace,\n state = _props3.state,\n noThrow = _props3.noThrow,\n baseuri = _props3.baseuri,\n props = _objectWithoutProperties(_props3, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n Promise.resolve().then(function () {\n var resolvedTo = resolve(to, baseuri);\n navigate(insertParams(resolvedTo, props), { replace: replace, state: state });\n });\n };\n\n RedirectImpl.prototype.render = function render() {\n var _props4 = this.props,\n navigate = _props4.navigate,\n to = _props4.to,\n from = _props4.from,\n replace = _props4.replace,\n state = _props4.state,\n noThrow = _props4.noThrow,\n baseuri = _props4.baseuri,\n props = _objectWithoutProperties(_props4, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n var resolvedTo = resolve(to, baseuri);\n if (!noThrow) redirectTo(insertParams(resolvedTo, props));\n return null;\n };\n\n return RedirectImpl;\n}(React.Component);\n\nvar Redirect = function Redirect(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref7) {\n var baseuri = _ref7.baseuri;\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RedirectImpl, _extends({}, locationContext, { baseuri: baseuri }, props));\n }\n );\n }\n );\n};\n\nprocess.env.NODE_ENV !== \"production\" ? Redirect.propTypes = {\n from: PropTypes.string,\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nvar Match = function Match(_ref8) {\n var path = _ref8.path,\n children = _ref8.children;\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref9) {\n var baseuri = _ref9.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref10) {\n var navigate = _ref10.navigate,\n location = _ref10.location;\n\n var resolvedPath = resolve(path, baseuri);\n var result = match(resolvedPath, location.pathname);\n return children({\n navigate: navigate,\n location: location,\n match: result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null\n });\n }\n );\n }\n );\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Hooks\n\nvar useLocation = function useLocation() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.location;\n};\n\nvar useNavigate = function useNavigate() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useNavigate hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.navigate;\n};\n\nvar useParams = function useParams() {\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var results = match(context.basepath, location.pathname);\n\n return results ? results.params : null;\n};\n\nvar useMatch = function useMatch(path) {\n if (!path) {\n throw new Error(\"useMatch(path: string) requires an argument of a string to match against\");\n }\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var resolvedPath = resolve(path, context.baseuri);\n var result = match(resolvedPath, location.pathname);\n return result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar stripSlashes = function stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n};\n\nvar createRoute = function createRoute(basepath) {\n return function (element) {\n if (!element) {\n return null;\n }\n\n if (element.type === React.Fragment && element.props.children) {\n return React.Children.map(element.props.children, createRoute(basepath));\n }\n !(element.props.path || element.props.default || element.type === Redirect) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \": Children of must have a `path` or `default` prop, or be a ``. None found on element type `\" + element.type + \"`\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && (!element.props.from || !element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" requires both \\\"from\\\" and \\\"to\\\" props when inside a .\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && !validateRedirect(element.props.from, element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.\") : invariant(false) : void 0;\n\n if (element.props.default) {\n return { value: element, default: true };\n }\n\n var elementPath = element.type === Redirect ? element.props.from : element.props.path;\n\n var path = elementPath === \"/\" ? basepath : stripSlashes(basepath) + \"/\" + stripSlashes(elementPath);\n\n return {\n value: element,\n default: element.props.default,\n path: element.props.children ? stripSlashes(path) + \"/*\" : path\n };\n };\n};\n\nvar shouldNavigate = function shouldNavigate(event) {\n return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n////////////////////////////////////////////////////////////////////////\nexport { Link, Location, LocationProvider, Match, Redirect, Router, ServerLocation, createHistory, createMemorySource, isRedirect, navigate, redirectTo, globalHistory, match as matchPath, useLocation, useNavigate, useParams, useMatch , BaseContext };","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.parsePath = parsePath;\n\nfunction parsePath(path) {\n var pathname = path || \"/\";\n var search = \"\";\n var hash = \"\";\n var hashIndex = pathname.indexOf(\"#\");\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf(\"?\");\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === \"?\" ? \"\" : search,\n hash: hash === \"#\" ? \"\" : hash\n };\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const support = function (feature) {\n if (typeof document === `undefined`) {\n return false\n }\n const fakeLink = document.createElement(`link`)\n try {\n if (fakeLink.relList && typeof fakeLink.relList.supports === `function`) {\n return fakeLink.relList.supports(feature)\n }\n } catch (err) {\n return false\n }\n return false\n}\n\nconst linkPrefetchStrategy = function (url, options) {\n return new Promise((resolve, reject) => {\n if (typeof document === `undefined`) {\n reject()\n return\n }\n\n const link = document.createElement(`link`)\n link.setAttribute(`rel`, `prefetch`)\n link.setAttribute(`href`, url)\n\n Object.keys(options).forEach(key => {\n link.setAttribute(key, options[key])\n })\n\n link.onload = resolve\n link.onerror = reject\n\n const parentElement =\n document.getElementsByTagName(`head`)[0] ||\n document.getElementsByName(`script`)[0].parentNode\n parentElement.appendChild(link)\n })\n}\n\nconst xhrPrefetchStrategy = function (url) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(`GET`, url, true)\n\n req.onload = () => {\n if (req.status === 200) {\n resolve()\n } else {\n reject()\n }\n }\n\n req.send(null)\n })\n}\n\nconst supportedPrefetchStrategy = support(`prefetch`)\n ? linkPrefetchStrategy\n : xhrPrefetchStrategy\n\nconst preFetched = {}\n\nconst prefetch = function (url, options) {\n return new Promise(resolve => {\n if (preFetched[url]) {\n resolve()\n return\n }\n\n supportedPrefetchStrategy(url, options)\n .then(() => {\n resolve()\n preFetched[url] = true\n })\n .catch(() => {}) // 404s are logged to the console anyway\n })\n}\n\nexport default prefetch\n","import prefetchHelper from \"./prefetch\"\nimport emitter from \"./emitter\"\nimport { setMatchPaths, findPath, findMatchPath } from \"./find-path\"\n\n/**\n * Available resource loading statuses\n */\nexport const PageResourceStatus = {\n /**\n * At least one of critical resources failed to load\n */\n Error: `error`,\n /**\n * Resources loaded successfully\n */\n Success: `success`,\n}\n\nconst preferDefault = m => (m && m.default) || m\n\nconst stripSurroundingSlashes = s => {\n s = s[0] === `/` ? s.slice(1) : s\n s = s.endsWith(`/`) ? s.slice(0, -1) : s\n return s\n}\n\nconst createPageDataUrl = path => {\n const fixedPath = path === `/` ? `index` : stripSurroundingSlashes(path)\n return `${__PATH_PREFIX__}/page-data/${fixedPath}/page-data.json`\n}\n\nfunction doFetch(url, method = `GET`) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(method, url, true)\n req.onreadystatechange = () => {\n if (req.readyState == 4) {\n resolve(req)\n }\n }\n req.send(null)\n })\n}\n\nconst doesConnectionSupportPrefetch = () => {\n if (\n `connection` in navigator &&\n typeof navigator.connection !== `undefined`\n ) {\n if ((navigator.connection.effectiveType || ``).includes(`2g`)) {\n return false\n }\n if (navigator.connection.saveData) {\n return false\n }\n }\n return true\n}\n\nconst toPageResources = (pageData, component = null) => {\n const page = {\n componentChunkName: pageData.componentChunkName,\n path: pageData.path,\n webpackCompilationHash: pageData.webpackCompilationHash,\n matchPath: pageData.matchPath,\n staticQueryHashes: pageData.staticQueryHashes,\n }\n\n return {\n component,\n json: pageData.result,\n page,\n }\n}\n\nexport class BaseLoader {\n constructor(loadComponent, matchPaths) {\n // Map of pagePath -> Page. Where Page is an object with: {\n // status: PageResourceStatus.Success || PageResourceStatus.Error,\n // payload: PageResources, // undefined if PageResourceStatus.Error\n // }\n // PageResources is {\n // component,\n // json: pageData.result,\n // page: {\n // componentChunkName,\n // path,\n // webpackCompilationHash,\n // staticQueryHashes\n // },\n // staticQueryResults\n // }\n this.pageDb = new Map()\n this.inFlightDb = new Map()\n this.staticQueryDb = {}\n this.pageDataDb = new Map()\n this.prefetchTriggered = new Set()\n this.prefetchCompleted = new Set()\n this.loadComponent = loadComponent\n setMatchPaths(matchPaths)\n }\n\n inFlightNetworkRequests = new Map()\n\n memoizedGet(url) {\n let inFlightPromise = this.inFlightNetworkRequests.get(url)\n\n if (!inFlightPromise) {\n inFlightPromise = doFetch(url, `GET`)\n this.inFlightNetworkRequests.set(url, inFlightPromise)\n }\n\n // Prefer duplication with then + catch over .finally to prevent problems in ie11 + firefox\n return inFlightPromise\n .then(response => {\n this.inFlightNetworkRequests.delete(url)\n return response\n })\n .catch(err => {\n this.inFlightNetworkRequests.delete(url)\n throw err\n })\n }\n\n setApiRunner(apiRunner) {\n this.apiRunner = apiRunner\n this.prefetchDisabled = apiRunner(`disableCorePrefetching`).some(a => a)\n }\n\n fetchPageDataJson(loadObj) {\n const { pagePath, retries = 0 } = loadObj\n const url = createPageDataUrl(pagePath)\n return this.memoizedGet(url).then(req => {\n const { status, responseText } = req\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.path === undefined) {\n throw new Error(`not a valid pageData response`)\n }\n\n return Object.assign(loadObj, {\n status: PageResourceStatus.Success,\n payload: jsonPayload,\n })\n } catch (err) {\n // continue regardless of error\n }\n }\n\n // Handle 404\n if (status === 404 || status === 200) {\n // If the request was for a 404 page and it doesn't exist, we're done\n if (pagePath === `/404.html`) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Need some code here to cache the 404 request. In case\n // multiple loadPageDataJsons result in 404s\n return this.fetchPageDataJson(\n Object.assign(loadObj, { pagePath: `/404.html`, notFound: true })\n )\n }\n\n // handle 500 response (Unrecoverable)\n if (status === 500) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Handle everything else, including status === 0, and 503s. Should retry\n if (retries < 3) {\n return this.fetchPageDataJson(\n Object.assign(loadObj, { retries: retries + 1 })\n )\n }\n\n // Retried 3 times already, result is an error.\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n })\n }\n\n loadPageDataJson(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDataDb.has(pagePath)) {\n const pageData = this.pageDataDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !pageData.stale) {\n return Promise.resolve(pageData)\n }\n }\n\n return this.fetchPageDataJson({ pagePath }).then(pageData => {\n this.pageDataDb.set(pagePath, pageData)\n\n return pageData\n })\n }\n\n findMatchPath(rawPath) {\n return findMatchPath(rawPath)\n }\n\n // TODO check all uses of this and whether they use undefined for page resources not exist\n loadPage(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const page = this.pageDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !page.payload.stale) {\n return Promise.resolve(page.payload)\n }\n }\n\n if (this.inFlightDb.has(pagePath)) {\n return this.inFlightDb.get(pagePath)\n }\n\n const inFlightPromise = Promise.all([\n this.loadAppData(),\n this.loadPageDataJson(pagePath),\n ]).then(allData => {\n const result = allData[1]\n if (result.status === PageResourceStatus.Error) {\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n let pageData = result.payload\n const { componentChunkName, staticQueryHashes = [] } = pageData\n\n const finalResult = {}\n\n const componentChunkPromise = this.loadComponent(componentChunkName).then(\n component => {\n finalResult.createdAt = new Date()\n let pageResources\n if (!component) {\n finalResult.status = PageResourceStatus.Error\n } else {\n finalResult.status = PageResourceStatus.Success\n if (result.notFound === true) {\n finalResult.notFound = true\n }\n pageData = Object.assign(pageData, {\n webpackCompilationHash: allData[0]\n ? allData[0].webpackCompilationHash\n : ``,\n })\n pageResources = toPageResources(pageData, component)\n }\n // undefined if final result is an error\n return pageResources\n }\n )\n\n const staticQueryBatchPromise = Promise.all(\n staticQueryHashes.map(staticQueryHash => {\n // Check for cache in case this static query result has already been loaded\n if (this.staticQueryDb[staticQueryHash]) {\n const jsonPayload = this.staticQueryDb[staticQueryHash]\n return { staticQueryHash, jsonPayload }\n }\n\n return this.memoizedGet(\n `${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json`\n ).then(req => {\n const jsonPayload = JSON.parse(req.responseText)\n return { staticQueryHash, jsonPayload }\n })\n })\n ).then(staticQueryResults => {\n const staticQueryResultsMap = {}\n\n staticQueryResults.forEach(({ staticQueryHash, jsonPayload }) => {\n staticQueryResultsMap[staticQueryHash] = jsonPayload\n this.staticQueryDb[staticQueryHash] = jsonPayload\n })\n\n return staticQueryResultsMap\n })\n\n return Promise.all([componentChunkPromise, staticQueryBatchPromise]).then(\n ([pageResources, staticQueryResults]) => {\n let payload\n if (pageResources) {\n payload = { ...pageResources, staticQueryResults }\n finalResult.payload = payload\n emitter.emit(`onPostLoadPageResources`, {\n page: payload,\n pageResources: payload,\n })\n }\n\n this.pageDb.set(pagePath, finalResult)\n\n return payload\n }\n )\n })\n\n inFlightPromise\n .then(response => {\n this.inFlightDb.delete(pagePath)\n })\n .catch(error => {\n this.inFlightDb.delete(pagePath)\n throw error\n })\n\n this.inFlightDb.set(pagePath, inFlightPromise)\n\n return inFlightPromise\n }\n\n // returns undefined if loading page ran into errors\n loadPageSync(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const pageData = this.pageDb.get(pagePath).payload\n return pageData\n }\n return undefined\n }\n\n shouldPrefetch(pagePath) {\n // Skip prefetching if we know user is on slow or constrained connection\n if (!doesConnectionSupportPrefetch()) {\n return false\n }\n\n // Check if the page exists.\n if (this.pageDb.has(pagePath)) {\n return false\n }\n\n return true\n }\n\n prefetch(pagePath) {\n if (!this.shouldPrefetch(pagePath)) {\n return false\n }\n\n // Tell plugins with custom prefetching logic that they should start\n // prefetching this path.\n if (!this.prefetchTriggered.has(pagePath)) {\n this.apiRunner(`onPrefetchPathname`, { pathname: pagePath })\n this.prefetchTriggered.add(pagePath)\n }\n\n // If a plugin has disabled core prefetching, stop now.\n if (this.prefetchDisabled) {\n return false\n }\n\n const realPath = findPath(pagePath)\n // Todo make doPrefetch logic cacheable\n // eslint-disable-next-line consistent-return\n this.doPrefetch(realPath).then(() => {\n if (!this.prefetchCompleted.has(pagePath)) {\n this.apiRunner(`onPostPrefetchPathname`, { pathname: pagePath })\n this.prefetchCompleted.add(pagePath)\n }\n })\n\n return true\n }\n\n doPrefetch(pagePath) {\n const pageDataUrl = createPageDataUrl(pagePath)\n return prefetchHelper(pageDataUrl, {\n crossOrigin: `anonymous`,\n as: `fetch`,\n }).then(() =>\n // This was just prefetched, so will return a response from\n // the cache instead of making another request to the server\n this.loadPageDataJson(pagePath)\n )\n }\n\n hovering(rawPath) {\n this.loadPage(rawPath)\n }\n\n getResourceURLsForPathname(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDataDb.get(pagePath)\n if (page) {\n const pageResources = toPageResources(page.payload)\n\n return [\n ...createComponentUrls(pageResources.page.componentChunkName),\n createPageDataUrl(pagePath),\n ]\n } else {\n return null\n }\n }\n\n isPageNotFound(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDb.get(pagePath)\n return !page || page.notFound\n }\n\n loadAppData(retries = 0) {\n return this.memoizedGet(`${__PATH_PREFIX__}/page-data/app-data.json`).then(\n req => {\n const { status, responseText } = req\n\n let appData\n\n if (status !== 200 && retries < 3) {\n // Retry 3 times incase of non-200 responses\n return this.loadAppData(retries + 1)\n }\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.webpackCompilationHash === undefined) {\n throw new Error(`not a valid app-data response`)\n }\n\n appData = jsonPayload\n } catch (err) {\n // continue regardless of error\n }\n }\n\n return appData\n }\n )\n }\n}\n\nconst createComponentUrls = componentChunkName =>\n (window.___chunkMapping[componentChunkName] || []).map(\n chunk => __PATH_PREFIX__ + chunk\n )\n\nexport class ProdLoader extends BaseLoader {\n constructor(asyncRequires, matchPaths) {\n const loadComponent = chunkName =>\n asyncRequires.components[chunkName]\n ? asyncRequires.components[chunkName]()\n .then(preferDefault)\n // loader will handle the case when component is null\n .catch(() => null)\n : Promise.resolve()\n\n super(loadComponent, matchPaths)\n }\n\n doPrefetch(pagePath) {\n return super.doPrefetch(pagePath).then(result => {\n if (result.status !== PageResourceStatus.Success) {\n return Promise.resolve()\n }\n const pageData = result.payload\n const chunkName = pageData.componentChunkName\n const componentUrls = createComponentUrls(chunkName)\n return Promise.all(componentUrls.map(prefetchHelper)).then(() => pageData)\n })\n }\n\n loadPageDataJson(rawPath) {\n return super.loadPageDataJson(rawPath).then(data => {\n if (data.notFound) {\n // check if html file exist using HEAD request:\n // if it does we should navigate to it instead of showing 404\n return doFetch(rawPath, `HEAD`).then(req => {\n if (req.status === 200) {\n // page (.html file) actually exist (or we asked for 404 )\n // returning page resources status as errored to trigger\n // regular browser navigation to given page\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n // if HEAD request wasn't 200, return notFound result\n // and show 404 page\n return data\n })\n }\n return data\n })\n }\n}\n\nlet instance\n\nexport const setLoader = _loader => {\n instance = _loader\n}\n\nexport const publicLoader = {\n // Deprecated methods. As far as we're aware, these are only used by\n // core gatsby and the offline plugin, however there's a very small\n // chance they're called by others.\n getResourcesForPathname: rawPath => {\n console.warn(\n `Warning: getResourcesForPathname is deprecated. Use loadPage instead`\n )\n return instance.i.loadPage(rawPath)\n },\n getResourcesForPathnameSync: rawPath => {\n console.warn(\n `Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead`\n )\n return instance.i.loadPageSync(rawPath)\n },\n enqueue: rawPath => instance.prefetch(rawPath),\n\n // Real methods\n getResourceURLsForPathname: rawPath =>\n instance.getResourceURLsForPathname(rawPath),\n loadPage: rawPath => instance.loadPage(rawPath),\n loadPageSync: rawPath => instance.loadPageSync(rawPath),\n prefetch: rawPath => instance.prefetch(rawPath),\n isPageNotFound: rawPath => instance.isPageNotFound(rawPath),\n hovering: rawPath => instance.hovering(rawPath),\n loadAppData: () => instance.loadAppData(),\n}\n\nexport default publicLoader\n\nexport function getStaticQueryResults() {\n if (instance) {\n return instance.staticQueryDb\n } else {\n return {}\n }\n}\n","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollContainer = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _router = require(\"@reach/router\");\n\n// TODO: In Gatsby v3, this file should be removed.\n// We are deprecating this in V2 in favor of useScrollRestoration\nvar propTypes = {\n scrollKey: _propTypes.default.string.isRequired,\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired\n};\nvar hasNotWarnedDeprecation = true;\n\nvar ScrollContainerImplementation = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollContainerImplementation, _React$Component);\n\n function ScrollContainerImplementation(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n\n if (process.env.NODE_ENV !== \"production\" && hasNotWarnedDeprecation) {\n hasNotWarnedDeprecation = false;\n console.log(\"Deprecation Warning:\\n\\n Gatsby is deprecated in Gatsby v2 and will be removed in Gatsby v3.\\n Update to the React hook alternative useScrollRestoration, like this:.\\n \\n ```\\n import React from 'react';\\n import { useScrollRestoration } from 'gatsby-react-router-scroll';\\n\\n function Component() {\\n const scrollRestoration = useScrollRestoration('\" + _this.props.scrollKey + \"');\\n\\n return
    ;\\n }\\n ```\\n \");\n }\n\n return _this;\n }\n\n var _proto = ScrollContainerImplementation.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n // eslint-disable-next-line react/no-find-dom-node\n var node = _reactDom.default.findDOMNode(this);\n\n var _this$props = this.props,\n location = _this$props.location,\n scrollKey = _this$props.scrollKey;\n if (!node) return;\n node.addEventListener(\"scroll\", function () {\n _this2.props.context.save(location, scrollKey, node.scrollTop);\n });\n var position = this.props.context.read(location, scrollKey);\n node.scrollTo(0, position || 0);\n };\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return ScrollContainerImplementation;\n}(React.Component);\n\nvar ScrollContainer = function ScrollContainer(props) {\n return /*#__PURE__*/React.createElement(_router.Location, null, function (_ref) {\n var location = _ref.location;\n return /*#__PURE__*/React.createElement(_scrollHandler.ScrollContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(ScrollContainerImplementation, (0, _extends2.default)({}, props, {\n context: context,\n location: location\n }));\n });\n });\n};\n\nexports.ScrollContainer = ScrollContainer;\nScrollContainer.propTypes = propTypes;","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _gatsby = require(\"gatsby\");\n\nvar _getManifestPathname = _interopRequireDefault(require(\"./get-manifest-pathname\"));\n\n/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\n// when we don't have localisation in our manifest, we tree shake everything away\nif (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n exports.onRouteUpdate = function (_ref, pluginOptions) {\n var location = _ref.location;\n var localize = pluginOptions.localize;\n var manifestFilename = (0, _getManifestPathname.default)(location.pathname, localize);\n var manifestEl = document.head.querySelector(\"link[rel=\\\"manifest\\\"]\");\n\n if (manifestEl) {\n manifestEl.setAttribute(\"href\", (0, _gatsby.withPrefix)(manifestFilename));\n }\n };\n}","/*\n Why commonjs and not ES imports/exports?\n\n This module is used to alias `create-react-context` package, but drop the the actual implementation part\n because Gatsby requires version of react that has implementatoin baked in.\n \n Package source is using ES modules:\n - https://github.com/jamiebuilds/create-react-context/blob/v0.3.0/src/index.js\n \n But to build this package `babel-plugin-add-module-exports` is used ( https://www.npmjs.com/package/babel-plugin-add-module-exports).\n Which result in both `module.exports` and `exports.default` being set to same thing.\n\n We don't use that babel plugin so we only have `exports.default`.\n\n This cause problems in various 3rd party react components that rely on `module.exports` being set.\n See https://github.com/gatsbyjs/gatsby/issues/23645 for example of it.\n \n Instead of adding same babel plugin we mimic output here. Adding babel plugin just for this would:\n a) unnecesairly slow down compilation for all other files (if we just apply it everywhere)\n b) or complicate babel-loader configuration with overwrite specifically for this file\n*/\n\nconst { createContext } = require(`react`)\n\nmodule.exports = createContext\nmodule.exports.default = createContext\n","\"use strict\";\n\nexports.DEFAULT_OPTIONS = {\n maxWidth: 650,\n wrapperStyle: \"\",\n backgroundColor: \"white\",\n linkImagesToOriginal: true,\n showCaptions: false,\n markdownCaptions: false,\n withWebp: false,\n withAvif: false,\n tracedSVG: false,\n loading: \"lazy\",\n disableBgImageOnAlpha: false,\n disableBgImage: false\n};\nexports.EMPTY_ALT = \"GATSBY_EMPTY_ALT\";\nexports.imageClass = \"gatsby-resp-image-image\";\nexports.imageWrapperClass = \"gatsby-resp-image-wrapper\";\nexports.imageBackgroundClass = \"gatsby-resp-image-background-image\";","function _extends() {\n module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _extends.apply(this, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nexports.__esModule = true;\nexports.onRouteUpdate = void 0;\n\nvar onRouteUpdate = function onRouteUpdate(_ref, pluginOptions) {\n var location = _ref.location;\n\n if (pluginOptions === void 0) {\n pluginOptions = {};\n }\n\n if (process.env.NODE_ENV !== \"production\" || typeof ga !== \"function\") {\n return null;\n }\n\n var pathIsExcluded = location && typeof window.excludeGAPaths !== \"undefined\" && window.excludeGAPaths.some(function (rx) {\n return rx.test(location.pathname);\n });\n if (pathIsExcluded) return null; // wrap inside a timeout to make sure react-helmet is done with it's changes (https://github.com/gatsbyjs/gatsby/issues/9139)\n // reactHelmet is using requestAnimationFrame: https://github.com/nfl/react-helmet/blob/5.2.0/src/HelmetUtils.js#L296-L299\n\n var sendPageView = function sendPageView() {\n var pagePath = location ? location.pathname + location.search + location.hash : undefined;\n window.ga(\"set\", \"page\", pagePath);\n window.ga(\"send\", \"pageview\");\n }; // Minimum delay for reactHelmet's requestAnimationFrame\n\n\n var delay = Math.max(32, pluginOptions.pageTransitionDelay || 0);\n setTimeout(sendPageView, delay);\n return null;\n};\n\nexports.onRouteUpdate = onRouteUpdate;","\"use strict\";\n\nvar _require = require(\"./constants\"),\n DEFAULT_OPTIONS = _require.DEFAULT_OPTIONS,\n imageClass = _require.imageClass,\n imageBackgroundClass = _require.imageBackgroundClass,\n imageWrapperClass = _require.imageWrapperClass;\n\nexports.onRouteUpdate = function (apiCallbackContext, pluginOptions) {\n var options = Object.assign({}, DEFAULT_OPTIONS, pluginOptions);\n var imageWrappers = document.querySelectorAll(\".\" + imageWrapperClass); // https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/\n // for cross-browser looping through NodeList without polyfills\n\n var _loop = function _loop(i) {\n var imageWrapper = imageWrappers[i];\n var backgroundElement = imageWrapper.querySelector(\".\" + imageBackgroundClass);\n var imageElement = imageWrapper.querySelector(\".\" + imageClass);\n\n var onImageLoad = function onImageLoad() {\n backgroundElement.style.transition = \"opacity 0.5s 0.5s\";\n imageElement.style.transition = \"opacity 0.5s\";\n onImageComplete();\n };\n\n var onImageComplete = function onImageComplete() {\n backgroundElement.style.opacity = 0;\n imageElement.style.opacity = 1;\n imageElement.style.color = \"inherit\";\n imageElement.style.boxShadow = \"inset 0px 0px 0px 400px \" + options.backgroundColor;\n imageElement.removeEventListener(\"load\", onImageLoad);\n imageElement.removeEventListener(\"error\", onImageComplete);\n };\n\n imageElement.style.opacity = 0;\n imageElement.addEventListener(\"load\", onImageLoad);\n imageElement.addEventListener(\"error\", onImageComplete);\n\n if (imageElement.complete) {\n onImageComplete();\n }\n };\n\n for (var i = 0; i < imageWrappers.length; i++) {\n _loop(i);\n }\n};","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","const plugins = require(`./api-runner-browser-plugins`)\nconst {\n getResourcesForPathname,\n getResourcesForPathnameSync,\n getResourceURLsForPathname,\n loadPage,\n loadPageSync,\n} = require(`./loader`).publicLoader\n\nexports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {\n // Hooks for gatsby-cypress's API handler\n if (process.env.CYPRESS_SUPPORT) {\n if (window.___apiHandler) {\n window.___apiHandler(api)\n } else if (window.___resolvedAPIs) {\n window.___resolvedAPIs.push(api)\n } else {\n window.___resolvedAPIs = [api]\n }\n }\n\n let results = plugins.map(plugin => {\n if (!plugin.plugin[api]) {\n return undefined\n }\n\n // Deprecated April 2019. Use `loadPageSync` instead\n args.getResourcesForPathnameSync = getResourcesForPathnameSync\n // Deprecated April 2019. Use `loadPage` instead\n args.getResourcesForPathname = getResourcesForPathname\n args.getResourceURLsForPathname = getResourceURLsForPathname\n args.loadPage = loadPage\n args.loadPageSync = loadPageSync\n\n const result = plugin.plugin[api](args, plugin.options)\n if (result && argTransform) {\n args = argTransform({ args, result, plugin })\n }\n return result\n })\n\n // Filter out undefined results.\n results = results.filter(result => typeof result !== `undefined`)\n\n if (results.length > 0) {\n return results\n } else if (defaultReturn) {\n return [defaultReturn]\n } else {\n return []\n }\n}\n\nexports.apiRunnerAsync = (api, args, defaultReturn) =>\n plugins.reduce(\n (previous, next) =>\n next.plugin[api]\n ? previous.then(() => next.plugin[api](args, next.options))\n : previous,\n Promise.resolve()\n )\n"],"sourceRoot":""} \ No newline at end of file diff --git a/app-3488d54c30c10bf56ca6.js b/app-3488d54c30c10bf56ca6.js deleted file mode 100644 index 4b5395d..0000000 --- a/app-3488d54c30c10bf56ca6.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see app-3488d54c30c10bf56ca6.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+ZDr":function(t,e,n){"use strict";var r=n("TqRt");e.__esModule=!0,e.withPrefix=h,e.withAssetPrefix=function(t){return h(t,m())},e.navigateTo=e.replace=e.push=e.navigate=e.default=void 0;var o=r(n("8OQS")),a=r(n("PJYZ")),i=r(n("VbXa")),s=r(n("pVnL")),c=r(n("17x9")),u=r(n("q1tI")),l=n("YwZP"),p=n("LYrO"),d=n("cu4x");e.parsePath=d.parsePath;var f=function(t){return null==t?void 0:t.startsWith("/")};function h(t,e){var n,r;if(void 0===e&&(e=v()),!g(t))return t;if(t.startsWith("./")||t.startsWith("../"))return t;var o=null!==(n=null!==(r=e)&&void 0!==r?r:m())&&void 0!==n?n:"/";return""+((null==o?void 0:o.endsWith("/"))?o.slice(0,-1):o)+(t.startsWith("/")?t:"/"+t)}var m=function(){return"/smartblock"},v=function(){return"/smartblock"},g=function(t){return t&&!t.startsWith("http://")&&!t.startsWith("https://")&&!t.startsWith("//")};var y=function(t,e){return"number"==typeof t?t:g(t)?f(t)?h(t):function(t,e){return f(t)?t:(0,p.resolve)(t,e)}(t,e):t},b={activeClassName:c.default.string,activeStyle:c.default.object,partiallyActive:c.default.bool};function w(t){return u.default.createElement(l.Location,null,(function(e){var n=e.location;return u.default.createElement(P,(0,s.default)({},t,{_location:n}))}))}var P=function(t){function e(e){var n;(n=t.call(this,e)||this).defaultGetProps=function(t){var e=t.isPartiallyCurrent,r=t.isCurrent;return(n.props.partiallyActive?e:r)?{className:[n.props.className,n.props.activeClassName].filter(Boolean).join(" "),style:(0,s.default)({},n.props.style,n.props.activeStyle)}:null};var r=!1;return"undefined"!=typeof window&&window.IntersectionObserver&&(r=!0),n.state={IOSupported:r},n.handleRef=n.handleRef.bind((0,a.default)(n)),n}(0,i.default)(e,t);var n=e.prototype;return n._prefetch=function(){var t=window.location.pathname;this.props._location&&this.props._location.pathname&&(t=this.props._location.pathname);var e=y(this.props.to,t),n=(0,d.parsePath)(e).pathname;t!==n&&___loader.enqueue(n)},n.componentDidUpdate=function(t,e){this.props.to===t.to||this.state.IOSupported||this._prefetch()},n.componentDidMount=function(){this.state.IOSupported||this._prefetch()},n.componentWillUnmount=function(){if(this.io){var t=this.io,e=t.instance,n=t.el;e.unobserve(n),e.disconnect()}},n.handleRef=function(t){var e,n,r,o=this;this.props.innerRef&&this.props.innerRef.hasOwnProperty("current")?this.props.innerRef.current=t:this.props.innerRef&&this.props.innerRef(t),this.state.IOSupported&&t&&(this.io=(e=t,n=function(){o._prefetch()},(r=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(r.unobserve(e),r.disconnect(),n())}))}))).observe(e),{instance:r,el:e}))},n.render=function(){var t=this,e=this.props,n=e.to,r=e.getProps,a=void 0===r?this.defaultGetProps:r,i=e.onClick,c=e.onMouseEnter,p=(e.activeClassName,e.activeStyle,e.innerRef,e.partiallyActive,e.state),f=e.replace,h=e._location,m=(0,o.default)(e,["to","getProps","onClick","onMouseEnter","activeClassName","activeStyle","innerRef","partiallyActive","state","replace","_location"]);var v=y(n,h.pathname);return g(v)?u.default.createElement(l.Link,(0,s.default)({to:v,state:p,getProps:a,innerRef:this.handleRef,onMouseEnter:function(t){c&&c(t),___loader.hovering((0,d.parsePath)(v).pathname)},onClick:function(e){if(i&&i(e),!(0!==e.button||t.props.target||e.defaultPrevented||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault();var n=f,r=encodeURI(v)===h.pathname;"boolean"!=typeof f&&r&&(n=!0),window.___navigate(v,{state:p,replace:n})}return!0}},m)):u.default.createElement("a",(0,s.default)({href:v},m))},e}(u.default.Component);P.propTypes=(0,s.default)({},b,{onClick:c.default.func,to:c.default.string.isRequired,replace:c.default.bool,state:c.default.object});var R=function(t,e,n){return console.warn('The "'+t+'" method is now deprecated and will be removed in Gatsby v'+n+'. Please use "'+e+'" instead.')},_=u.default.forwardRef((function(t,e){return u.default.createElement(w,(0,s.default)({innerRef:e},t))}));e.default=_;e.navigate=function(t,e){window.___navigate(y(t,window.location.pathname),e)};var O=function(t){R("push","navigate",3),window.___push(y(t,window.location.pathname))};e.push=O;e.replace=function(t){R("replace","navigate",3),window.___replace(y(t,window.location.pathname))};e.navigateTo=function(t){return R("navigateTo","navigate",3),O(t)}},"/hTd":function(t,e,n){"use strict";e.__esModule=!0,e.SessionStorage=void 0;var r=function(){function t(){}var e=t.prototype;return e.read=function(t,e){var n=this.getStateKey(t,e);try{var r=window.sessionStorage.getItem(n);return r?JSON.parse(r):0}catch(o){return window&&window.___GATSBY_REACT_ROUTER_SCROLL&&window.___GATSBY_REACT_ROUTER_SCROLL[n]?window.___GATSBY_REACT_ROUTER_SCROLL[n]:0}},e.save=function(t,e,n){var r=this.getStateKey(t,e),o=JSON.stringify(n);try{window.sessionStorage.setItem(r,o)}catch(a){window&&window.___GATSBY_REACT_ROUTER_SCROLL||(window.___GATSBY_REACT_ROUTER_SCROLL={}),window.___GATSBY_REACT_ROUTER_SCROLL[r]=JSON.parse(o)}},e.getStateKey=function(t,e){var n="@@scroll|"+t.pathname;return null==e?n:n+"|"+e},t}();e.SessionStorage=r},"284h":function(t,e,n){var r=n("cDf5").default;function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(o=function(t){return t?n:e})(t)}t.exports=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=o(e);if(n&&n.has(t))return n.get(t);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var c=i?Object.getOwnPropertyDescriptor(t,s):null;c&&(c.get||c.set)?Object.defineProperty(a,s,c):a[s]=t[s]}return a.default=t,n&&n.set(t,a),a},t.exports.__esModule=!0,t.exports.default=t.exports},"30RF":function(t,e,n){"use strict";n.d(e,"d",(function(){return l})),n.d(e,"a",(function(){return p})),n.d(e,"c",(function(){return d})),n.d(e,"b",(function(){return f}));var r=n("LYrO"),o=n("cSJ8"),a=t=>void 0===t?t:"/"===t?"/":"/"===t.charAt(t.length-1)?t.slice(0,-1):t;const i=new Map;let s=[];const c=t=>{const e=decodeURIComponent(t);return Object(o.a)(e,"/smartblock").split("#")[0].split("?")[0]};function u(t){return t.startsWith("/")||t.startsWith("https://")||t.startsWith("http://")?t:new URL(t,window.location.href+(window.location.href.endsWith("/")?"":"/")).pathname}const l=t=>{s=t},p=t=>{const e=h(t),n=s.map(t=>{let{path:e,matchPath:n}=t;return{path:n,originalPath:e}}),o=Object(r.pick)(n,e);return o?a(o.route.originalPath):null},d=t=>{const e=h(t),n=s.map(t=>{let{path:e,matchPath:n}=t;return{path:n,originalPath:e}}),o=Object(r.pick)(n,e);return o?o.params:{}},f=t=>{const e=c(u(t));if(i.has(e))return i.get(e);let n=p(e);return n||(n=h(t)),i.set(e,n),n},h=t=>{let e=c(u(t));return"/index.html"===e&&(e="/"),e=a(e),e}},"3uz+":function(t,e,n){"use strict";e.__esModule=!0,e.useScrollRestoration=function(t){var e=(0,a.useLocation)(),n=(0,o.useContext)(r.ScrollContext),i=(0,o.useRef)();return(0,o.useLayoutEffect)((function(){if(i.current){var r=n.read(e,t);i.current.scrollTo(0,r||0)}}),[]),{ref:i,onScroll:function(){i.current&&n.save(e,t,i.current.scrollTop)}}};var r=n("Enzk"),o=n("q1tI"),a=n("YwZP")},"5yr3":function(t,e,n){"use strict";const r=function(t){return t=t||Object.create(null),{on:function(e,n){(t[e]||(t[e]=[])).push(n)},off:function(e,n){t[e]&&t[e].splice(t[e].indexOf(n)>>>0,1)},emit:function(e,n){(t[e]||[]).slice().map((function(t){t(n)})),(t["*"]||[]).slice().map((function(t){t(e,n)}))}}}();e.a=r},"7hJ6":function(t,e,n){"use strict";e.__esModule=!0,e.useScrollRestoration=e.ScrollContainer=e.ScrollContext=void 0;var r=n("Enzk");e.ScrollContext=r.ScrollHandler;var o=n("hd9s");e.ScrollContainer=o.ScrollContainer;var a=n("3uz+");e.useScrollRestoration=a.useScrollRestoration},"8OQS":function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o},t.exports.__esModule=!0,t.exports.default=t.exports},"94VI":function(t,e){e.polyfill=t=>t},"9Xx/":function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i}));var r=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},u=c.state,l=c.replace,p=void 0!==l&&l;if("number"==typeof e)t.history.go(e);else{u=r({},u,{key:Date.now()+""});try{i||p?t.history.replaceState(u,null,e):t.history.pushState(u,null,e)}catch(f){t.location[p?"replace":"assign"](e)}}a=o(t),i=!0;var d=new Promise((function(t){return s=t}));return n.forEach((function(t){return t({location:a,action:"PUSH"})})),d}}},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=t.indexOf("?"),n={pathname:e>-1?t.substr(0,e):t,search:e>-1?t.substr(e):""},r=0,o=[n],a=[null];return{get location(){return o[r]},addEventListener:function(t,e){},removeEventListener:function(t,e){},history:{get entries(){return o},get index(){return r},get state(){return a[r]},pushState:function(t,e,n){var i=n.split("?"),s=i[0],c=i[1],u=void 0===c?"":c;r++,o.push({pathname:s,search:u.length?"?"+u:u}),a.push(t)},replaceState:function(t,e,n){var i=n.split("?"),s=i[0],c=i[1],u=void 0===c?"":c;o[r]={pathname:s,search:u},a[r]=t},go:function(t){var e=r+t;e<0||e>a.length-1||(r=e)}}}},s=!("undefined"==typeof window||!window.document||!window.document.createElement),c=a(s?window:i()),u=c.navigate},"9hXx":function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;e.default=function(t,e){if(!Array.isArray(e))return"manifest.webmanifest";var n=e.find((function(e){return t.startsWith(e.start_url)}));return n?"manifest_"+n.lang+".webmanifest":"manifest.webmanifest"}},Enzk:function(t,e,n){"use strict";var r=n("284h"),o=n("TqRt");e.__esModule=!0,e.ScrollHandler=e.ScrollContext=void 0;var a=o(n("PJYZ")),i=o(n("VbXa")),s=r(n("q1tI")),c=o(n("17x9")),u=n("/hTd"),l=s.createContext(new u.SessionStorage);e.ScrollContext=l,l.displayName="GatsbyScrollContext";var p=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o{let{result:n}=e;return{element:n,props:t}}).pop()},e}(a.a.Component);e.a=u},JeVI:function(t){t.exports=JSON.parse("[]")},KQm4:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.score?-1:t.index-e.index}))},v=function(t){return t.replace(/(^\/+|\/+$)/g,"").split("/")},g=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r0})))&&n.length>0?"?"+n.join("&"):"")},y=["uri","path"],b=function(t,e){var n=Object.keys(t);return n.length===Object.keys(e).length&&n.every((function(n){return e.hasOwnProperty(n)&&t[n]===e[n]}))}},LeKB:function(t,e,n){t.exports=[{plugin:n("q9nr"),options:{plugins:[],maxWidth:590,linkImagesToOriginal:!0,showCaptions:!1,markdownCaptions:!1,sizeByPixelDensity:!1,backgroundColor:"white",quality:50,withWebp:!1,tracedSVG:!1,loading:"lazy",disableBgImageOnAlpha:!1,disableBgImage:!1}},{plugin:n("pWkz"),options:{plugins:[],head:!1,anonymize:!1,respectDNT:!1,exclude:[],pageTransitionDelay:0}},{plugin:n("npZl"),options:{plugins:[],name:"SmartBlock",short_name:"SmartBlock",start_url:"/",background_color:"#ffffff",theme_color:"#663399",display:"minimal-ui",icon:"static/favicon.png",legacy:!0,theme_color_in_head:!0,cache_busting_mode:"query",crossOrigin:"anonymous",include_favicon:!0,cacheDigest:"084321a740e799687cc736487af34310"}},{plugin:n("GddB"),options:{plugins:[]}}]},MMVs:function(t,e,n){t.exports=function(){var t=!1;-1!==navigator.appVersion.indexOf("MSIE 10")&&(t=!0);var e,n=[],r="object"==typeof document&&document,o=t?r.documentElement.doScroll("left"):r.documentElement.doScroll,a=r&&(o?/^loaded|^c/:/^loaded|^i|^c/).test(r.readyState);return!a&&r&&r.addEventListener("DOMContentLoaded",e=function(){for(r.removeEventListener("DOMContentLoaded",e),a=1;e=n.shift();)e()}),function(t){a?setTimeout(t,0):n.push(t)}}()},NSX3:function(t,e,n){"use strict";n.r(e);var r=n("xtsi");"https:"!==window.location.protocol&&"localhost"!==window.location.hostname?console.error("Service workers can only be used over HTTPS, or on localhost for development"):"serviceWorker"in navigator&&navigator.serviceWorker.register("/smartblock/sw.js").then((function(t){t.addEventListener("updatefound",()=>{Object(r.apiRunner)("onServiceWorkerUpdateFound",{serviceWorker:t});const e=t.installing;console.log("installingWorker",e),e.addEventListener("statechange",()=>{switch(e.state){case"installed":navigator.serviceWorker.controller?(window.___swUpdated=!0,Object(r.apiRunner)("onServiceWorkerUpdateReady",{serviceWorker:t}),window.___failedResources&&(console.log("resources failed, SW updated - reloading"),window.location.reload())):(console.log("Content is now available offline!"),Object(r.apiRunner)("onServiceWorkerInstalled",{serviceWorker:t}));break;case"redundant":console.error("The installing service worker became redundant."),Object(r.apiRunner)("onServiceWorkerRedundant",{serviceWorker:t});break;case"activated":Object(r.apiRunner)("onServiceWorkerActive",{serviceWorker:t})}})})})).catch((function(t){console.error("Error during service worker registration:",t)}))},NsGk:function(t,e,n){e.components={"component---src-pages-404-js":()=>Promise.all([n.e(0),n.e(3)]).then(n.bind(null,"w2l6")),"component---src-pages-index-js":()=>Promise.all([n.e(9),n.e(6),n.e(0),n.e(4)]).then(n.bind(null,"RXBc")),"component---src-templates-blog-post-js":()=>Promise.all([n.e(0),n.e(5)]).then(n.bind(null,"yZlL"))}},PJYZ:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},QLaP:function(t,e,n){"use strict";t.exports=function(t,e,n,r,o,a,i,s){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,s],l=0;(c=new Error(e.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},SksO:function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},TqRt:function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},UxWs:function(t,e,n){"use strict";n.r(e);var r=n("dI71"),o=n("xtsi"),a=n("q1tI"),i=n.n(a),s=n("i8i4"),c=n.n(s),u=n("YwZP"),l=n("7hJ6"),p=n("MMVs"),d=n.n(p),f=n("Wbzz"),h=n("emEt"),m=n("YLt+"),v=n("5yr3");const g={id:"gatsby-announcer",style:{position:"absolute",top:0,width:1,height:1,padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},"aria-live":"assertive","aria-atomic":"true"};var y=n("9Xx/"),b=n("+ZDr");const w=new Map,P=new Map;function R(t){let e=w.get(t);return e||(e=P.get(t.toLowerCase())),null!=e&&(window.___replace(e.toPath),!0)}m.forEach(t=>{t.ignoreCase?P.set(t.fromPath,t):w.set(t.fromPath,t)});const _=(t,e)=>{R(t.pathname)||Object(o.apiRunner)("onPreRouteUpdate",{location:t,prevLocation:e})},O=(t,e)=>{R(t.pathname)||Object(o.apiRunner)("onRouteUpdate",{location:t,prevLocation:e})},S=function(t,e){if(void 0===e&&(e={}),"number"==typeof t)return void y.c.navigate(t);let{pathname:n}=Object(b.parsePath)(t),r=w.get(n);if(r||(r=P.get(n.toLowerCase())),r&&(t=r.toPath,n=Object(b.parsePath)(t).pathname),window.___swUpdated)return void(window.location=n);const a=setTimeout(()=>{v.a.emit("onDelayedLoadPageResources",{pathname:n}),Object(o.apiRunner)("onRouteUpdateDelayed",{location:window.location})},1e3);h.default.loadPage(n).then(r=>{if(!r||r.status===h.PageResourceStatus.Error)return window.history.replaceState({},"",location.href),window.location=n,void clearTimeout(a);r&&r.page.webpackCompilationHash!==window.___webpackCompilationHash&&("serviceWorker"in navigator&&null!==navigator.serviceWorker.controller&&"activated"===navigator.serviceWorker.controller.state&&navigator.serviceWorker.controller.postMessage({gatsbyApi:"clearPathResources"}),window.location=n),Object(u.navigate)(t,e),clearTimeout(a)})};function x(t,e){let{location:n}=e;const{pathname:r,hash:a}=n,i=Object(o.apiRunner)("shouldUpdateScroll",{prevRouterProps:t,pathname:r,routerProps:{location:n},getSavedScrollPosition:t=>[0,this._stateStorage.read(t,t.key)]});if(i.length>0)return i[i.length-1];if(t){const{location:{pathname:e}}=t;if(e===r)return a?decodeURI(a.slice(1)):[0,0]}return!0}let E=function(t){function e(e){var n;return(n=t.call(this,e)||this).announcementRef=i.a.createRef(),n}Object(r.a)(e,t);var n=e.prototype;return n.componentDidUpdate=function(t,e){requestAnimationFrame(()=>{let t="new page at "+this.props.location.pathname;document.title&&(t=document.title);const e=document.querySelectorAll("#gatsby-focus-wrapper h1");e&&e.length&&(t=e[0].textContent);const n="Navigated to "+t;if(this.announcementRef.current){this.announcementRef.current.innerText!==n&&(this.announcementRef.current.innerText=n)}})},n.render=function(){return i.a.createElement("div",Object.assign({},g,{ref:this.announcementRef}))},e}(i.a.Component);const C=(t,e)=>{var n,r;return t.href!==e.href||(null==t||null===(n=t.state)||void 0===n?void 0:n.key)!==(null==e||null===(r=e.state)||void 0===r?void 0:r.key)};let j=function(t){function e(e){var n;return n=t.call(this,e)||this,_(e.location,null),n}Object(r.a)(e,t);var n=e.prototype;return n.componentDidMount=function(){O(this.props.location,null)},n.shouldComponentUpdate=function(t){return!!C(t.location,this.props.location)&&(_(this.props.location,t.location),!0)},n.componentDidUpdate=function(t){C(t.location,this.props.location)&&O(this.props.location,t.location)},n.render=function(){return i.a.createElement(i.a.Fragment,null,this.props.children,i.a.createElement(E,{location:location}))},e}(i.a.Component);var k=n("IOVJ"),L=n("NsGk"),T=n.n(L);function D(t,e){for(var n in t)if(!(n in e))return!0;for(var r in e)if(t[r]!==e[r])return!0;return!1}var M=function(t){function e(e){var n;n=t.call(this)||this;const{location:r,pageResources:o}=e;return n.state={location:{...r},pageResources:o||h.default.loadPageSync(r.pathname)},n}Object(r.a)(e,t),e.getDerivedStateFromProps=function(t,e){let{location:n}=t;if(e.location.href!==n.href){return{pageResources:h.default.loadPageSync(n.pathname),location:{...n}}}return{location:{...n}}};var n=e.prototype;return n.loadResources=function(t){h.default.loadPage(t).then(e=>{e&&e.status!==h.PageResourceStatus.Error?this.setState({location:{...window.location},pageResources:e}):(window.history.replaceState({},"",location.href),window.location=t)})},n.shouldComponentUpdate=function(t,e){return e.pageResources?this.state.pageResources!==e.pageResources||(this.state.pageResources.component!==e.pageResources.component||(this.state.pageResources.json!==e.pageResources.json||(!(this.state.location.key===e.location.key||!e.pageResources.page||!e.pageResources.page.matchPath&&!e.pageResources.page.path)||function(t,e,n){return D(t.props,e)||D(t.state,n)}(this,t,e)))):(this.loadResources(t.location.pathname),!1)},n.render=function(){return this.props.children(this.state)},e}(i.a.Component),A=n("cSJ8"),U=n("JeVI");const I=new h.ProdLoader(T.a,U);Object(h.setLoader)(I),I.setApiRunner(o.apiRunner),window.asyncRequires=T.a,window.___emitter=v.a,window.___loader=h.publicLoader,y.c.listen(t=>{t.location.action=t.action}),window.___push=t=>S(t,{replace:!1}),window.___replace=t=>S(t,{replace:!0}),window.___navigate=(t,e)=>S(t,e),R(window.location.pathname),Object(o.apiRunnerAsync)("onClientEntry").then(()=>{Object(o.apiRunner)("registerServiceWorker").length>0&&n("NSX3");const t=t=>i.a.createElement(u.BaseContext.Provider,{value:{baseuri:"/",basepath:"/"}},i.a.createElement(k.a,t)),e=i.a.createContext({});let a=function(t){function n(){return t.apply(this,arguments)||this}return Object(r.a)(n,t),n.prototype.render=function(){const{children:t}=this.props;return i.a.createElement(u.Location,null,n=>{let{location:r}=n;return i.a.createElement(M,{location:r},n=>{let{pageResources:r,location:o}=n;const a=Object(h.getStaticQueryResults)();return i.a.createElement(f.StaticQueryContext.Provider,{value:a},i.a.createElement(e.Provider,{value:{pageResources:r,location:o}},t))})})},n}(i.a.Component),s=function(n){function o(){return n.apply(this,arguments)||this}return Object(r.a)(o,n),o.prototype.render=function(){return i.a.createElement(e.Consumer,null,e=>{let{pageResources:n,location:r}=e;return i.a.createElement(j,{location:r},i.a.createElement(l.ScrollContext,{location:r,shouldUpdateScroll:x},i.a.createElement(u.Router,{basepath:"/smartblock",location:r,id:"gatsby-focus-wrapper"},i.a.createElement(t,Object.assign({path:"/404.html"===n.page.path?Object(A.a)(r.pathname,"/smartblock"):encodeURI(n.page.matchPath||n.page.path)},this.props,{location:r,pageResources:n},n.json)))))})},o}(i.a.Component);const{pagePath:p,location:m}=window;p&&"/smartblock"+p!==m.pathname&&!(I.findMatchPath(Object(A.a)(m.pathname,"/smartblock"))||"/404.html"===p||p.match(/^\/404\/?$/)||p.match(/^\/offline-plugin-app-shell-fallback\/?$/))&&Object(u.navigate)("/smartblock"+p+m.search+m.hash,{replace:!0}),h.publicLoader.loadPage(m.pathname).then(t=>{if(!t||t.status===h.PageResourceStatus.Error)throw new Error(`page resources for ${m.pathname} not found. Not rendering React`);window.___webpackCompilationHash=t.page.webpackCompilationHash;const e=Object(o.apiRunner)("wrapRootElement",{element:i.a.createElement(s,null)},i.a.createElement(s,null),t=>{let{result:e}=t;return{element:e}}).pop(),n=()=>i.a.createElement(a,null,e),r=Object(o.apiRunner)("replaceHydrateFunction",void 0,c.a.hydrate)[0];d()(()=>{r(i.a.createElement(n,null),"undefined"!=typeof window?document.getElementById("___gatsby"):void 0,()=>{Object(o.apiRunner)("onInitialClientRender")})})})})},VbXa:function(t,e,n){var r=n("SksO");t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},Wbzz:function(t,e,n){"use strict";n.r(e),n.d(e,"graphql",(function(){return m})),n.d(e,"StaticQueryContext",(function(){return p})),n.d(e,"StaticQuery",(function(){return f})),n.d(e,"useStaticQuery",(function(){return h})),n.d(e,"prefetchPathname",(function(){return l}));var r=n("q1tI"),o=n.n(r),a=n("+ZDr"),i=n.n(a);n.d(e,"Link",(function(){return i.a})),n.d(e,"withAssetPrefix",(function(){return a.withAssetPrefix})),n.d(e,"withPrefix",(function(){return a.withPrefix})),n.d(e,"parsePath",(function(){return a.parsePath})),n.d(e,"navigate",(function(){return a.navigate})),n.d(e,"push",(function(){return a.push})),n.d(e,"replace",(function(){return a.replace})),n.d(e,"navigateTo",(function(){return a.navigateTo}));var s=n("7hJ6");n.d(e,"useScrollRestoration",(function(){return s.useScrollRestoration}));var c=n("lw3w"),u=n.n(c);n.d(e,"PageRenderer",(function(){return u.a}));const l=n("emEt").default.enqueue,p=o.a.createContext({});function d(t){let{staticQueryData:e,data:n,query:r,render:a}=t;const i=n?n.data:e[r]&&e[r].data;return o.a.createElement(o.a.Fragment,null,i&&a(i),!i&&o.a.createElement("div",null,"Loading (StaticQuery)"))}const f=t=>{const{data:e,query:n,render:r,children:a}=t;return o.a.createElement(p.Consumer,null,t=>o.a.createElement(d,{data:e,query:n,render:r||a,staticQueryData:t}))},h=t=>{var e;o.a.useContext;const n=o.a.useContext(p);if(isNaN(Number(t)))throw new Error(`useStaticQuery was called with a string but expects to be called using \`graphql\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\`${t}\`);\n`);if(null!==(e=n[t])&&void 0!==e&&e.data)return n[t].data;throw new Error("The result of this StaticQuery could not be fetched.\n\nThis is likely a bug in Gatsby and if refreshing the page does not fix it, please open an issue in https://github.com/gatsbyjs/gatsby/issues")};function m(){throw new Error("It appears like Gatsby is misconfigured. Gatsby related `graphql` calls are supposed to only be evaluated at compile time, and then compiled away. Unfortunately, something went wrong and the query was left in the compiled code.\n\nUnless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.")}},"YLt+":function(t){t.exports=JSON.parse("[]")},YVoz:function(t,e,n){"use strict";t.exports=Object.assign},YwZP:function(t,e,n){"use strict";n.r(e),n.d(e,"Link",(function(){return T})),n.d(e,"Location",(function(){return b})),n.d(e,"LocationProvider",(function(){return w})),n.d(e,"Match",(function(){return q})),n.d(e,"Redirect",(function(){return I})),n.d(e,"Router",(function(){return _})),n.d(e,"ServerLocation",(function(){return P})),n.d(e,"isRedirect",(function(){return M})),n.d(e,"redirectTo",(function(){return A})),n.d(e,"useLocation",(function(){return W})),n.d(e,"useNavigate",(function(){return F})),n.d(e,"useParams",(function(){return N})),n.d(e,"useMatch",(function(){return J})),n.d(e,"BaseContext",(function(){return R}));var r=n("q1tI"),o=n.n(r),a=(n("17x9"),n("QLaP")),i=n.n(a),s=n("nqlD"),c=n.n(s),u=n("94VI"),l=n("LYrO");n.d(e,"matchPath",(function(){return l.match}));var p=n("9Xx/");n.d(e,"createHistory",(function(){return p.a})),n.d(e,"createMemorySource",(function(){return p.b})),n.d(e,"navigate",(function(){return p.d})),n.d(e,"globalHistory",(function(){return p.c}));var d=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var g=function(t,e){var n=c()(e);return n.displayName=t,n},y=g("Location"),b=function(t){var e=t.children;return o.a.createElement(y.Consumer,null,(function(t){return t?e(t):o.a.createElement(w,null,e)}))},w=function(t){function e(){var n,r;h(this,e);for(var o=arguments.length,a=Array(o),i=0;i-1?(a=e.substring(0,r),i=e.substring(r)):a=e,o.a.createElement(y.Provider,{value:{location:{pathname:a,search:i,hash:""},navigate:function(){throw new Error("You can't call navigate on the server.")}}},n)},R=g("Base",{baseuri:"/",basepath:"/"}),_=function(t){return o.a.createElement(R.Consumer,null,(function(e){return o.a.createElement(b,null,(function(n){return o.a.createElement(O,d({},e,n,t))}))}))},O=function(t){function e(){return h(this,e),m(this,t.apply(this,arguments))}return v(e,t),e.prototype.render=function(){var t=this.props,e=t.location,n=t.navigate,r=t.basepath,a=t.primary,i=t.children,s=(t.baseuri,t.component),c=void 0===s?"div":s,u=f(t,["location","navigate","basepath","primary","children","baseuri","component"]),p=o.a.Children.toArray(i).reduce((function(t,e){var n=G(r)(e);return t.concat(n)}),[]),h=e.pathname,m=Object(l.pick)(p,h);if(m){var v=m.params,g=m.uri,y=m.route,b=m.route.value;r=y.default?r:y.path.replace(/\*$/,"");var w=d({},v,{uri:g,location:e,navigate:function(t,e){return n(Object(l.resolve)(t,g),e)}}),P=o.a.cloneElement(b,w,b.props.children?o.a.createElement(_,{location:e,primary:a},b.props.children):void 0),O=a?x:c,S=a?d({uri:g,location:e,component:c},u):u;return o.a.createElement(R.Provider,{value:{baseuri:g,basepath:r}},o.a.createElement(O,S,P))}return null},e}(o.a.PureComponent);O.defaultProps={primary:!0};var S=g("Focus"),x=function(t){var e=t.uri,n=t.location,r=t.component,a=f(t,["uri","location","component"]);return o.a.createElement(S.Consumer,null,(function(t){return o.a.createElement(j,d({},a,{component:r,requestFocus:t,uri:e,location:n}))}))},E=!0,C=0,j=function(t){function e(){var n,r;h(this,e);for(var o=arguments.length,a=Array(o),i=0;i{if("undefined"==typeof document)return void r();const o=document.createElement("link");o.setAttribute("rel","prefetch"),o.setAttribute("href",t),Object.keys(e).forEach(t=>{o.setAttribute(t,e[t])}),o.onload=n,o.onerror=r;(document.getElementsByTagName("head")[0]||document.getElementsByName("script")[0].parentNode).appendChild(o)})}:function(t){return new Promise((e,n)=>{const r=new XMLHttpRequest;r.open("GET",t,!0),r.onload=()=>{200===r.status?e():n()},r.send(null)})},i={};var s=function(t,e){return new Promise(n=>{i[t]?n():a(t,e).then(()=>{n(),i[t]=!0}).catch(()=>{})})},c=n("5yr3"),u=n("30RF");const l={Error:"error",Success:"success"},p=t=>t&&t.default||t,d=t=>{var e;return`/smartblock/page-data/${"/"===t?"index":e=(e="/"===(e=t)[0]?e.slice(1):e).endsWith("/")?e.slice(0,-1):e}/page-data.json`};function f(t,e){return void 0===e&&(e="GET"),new Promise((n,r)=>{const o=new XMLHttpRequest;o.open(e,t,!0),o.onreadystatechange=()=>{4==o.readyState&&n(o)},o.send(null)})}const h=function(t,e){void 0===e&&(e=null);const n={componentChunkName:t.componentChunkName,path:t.path,webpackCompilationHash:t.webpackCompilationHash,matchPath:t.matchPath,staticQueryHashes:t.staticQueryHashes};return{component:e,json:t.result,page:n}};let m=function(){function t(t,e){this.inFlightNetworkRequests=new Map,this.pageDb=new Map,this.inFlightDb=new Map,this.staticQueryDb={},this.pageDataDb=new Map,this.prefetchTriggered=new Set,this.prefetchCompleted=new Set,this.loadComponent=t,Object(u.d)(e)}var e=t.prototype;return e.memoizedGet=function(t){let e=this.inFlightNetworkRequests.get(t);return e||(e=f(t,"GET"),this.inFlightNetworkRequests.set(t,e)),e.then(e=>(this.inFlightNetworkRequests.delete(t),e)).catch(e=>{throw this.inFlightNetworkRequests.delete(t),e})},e.setApiRunner=function(t){this.apiRunner=t,this.prefetchDisabled=t("disableCorePrefetching").some(t=>t)},e.fetchPageDataJson=function(t){const{pagePath:e,retries:n=0}=t,r=d(e);return this.memoizedGet(r).then(r=>{const{status:o,responseText:a}=r;if(200===o)try{const e=JSON.parse(a);if(void 0===e.path)throw new Error("not a valid pageData response");return Object.assign(t,{status:l.Success,payload:e})}catch(i){}return 404===o||200===o?"/404.html"===e?Object.assign(t,{status:l.Error}):this.fetchPageDataJson(Object.assign(t,{pagePath:"/404.html",notFound:!0})):500===o?Object.assign(t,{status:l.Error}):n<3?this.fetchPageDataJson(Object.assign(t,{retries:n+1})):Object.assign(t,{status:l.Error})})},e.loadPageDataJson=function(t){const e=Object(u.b)(t);if(this.pageDataDb.has(e)){const t=this.pageDataDb.get(e);return Promise.resolve(t)}return this.fetchPageDataJson({pagePath:e}).then(t=>(this.pageDataDb.set(e,t),t))},e.findMatchPath=function(t){return Object(u.a)(t)},e.loadPage=function(t){const e=Object(u.b)(t);if(this.pageDb.has(e)){const t=this.pageDb.get(e);return Promise.resolve(t.payload)}if(this.inFlightDb.has(e))return this.inFlightDb.get(e);const n=Promise.all([this.loadAppData(),this.loadPageDataJson(e)]).then(t=>{const n=t[1];if(n.status===l.Error)return{status:l.Error};let r=n.payload;const{componentChunkName:o,staticQueryHashes:a=[]}=r,i={},s=this.loadComponent(o).then(e=>{let o;return i.createdAt=new Date,e?(i.status=l.Success,!0===n.notFound&&(i.notFound=!0),r=Object.assign(r,{webpackCompilationHash:t[0]?t[0].webpackCompilationHash:""}),o=h(r,e)):i.status=l.Error,o}),u=Promise.all(a.map(t=>{if(this.staticQueryDb[t]){const e=this.staticQueryDb[t];return{staticQueryHash:t,jsonPayload:e}}return this.memoizedGet(`/smartblock/page-data/sq/d/${t}.json`).then(e=>{const n=JSON.parse(e.responseText);return{staticQueryHash:t,jsonPayload:n}})})).then(t=>{const e={};return t.forEach(t=>{let{staticQueryHash:n,jsonPayload:r}=t;e[n]=r,this.staticQueryDb[n]=r}),e});return Promise.all([s,u]).then(t=>{let n,[r,o]=t;return r&&(n={...r,staticQueryResults:o},i.payload=n,c.a.emit("onPostLoadPageResources",{page:n,pageResources:n})),this.pageDb.set(e,i),n})});return n.then(t=>{this.inFlightDb.delete(e)}).catch(t=>{throw this.inFlightDb.delete(e),t}),this.inFlightDb.set(e,n),n},e.loadPageSync=function(t){const e=Object(u.b)(t);if(this.pageDb.has(e)){return this.pageDb.get(e).payload}},e.shouldPrefetch=function(t){return!!(()=>{if("connection"in navigator&&void 0!==navigator.connection){if((navigator.connection.effectiveType||"").includes("2g"))return!1;if(navigator.connection.saveData)return!1}return!0})()&&!this.pageDb.has(t)},e.prefetch=function(t){if(!this.shouldPrefetch(t))return!1;if(this.prefetchTriggered.has(t)||(this.apiRunner("onPrefetchPathname",{pathname:t}),this.prefetchTriggered.add(t)),this.prefetchDisabled)return!1;const e=Object(u.b)(t);return this.doPrefetch(e).then(()=>{this.prefetchCompleted.has(t)||(this.apiRunner("onPostPrefetchPathname",{pathname:t}),this.prefetchCompleted.add(t))}),!0},e.doPrefetch=function(t){const e=d(t);return s(e,{crossOrigin:"anonymous",as:"fetch"}).then(()=>this.loadPageDataJson(t))},e.hovering=function(t){this.loadPage(t)},e.getResourceURLsForPathname=function(t){const e=Object(u.b)(t),n=this.pageDataDb.get(e);if(n){const t=h(n.payload);return[].concat(Object(o.a)(v(t.page.componentChunkName)),[d(e)])}return null},e.isPageNotFound=function(t){const e=Object(u.b)(t),n=this.pageDb.get(e);return!n||n.notFound},e.loadAppData=function(t){return void 0===t&&(t=0),this.memoizedGet("/smartblock/page-data/app-data.json").then(e=>{const{status:n,responseText:r}=e;let o;if(200!==n&&t<3)return this.loadAppData(t+1);if(200===n)try{const t=JSON.parse(r);if(void 0===t.webpackCompilationHash)throw new Error("not a valid app-data response");o=t}catch(a){}return o})},t}();const v=t=>(window.___chunkMapping[t]||[]).map(t=>"/smartblock"+t);let g,y=function(t){function e(e,n){return t.call(this,t=>e.components[t]?e.components[t]().then(p).catch(()=>null):Promise.resolve(),n)||this}Object(r.a)(e,t);var n=e.prototype;return n.doPrefetch=function(e){return t.prototype.doPrefetch.call(this,e).then(t=>{if(t.status!==l.Success)return Promise.resolve();const e=t.payload,n=e.componentChunkName,r=v(n);return Promise.all(r.map(s)).then(()=>e)})},n.loadPageDataJson=function(e){return t.prototype.loadPageDataJson.call(this,e).then(t=>t.notFound?f(e,"HEAD").then(e=>200===e.status?{status:l.Error}:t):t)},e}(m);const b=t=>{g=t},w={getResourcesForPathname:t=>(console.warn("Warning: getResourcesForPathname is deprecated. Use loadPage instead"),g.i.loadPage(t)),getResourcesForPathnameSync:t=>(console.warn("Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead"),g.i.loadPageSync(t)),enqueue:t=>g.prefetch(t),getResourceURLsForPathname:t=>g.getResourceURLsForPathname(t),loadPage:t=>g.loadPage(t),loadPageSync:t=>g.loadPageSync(t),prefetch:t=>g.prefetch(t),isPageNotFound:t=>g.isPageNotFound(t),hovering:t=>g.hovering(t),loadAppData:()=>g.loadAppData()};e.default=w;function P(){return g?g.staticQueryDb:{}}},hd9s:function(t,e,n){"use strict";var r=n("284h"),o=n("TqRt");e.__esModule=!0,e.ScrollContainer=void 0;var a=o(n("pVnL")),i=o(n("VbXa")),s=r(n("q1tI")),c=o(n("i8i4")),u=o(n("17x9")),l=n("Enzk"),p=n("YwZP"),d={scrollKey:u.default.string.isRequired,shouldUpdateScroll:u.default.func,children:u.default.element.isRequired},f=function(t){function e(e){return t.call(this,e)||this}(0,i.default)(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=this,e=c.default.findDOMNode(this),n=this.props,r=n.location,o=n.scrollKey;if(e){e.addEventListener("scroll",(function(){t.props.context.save(r,o,e.scrollTop)}));var a=this.props.context.read(r,o);e.scrollTo(0,a||0)}},n.render=function(){return this.props.children},e}(s.Component),h=function(t){return s.createElement(p.Location,null,(function(e){var n=e.location;return s.createElement(l.ScrollContext.Consumer,null,(function(e){return s.createElement(f,(0,a.default)({},t,{context:e,location:n}))}))}))};e.ScrollContainer=h,h.propTypes=d},lw3w:function(t,e,n){var r;t.exports=(r=n("rzlk"))&&r.default||r},npZl:function(t,e,n){"use strict";var r=n("TqRt");n("Wbzz"),r(n("9hXx"))},nqlD:function(t,e,n){const{createContext:r}=n("q1tI");t.exports=r,t.exports.default=r},nwwn:function(t,e,n){"use strict";e.DEFAULT_OPTIONS={maxWidth:650,wrapperStyle:"",backgroundColor:"white",linkImagesToOriginal:!0,showCaptions:!1,markdownCaptions:!1,withWebp:!1,withAvif:!1,tracedSVG:!1,loading:"lazy",disableBgImageOnAlpha:!1,disableBgImage:!1},e.EMPTY_ALT="GATSBY_EMPTY_ALT",e.imageClass="gatsby-resp-image-image",e.imageWrapperClass="gatsby-resp-image-wrapper",e.imageBackgroundClass="gatsby-resp-image-background-image"},pVnL:function(t,e){function n(){return t.exports=n=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let{location:e}=t;const n=a.default.loadPageSync(e.pathname);return n?o.a.createElement(i.a,{location:e,pageResources:n,...n.json}):null}},xtsi:function(t,e,n){const r=n("LeKB"),{getResourcesForPathname:o,getResourcesForPathnameSync:a,getResourceURLsForPathname:i,loadPage:s,loadPageSync:c}=n("emEt").publicLoader;e.apiRunner=function(t,e,n,u){void 0===e&&(e={});let l=r.map(n=>{if(!n.plugin[t])return;e.getResourcesForPathnameSync=a,e.getResourcesForPathname=o,e.getResourceURLsForPathname=i,e.loadPage=s,e.loadPageSync=c;const r=n.plugin[t](e,n.options);return r&&u&&(e=u({args:e,result:r,plugin:n})),r});return l=l.filter(t=>void 0!==t),l.length>0?l:n?[n]:[]},e.apiRunnerAsync=(t,e,n)=>r.reduce((n,r)=>r.plugin[t]?n.then(()=>r.plugin[t](e,r.options)):n,Promise.resolve())}},[["UxWs",1,7]]]); -//# sourceMappingURL=app-3488d54c30c10bf56ca6.js.map \ No newline at end of file diff --git a/app-6a665d0d1f5bf65820ca.js b/app-6a665d0d1f5bf65820ca.js new file mode 100644 index 0000000..afc6da1 --- /dev/null +++ b/app-6a665d0d1f5bf65820ca.js @@ -0,0 +1,3 @@ +/*! For license information please see app-6a665d0d1f5bf65820ca.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+ZDr":function(t,e,n){"use strict";var r=n("TqRt");e.__esModule=!0,e.withPrefix=h,e.withAssetPrefix=function(t){return h(t,m())},e.navigateTo=e.replace=e.push=e.navigate=e.default=void 0;var o=r(n("8OQS")),a=r(n("PJYZ")),i=r(n("VbXa")),s=r(n("pVnL")),c=r(n("17x9")),u=r(n("q1tI")),l=n("YwZP"),p=n("LYrO"),d=n("cu4x");e.parsePath=d.parsePath;var f=function(t){return null==t?void 0:t.startsWith("/")};function h(t,e){var n,r;if(void 0===e&&(e=v()),!g(t))return t;if(t.startsWith("./")||t.startsWith("../"))return t;var o=null!==(n=null!==(r=e)&&void 0!==r?r:m())&&void 0!==n?n:"/";return""+((null==o?void 0:o.endsWith("/"))?o.slice(0,-1):o)+(t.startsWith("/")?t:"/"+t)}var m=function(){return"/smartblock"},v=function(){return"/smartblock"},g=function(t){return t&&!t.startsWith("http://")&&!t.startsWith("https://")&&!t.startsWith("//")};var y=function(t,e){return"number"==typeof t?t:g(t)?f(t)?h(t):function(t,e){return f(t)?t:(0,p.resolve)(t,e)}(t,e):t},b={activeClassName:c.default.string,activeStyle:c.default.object,partiallyActive:c.default.bool};function w(t){return u.default.createElement(l.Location,null,(function(e){var n=e.location;return u.default.createElement(P,(0,s.default)({},t,{_location:n}))}))}var P=function(t){function e(e){var n;(n=t.call(this,e)||this).defaultGetProps=function(t){var e=t.isPartiallyCurrent,r=t.isCurrent;return(n.props.partiallyActive?e:r)?{className:[n.props.className,n.props.activeClassName].filter(Boolean).join(" "),style:(0,s.default)({},n.props.style,n.props.activeStyle)}:null};var r=!1;return"undefined"!=typeof window&&window.IntersectionObserver&&(r=!0),n.state={IOSupported:r},n.handleRef=n.handleRef.bind((0,a.default)(n)),n}(0,i.default)(e,t);var n=e.prototype;return n._prefetch=function(){var t=window.location.pathname;this.props._location&&this.props._location.pathname&&(t=this.props._location.pathname);var e=y(this.props.to,t),n=(0,d.parsePath)(e).pathname;t!==n&&___loader.enqueue(n)},n.componentDidUpdate=function(t,e){this.props.to===t.to||this.state.IOSupported||this._prefetch()},n.componentDidMount=function(){this.state.IOSupported||this._prefetch()},n.componentWillUnmount=function(){if(this.io){var t=this.io,e=t.instance,n=t.el;e.unobserve(n),e.disconnect()}},n.handleRef=function(t){var e,n,r,o=this;this.props.innerRef&&this.props.innerRef.hasOwnProperty("current")?this.props.innerRef.current=t:this.props.innerRef&&this.props.innerRef(t),this.state.IOSupported&&t&&(this.io=(e=t,n=function(){o._prefetch()},(r=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(r.unobserve(e),r.disconnect(),n())}))}))).observe(e),{instance:r,el:e}))},n.render=function(){var t=this,e=this.props,n=e.to,r=e.getProps,a=void 0===r?this.defaultGetProps:r,i=e.onClick,c=e.onMouseEnter,p=(e.activeClassName,e.activeStyle,e.innerRef,e.partiallyActive,e.state),f=e.replace,h=e._location,m=(0,o.default)(e,["to","getProps","onClick","onMouseEnter","activeClassName","activeStyle","innerRef","partiallyActive","state","replace","_location"]);var v=y(n,h.pathname);return g(v)?u.default.createElement(l.Link,(0,s.default)({to:v,state:p,getProps:a,innerRef:this.handleRef,onMouseEnter:function(t){c&&c(t),___loader.hovering((0,d.parsePath)(v).pathname)},onClick:function(e){if(i&&i(e),!(0!==e.button||t.props.target||e.defaultPrevented||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault();var n=f,r=encodeURI(v)===h.pathname;"boolean"!=typeof f&&r&&(n=!0),window.___navigate(v,{state:p,replace:n})}return!0}},m)):u.default.createElement("a",(0,s.default)({href:v},m))},e}(u.default.Component);P.propTypes=(0,s.default)({},b,{onClick:c.default.func,to:c.default.string.isRequired,replace:c.default.bool,state:c.default.object});var R=function(t,e,n){return console.warn('The "'+t+'" method is now deprecated and will be removed in Gatsby v'+n+'. Please use "'+e+'" instead.')},_=u.default.forwardRef((function(t,e){return u.default.createElement(w,(0,s.default)({innerRef:e},t))}));e.default=_;e.navigate=function(t,e){window.___navigate(y(t,window.location.pathname),e)};var O=function(t){R("push","navigate",3),window.___push(y(t,window.location.pathname))};e.push=O;e.replace=function(t){R("replace","navigate",3),window.___replace(y(t,window.location.pathname))};e.navigateTo=function(t){return R("navigateTo","navigate",3),O(t)}},"/hTd":function(t,e,n){"use strict";e.__esModule=!0,e.SessionStorage=void 0;var r=function(){function t(){}var e=t.prototype;return e.read=function(t,e){var n=this.getStateKey(t,e);try{var r=window.sessionStorage.getItem(n);return r?JSON.parse(r):0}catch(o){return window&&window.___GATSBY_REACT_ROUTER_SCROLL&&window.___GATSBY_REACT_ROUTER_SCROLL[n]?window.___GATSBY_REACT_ROUTER_SCROLL[n]:0}},e.save=function(t,e,n){var r=this.getStateKey(t,e),o=JSON.stringify(n);try{window.sessionStorage.setItem(r,o)}catch(a){window&&window.___GATSBY_REACT_ROUTER_SCROLL||(window.___GATSBY_REACT_ROUTER_SCROLL={}),window.___GATSBY_REACT_ROUTER_SCROLL[r]=JSON.parse(o)}},e.getStateKey=function(t,e){var n="@@scroll|"+t.pathname;return null==e?n:n+"|"+e},t}();e.SessionStorage=r},"284h":function(t,e,n){var r=n("cDf5").default;function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(o=function(t){return t?n:e})(t)}t.exports=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=o(e);if(n&&n.has(t))return n.get(t);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var c=i?Object.getOwnPropertyDescriptor(t,s):null;c&&(c.get||c.set)?Object.defineProperty(a,s,c):a[s]=t[s]}return a.default=t,n&&n.set(t,a),a},t.exports.__esModule=!0,t.exports.default=t.exports},"30RF":function(t,e,n){"use strict";n.d(e,"d",(function(){return l})),n.d(e,"a",(function(){return p})),n.d(e,"c",(function(){return d})),n.d(e,"b",(function(){return f}));var r=n("LYrO"),o=n("cSJ8"),a=t=>void 0===t?t:"/"===t?"/":"/"===t.charAt(t.length-1)?t.slice(0,-1):t;const i=new Map;let s=[];const c=t=>{const e=decodeURIComponent(t);return Object(o.a)(e,"/smartblock").split("#")[0].split("?")[0]};function u(t){return t.startsWith("/")||t.startsWith("https://")||t.startsWith("http://")?t:new URL(t,window.location.href+(window.location.href.endsWith("/")?"":"/")).pathname}const l=t=>{s=t},p=t=>{const e=h(t),n=s.map(t=>{let{path:e,matchPath:n}=t;return{path:n,originalPath:e}}),o=Object(r.pick)(n,e);return o?a(o.route.originalPath):null},d=t=>{const e=h(t),n=s.map(t=>{let{path:e,matchPath:n}=t;return{path:n,originalPath:e}}),o=Object(r.pick)(n,e);return o?o.params:{}},f=t=>{const e=c(u(t));if(i.has(e))return i.get(e);let n=p(e);return n||(n=h(t)),i.set(e,n),n},h=t=>{let e=c(u(t));return"/index.html"===e&&(e="/"),e=a(e),e}},"3uz+":function(t,e,n){"use strict";e.__esModule=!0,e.useScrollRestoration=function(t){var e=(0,a.useLocation)(),n=(0,o.useContext)(r.ScrollContext),i=(0,o.useRef)();return(0,o.useLayoutEffect)((function(){if(i.current){var r=n.read(e,t);i.current.scrollTo(0,r||0)}}),[]),{ref:i,onScroll:function(){i.current&&n.save(e,t,i.current.scrollTop)}}};var r=n("Enzk"),o=n("q1tI"),a=n("YwZP")},"5yr3":function(t,e,n){"use strict";const r=function(t){return t=t||Object.create(null),{on:function(e,n){(t[e]||(t[e]=[])).push(n)},off:function(e,n){t[e]&&t[e].splice(t[e].indexOf(n)>>>0,1)},emit:function(e,n){(t[e]||[]).slice().map((function(t){t(n)})),(t["*"]||[]).slice().map((function(t){t(e,n)}))}}}();e.a=r},"7hJ6":function(t,e,n){"use strict";e.__esModule=!0,e.useScrollRestoration=e.ScrollContainer=e.ScrollContext=void 0;var r=n("Enzk");e.ScrollContext=r.ScrollHandler;var o=n("hd9s");e.ScrollContainer=o.ScrollContainer;var a=n("3uz+");e.useScrollRestoration=a.useScrollRestoration},"8OQS":function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o},t.exports.__esModule=!0,t.exports.default=t.exports},"94VI":function(t,e){e.polyfill=t=>t},"9Xx/":function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i}));var r=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},u=c.state,l=c.replace,p=void 0!==l&&l;if("number"==typeof e)t.history.go(e);else{u=r({},u,{key:Date.now()+""});try{i||p?t.history.replaceState(u,null,e):t.history.pushState(u,null,e)}catch(f){t.location[p?"replace":"assign"](e)}}a=o(t),i=!0;var d=new Promise((function(t){return s=t}));return n.forEach((function(t){return t({location:a,action:"PUSH"})})),d}}},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=t.indexOf("?"),n={pathname:e>-1?t.substr(0,e):t,search:e>-1?t.substr(e):""},r=0,o=[n],a=[null];return{get location(){return o[r]},addEventListener:function(t,e){},removeEventListener:function(t,e){},history:{get entries(){return o},get index(){return r},get state(){return a[r]},pushState:function(t,e,n){var i=n.split("?"),s=i[0],c=i[1],u=void 0===c?"":c;r++,o.push({pathname:s,search:u.length?"?"+u:u}),a.push(t)},replaceState:function(t,e,n){var i=n.split("?"),s=i[0],c=i[1],u=void 0===c?"":c;o[r]={pathname:s,search:u},a[r]=t},go:function(t){var e=r+t;e<0||e>a.length-1||(r=e)}}}},s=!("undefined"==typeof window||!window.document||!window.document.createElement),c=a(s?window:i()),u=c.navigate},"9hXx":function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;e.default=function(t,e){if(!Array.isArray(e))return"manifest.webmanifest";var n=e.find((function(e){return t.startsWith(e.start_url)}));return n?"manifest_"+n.lang+".webmanifest":"manifest.webmanifest"}},Enzk:function(t,e,n){"use strict";var r=n("284h"),o=n("TqRt");e.__esModule=!0,e.ScrollHandler=e.ScrollContext=void 0;var a=o(n("PJYZ")),i=o(n("VbXa")),s=r(n("q1tI")),c=o(n("17x9")),u=n("/hTd"),l=s.createContext(new u.SessionStorage);e.ScrollContext=l,l.displayName="GatsbyScrollContext";var p=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o{let{result:n}=e;return{element:n,props:t}}).pop()},e}(a.a.Component);e.a=u},JeVI:function(t){t.exports=JSON.parse("[]")},KQm4:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.score?-1:t.index-e.index}))},v=function(t){return t.replace(/(^\/+|\/+$)/g,"").split("/")},g=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r0})))&&n.length>0?"?"+n.join("&"):"")},y=["uri","path"],b=function(t,e){var n=Object.keys(t);return n.length===Object.keys(e).length&&n.every((function(n){return e.hasOwnProperty(n)&&t[n]===e[n]}))}},LeKB:function(t,e,n){t.exports=[{plugin:n("q9nr"),options:{plugins:[],maxWidth:590,linkImagesToOriginal:!0,showCaptions:!1,markdownCaptions:!1,sizeByPixelDensity:!1,backgroundColor:"white",quality:50,withWebp:!1,tracedSVG:!1,loading:"lazy",disableBgImageOnAlpha:!1,disableBgImage:!1}},{plugin:n("pWkz"),options:{plugins:[],head:!1,anonymize:!1,respectDNT:!1,exclude:[],pageTransitionDelay:0}},{plugin:n("npZl"),options:{plugins:[],name:"SmartBlock",short_name:"SmartBlock",start_url:"/",background_color:"#ffffff",theme_color:"#663399",display:"minimal-ui",icon:"static/favicon.png",legacy:!0,theme_color_in_head:!0,cache_busting_mode:"query",crossOrigin:"anonymous",include_favicon:!0,cacheDigest:"084321a740e799687cc736487af34310"}},{plugin:n("GddB"),options:{plugins:[]}}]},MMVs:function(t,e,n){t.exports=function(){var t=!1;-1!==navigator.appVersion.indexOf("MSIE 10")&&(t=!0);var e,n=[],r="object"==typeof document&&document,o=t?r.documentElement.doScroll("left"):r.documentElement.doScroll,a=r&&(o?/^loaded|^c/:/^loaded|^i|^c/).test(r.readyState);return!a&&r&&r.addEventListener("DOMContentLoaded",e=function(){for(r.removeEventListener("DOMContentLoaded",e),a=1;e=n.shift();)e()}),function(t){a?setTimeout(t,0):n.push(t)}}()},NSX3:function(t,e,n){"use strict";n.r(e);var r=n("xtsi");"https:"!==window.location.protocol&&"localhost"!==window.location.hostname?console.error("Service workers can only be used over HTTPS, or on localhost for development"):"serviceWorker"in navigator&&navigator.serviceWorker.register("/smartblock/sw.js").then((function(t){t.addEventListener("updatefound",()=>{Object(r.apiRunner)("onServiceWorkerUpdateFound",{serviceWorker:t});const e=t.installing;console.log("installingWorker",e),e.addEventListener("statechange",()=>{switch(e.state){case"installed":navigator.serviceWorker.controller?(window.___swUpdated=!0,Object(r.apiRunner)("onServiceWorkerUpdateReady",{serviceWorker:t}),window.___failedResources&&(console.log("resources failed, SW updated - reloading"),window.location.reload())):(console.log("Content is now available offline!"),Object(r.apiRunner)("onServiceWorkerInstalled",{serviceWorker:t}));break;case"redundant":console.error("The installing service worker became redundant."),Object(r.apiRunner)("onServiceWorkerRedundant",{serviceWorker:t});break;case"activated":Object(r.apiRunner)("onServiceWorkerActive",{serviceWorker:t})}})})})).catch((function(t){console.error("Error during service worker registration:",t)}))},NsGk:function(t,e,n){e.components={"component---src-pages-404-js":()=>Promise.all([n.e(0),n.e(4)]).then(n.bind(null,"w2l6")),"component---src-pages-index-js":()=>Promise.all([n.e(10),n.e(7),n.e(2),n.e(0),n.e(5)]).then(n.bind(null,"RXBc")),"component---src-templates-blog-post-js":()=>Promise.all([n.e(0),n.e(6)]).then(n.bind(null,"yZlL"))}},PJYZ:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},QLaP:function(t,e,n){"use strict";t.exports=function(t,e,n,r,o,a,i,s){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,s],l=0;(c=new Error(e.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},SksO:function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},TqRt:function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},UxWs:function(t,e,n){"use strict";n.r(e);var r=n("dI71"),o=n("xtsi"),a=n("q1tI"),i=n.n(a),s=n("i8i4"),c=n.n(s),u=n("YwZP"),l=n("7hJ6"),p=n("MMVs"),d=n.n(p),f=n("Wbzz"),h=n("emEt"),m=n("YLt+"),v=n("5yr3");const g={id:"gatsby-announcer",style:{position:"absolute",top:0,width:1,height:1,padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},"aria-live":"assertive","aria-atomic":"true"};var y=n("9Xx/"),b=n("+ZDr");const w=new Map,P=new Map;function R(t){let e=w.get(t);return e||(e=P.get(t.toLowerCase())),null!=e&&(window.___replace(e.toPath),!0)}m.forEach(t=>{t.ignoreCase?P.set(t.fromPath,t):w.set(t.fromPath,t)});const _=(t,e)=>{R(t.pathname)||Object(o.apiRunner)("onPreRouteUpdate",{location:t,prevLocation:e})},O=(t,e)=>{R(t.pathname)||Object(o.apiRunner)("onRouteUpdate",{location:t,prevLocation:e})},S=function(t,e){if(void 0===e&&(e={}),"number"==typeof t)return void y.c.navigate(t);let{pathname:n}=Object(b.parsePath)(t),r=w.get(n);if(r||(r=P.get(n.toLowerCase())),r&&(t=r.toPath,n=Object(b.parsePath)(t).pathname),window.___swUpdated)return void(window.location=n);const a=setTimeout(()=>{v.a.emit("onDelayedLoadPageResources",{pathname:n}),Object(o.apiRunner)("onRouteUpdateDelayed",{location:window.location})},1e3);h.default.loadPage(n).then(r=>{if(!r||r.status===h.PageResourceStatus.Error)return window.history.replaceState({},"",location.href),window.location=n,void clearTimeout(a);r&&r.page.webpackCompilationHash!==window.___webpackCompilationHash&&("serviceWorker"in navigator&&null!==navigator.serviceWorker.controller&&"activated"===navigator.serviceWorker.controller.state&&navigator.serviceWorker.controller.postMessage({gatsbyApi:"clearPathResources"}),window.location=n),Object(u.navigate)(t,e),clearTimeout(a)})};function x(t,e){let{location:n}=e;const{pathname:r,hash:a}=n,i=Object(o.apiRunner)("shouldUpdateScroll",{prevRouterProps:t,pathname:r,routerProps:{location:n},getSavedScrollPosition:t=>[0,this._stateStorage.read(t,t.key)]});if(i.length>0)return i[i.length-1];if(t){const{location:{pathname:e}}=t;if(e===r)return a?decodeURI(a.slice(1)):[0,0]}return!0}let E=function(t){function e(e){var n;return(n=t.call(this,e)||this).announcementRef=i.a.createRef(),n}Object(r.a)(e,t);var n=e.prototype;return n.componentDidUpdate=function(t,e){requestAnimationFrame(()=>{let t="new page at "+this.props.location.pathname;document.title&&(t=document.title);const e=document.querySelectorAll("#gatsby-focus-wrapper h1");e&&e.length&&(t=e[0].textContent);const n="Navigated to "+t;if(this.announcementRef.current){this.announcementRef.current.innerText!==n&&(this.announcementRef.current.innerText=n)}})},n.render=function(){return i.a.createElement("div",Object.assign({},g,{ref:this.announcementRef}))},e}(i.a.Component);const C=(t,e)=>{var n,r;return t.href!==e.href||(null==t||null===(n=t.state)||void 0===n?void 0:n.key)!==(null==e||null===(r=e.state)||void 0===r?void 0:r.key)};let j=function(t){function e(e){var n;return n=t.call(this,e)||this,_(e.location,null),n}Object(r.a)(e,t);var n=e.prototype;return n.componentDidMount=function(){O(this.props.location,null)},n.shouldComponentUpdate=function(t){return!!C(t.location,this.props.location)&&(_(this.props.location,t.location),!0)},n.componentDidUpdate=function(t){C(t.location,this.props.location)&&O(this.props.location,t.location)},n.render=function(){return i.a.createElement(i.a.Fragment,null,this.props.children,i.a.createElement(E,{location:location}))},e}(i.a.Component);var k=n("IOVJ"),L=n("NsGk"),T=n.n(L);function D(t,e){for(var n in t)if(!(n in e))return!0;for(var r in e)if(t[r]!==e[r])return!0;return!1}var M=function(t){function e(e){var n;n=t.call(this)||this;const{location:r,pageResources:o}=e;return n.state={location:{...r},pageResources:o||h.default.loadPageSync(r.pathname)},n}Object(r.a)(e,t),e.getDerivedStateFromProps=function(t,e){let{location:n}=t;if(e.location.href!==n.href){return{pageResources:h.default.loadPageSync(n.pathname),location:{...n}}}return{location:{...n}}};var n=e.prototype;return n.loadResources=function(t){h.default.loadPage(t).then(e=>{e&&e.status!==h.PageResourceStatus.Error?this.setState({location:{...window.location},pageResources:e}):(window.history.replaceState({},"",location.href),window.location=t)})},n.shouldComponentUpdate=function(t,e){return e.pageResources?this.state.pageResources!==e.pageResources||(this.state.pageResources.component!==e.pageResources.component||(this.state.pageResources.json!==e.pageResources.json||(!(this.state.location.key===e.location.key||!e.pageResources.page||!e.pageResources.page.matchPath&&!e.pageResources.page.path)||function(t,e,n){return D(t.props,e)||D(t.state,n)}(this,t,e)))):(this.loadResources(t.location.pathname),!1)},n.render=function(){return this.props.children(this.state)},e}(i.a.Component),A=n("cSJ8"),U=n("JeVI");const I=new h.ProdLoader(T.a,U);Object(h.setLoader)(I),I.setApiRunner(o.apiRunner),window.asyncRequires=T.a,window.___emitter=v.a,window.___loader=h.publicLoader,y.c.listen(t=>{t.location.action=t.action}),window.___push=t=>S(t,{replace:!1}),window.___replace=t=>S(t,{replace:!0}),window.___navigate=(t,e)=>S(t,e),R(window.location.pathname),Object(o.apiRunnerAsync)("onClientEntry").then(()=>{Object(o.apiRunner)("registerServiceWorker").length>0&&n("NSX3");const t=t=>i.a.createElement(u.BaseContext.Provider,{value:{baseuri:"/",basepath:"/"}},i.a.createElement(k.a,t)),e=i.a.createContext({});let a=function(t){function n(){return t.apply(this,arguments)||this}return Object(r.a)(n,t),n.prototype.render=function(){const{children:t}=this.props;return i.a.createElement(u.Location,null,n=>{let{location:r}=n;return i.a.createElement(M,{location:r},n=>{let{pageResources:r,location:o}=n;const a=Object(h.getStaticQueryResults)();return i.a.createElement(f.StaticQueryContext.Provider,{value:a},i.a.createElement(e.Provider,{value:{pageResources:r,location:o}},t))})})},n}(i.a.Component),s=function(n){function o(){return n.apply(this,arguments)||this}return Object(r.a)(o,n),o.prototype.render=function(){return i.a.createElement(e.Consumer,null,e=>{let{pageResources:n,location:r}=e;return i.a.createElement(j,{location:r},i.a.createElement(l.ScrollContext,{location:r,shouldUpdateScroll:x},i.a.createElement(u.Router,{basepath:"/smartblock",location:r,id:"gatsby-focus-wrapper"},i.a.createElement(t,Object.assign({path:"/404.html"===n.page.path?Object(A.a)(r.pathname,"/smartblock"):encodeURI(n.page.matchPath||n.page.path)},this.props,{location:r,pageResources:n},n.json)))))})},o}(i.a.Component);const{pagePath:p,location:m}=window;p&&"/smartblock"+p!==m.pathname&&!(I.findMatchPath(Object(A.a)(m.pathname,"/smartblock"))||"/404.html"===p||p.match(/^\/404\/?$/)||p.match(/^\/offline-plugin-app-shell-fallback\/?$/))&&Object(u.navigate)("/smartblock"+p+m.search+m.hash,{replace:!0}),h.publicLoader.loadPage(m.pathname).then(t=>{if(!t||t.status===h.PageResourceStatus.Error)throw new Error(`page resources for ${m.pathname} not found. Not rendering React`);window.___webpackCompilationHash=t.page.webpackCompilationHash;const e=Object(o.apiRunner)("wrapRootElement",{element:i.a.createElement(s,null)},i.a.createElement(s,null),t=>{let{result:e}=t;return{element:e}}).pop(),n=()=>i.a.createElement(a,null,e),r=Object(o.apiRunner)("replaceHydrateFunction",void 0,c.a.hydrate)[0];d()(()=>{r(i.a.createElement(n,null),"undefined"!=typeof window?document.getElementById("___gatsby"):void 0,()=>{Object(o.apiRunner)("onInitialClientRender")})})})})},VbXa:function(t,e,n){var r=n("SksO");t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},Wbzz:function(t,e,n){"use strict";n.r(e),n.d(e,"graphql",(function(){return m})),n.d(e,"StaticQueryContext",(function(){return p})),n.d(e,"StaticQuery",(function(){return f})),n.d(e,"useStaticQuery",(function(){return h})),n.d(e,"prefetchPathname",(function(){return l}));var r=n("q1tI"),o=n.n(r),a=n("+ZDr"),i=n.n(a);n.d(e,"Link",(function(){return i.a})),n.d(e,"withAssetPrefix",(function(){return a.withAssetPrefix})),n.d(e,"withPrefix",(function(){return a.withPrefix})),n.d(e,"parsePath",(function(){return a.parsePath})),n.d(e,"navigate",(function(){return a.navigate})),n.d(e,"push",(function(){return a.push})),n.d(e,"replace",(function(){return a.replace})),n.d(e,"navigateTo",(function(){return a.navigateTo}));var s=n("7hJ6");n.d(e,"useScrollRestoration",(function(){return s.useScrollRestoration}));var c=n("lw3w"),u=n.n(c);n.d(e,"PageRenderer",(function(){return u.a}));const l=n("emEt").default.enqueue,p=o.a.createContext({});function d(t){let{staticQueryData:e,data:n,query:r,render:a}=t;const i=n?n.data:e[r]&&e[r].data;return o.a.createElement(o.a.Fragment,null,i&&a(i),!i&&o.a.createElement("div",null,"Loading (StaticQuery)"))}const f=t=>{const{data:e,query:n,render:r,children:a}=t;return o.a.createElement(p.Consumer,null,t=>o.a.createElement(d,{data:e,query:n,render:r||a,staticQueryData:t}))},h=t=>{var e;o.a.useContext;const n=o.a.useContext(p);if(isNaN(Number(t)))throw new Error(`useStaticQuery was called with a string but expects to be called using \`graphql\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\`${t}\`);\n`);if(null!==(e=n[t])&&void 0!==e&&e.data)return n[t].data;throw new Error("The result of this StaticQuery could not be fetched.\n\nThis is likely a bug in Gatsby and if refreshing the page does not fix it, please open an issue in https://github.com/gatsbyjs/gatsby/issues")};function m(){throw new Error("It appears like Gatsby is misconfigured. Gatsby related `graphql` calls are supposed to only be evaluated at compile time, and then compiled away. Unfortunately, something went wrong and the query was left in the compiled code.\n\nUnless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.")}},"YLt+":function(t){t.exports=JSON.parse("[]")},YVoz:function(t,e,n){"use strict";t.exports=Object.assign},YwZP:function(t,e,n){"use strict";n.r(e),n.d(e,"Link",(function(){return T})),n.d(e,"Location",(function(){return b})),n.d(e,"LocationProvider",(function(){return w})),n.d(e,"Match",(function(){return q})),n.d(e,"Redirect",(function(){return I})),n.d(e,"Router",(function(){return _})),n.d(e,"ServerLocation",(function(){return P})),n.d(e,"isRedirect",(function(){return M})),n.d(e,"redirectTo",(function(){return A})),n.d(e,"useLocation",(function(){return W})),n.d(e,"useNavigate",(function(){return F})),n.d(e,"useParams",(function(){return N})),n.d(e,"useMatch",(function(){return J})),n.d(e,"BaseContext",(function(){return R}));var r=n("q1tI"),o=n.n(r),a=(n("17x9"),n("QLaP")),i=n.n(a),s=n("nqlD"),c=n.n(s),u=n("94VI"),l=n("LYrO");n.d(e,"matchPath",(function(){return l.match}));var p=n("9Xx/");n.d(e,"createHistory",(function(){return p.a})),n.d(e,"createMemorySource",(function(){return p.b})),n.d(e,"navigate",(function(){return p.d})),n.d(e,"globalHistory",(function(){return p.c}));var d=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var g=function(t,e){var n=c()(e);return n.displayName=t,n},y=g("Location"),b=function(t){var e=t.children;return o.a.createElement(y.Consumer,null,(function(t){return t?e(t):o.a.createElement(w,null,e)}))},w=function(t){function e(){var n,r;h(this,e);for(var o=arguments.length,a=Array(o),i=0;i-1?(a=e.substring(0,r),i=e.substring(r)):a=e,o.a.createElement(y.Provider,{value:{location:{pathname:a,search:i,hash:""},navigate:function(){throw new Error("You can't call navigate on the server.")}}},n)},R=g("Base",{baseuri:"/",basepath:"/"}),_=function(t){return o.a.createElement(R.Consumer,null,(function(e){return o.a.createElement(b,null,(function(n){return o.a.createElement(O,d({},e,n,t))}))}))},O=function(t){function e(){return h(this,e),m(this,t.apply(this,arguments))}return v(e,t),e.prototype.render=function(){var t=this.props,e=t.location,n=t.navigate,r=t.basepath,a=t.primary,i=t.children,s=(t.baseuri,t.component),c=void 0===s?"div":s,u=f(t,["location","navigate","basepath","primary","children","baseuri","component"]),p=o.a.Children.toArray(i).reduce((function(t,e){var n=G(r)(e);return t.concat(n)}),[]),h=e.pathname,m=Object(l.pick)(p,h);if(m){var v=m.params,g=m.uri,y=m.route,b=m.route.value;r=y.default?r:y.path.replace(/\*$/,"");var w=d({},v,{uri:g,location:e,navigate:function(t,e){return n(Object(l.resolve)(t,g),e)}}),P=o.a.cloneElement(b,w,b.props.children?o.a.createElement(_,{location:e,primary:a},b.props.children):void 0),O=a?x:c,S=a?d({uri:g,location:e,component:c},u):u;return o.a.createElement(R.Provider,{value:{baseuri:g,basepath:r}},o.a.createElement(O,S,P))}return null},e}(o.a.PureComponent);O.defaultProps={primary:!0};var S=g("Focus"),x=function(t){var e=t.uri,n=t.location,r=t.component,a=f(t,["uri","location","component"]);return o.a.createElement(S.Consumer,null,(function(t){return o.a.createElement(j,d({},a,{component:r,requestFocus:t,uri:e,location:n}))}))},E=!0,C=0,j=function(t){function e(){var n,r;h(this,e);for(var o=arguments.length,a=Array(o),i=0;i{if("undefined"==typeof document)return void r();const o=document.createElement("link");o.setAttribute("rel","prefetch"),o.setAttribute("href",t),Object.keys(e).forEach(t=>{o.setAttribute(t,e[t])}),o.onload=n,o.onerror=r;(document.getElementsByTagName("head")[0]||document.getElementsByName("script")[0].parentNode).appendChild(o)})}:function(t){return new Promise((e,n)=>{const r=new XMLHttpRequest;r.open("GET",t,!0),r.onload=()=>{200===r.status?e():n()},r.send(null)})},i={};var s=function(t,e){return new Promise(n=>{i[t]?n():a(t,e).then(()=>{n(),i[t]=!0}).catch(()=>{})})},c=n("5yr3"),u=n("30RF");const l={Error:"error",Success:"success"},p=t=>t&&t.default||t,d=t=>{var e;return`/smartblock/page-data/${"/"===t?"index":e=(e="/"===(e=t)[0]?e.slice(1):e).endsWith("/")?e.slice(0,-1):e}/page-data.json`};function f(t,e){return void 0===e&&(e="GET"),new Promise((n,r)=>{const o=new XMLHttpRequest;o.open(e,t,!0),o.onreadystatechange=()=>{4==o.readyState&&n(o)},o.send(null)})}const h=function(t,e){void 0===e&&(e=null);const n={componentChunkName:t.componentChunkName,path:t.path,webpackCompilationHash:t.webpackCompilationHash,matchPath:t.matchPath,staticQueryHashes:t.staticQueryHashes};return{component:e,json:t.result,page:n}};let m=function(){function t(t,e){this.inFlightNetworkRequests=new Map,this.pageDb=new Map,this.inFlightDb=new Map,this.staticQueryDb={},this.pageDataDb=new Map,this.prefetchTriggered=new Set,this.prefetchCompleted=new Set,this.loadComponent=t,Object(u.d)(e)}var e=t.prototype;return e.memoizedGet=function(t){let e=this.inFlightNetworkRequests.get(t);return e||(e=f(t,"GET"),this.inFlightNetworkRequests.set(t,e)),e.then(e=>(this.inFlightNetworkRequests.delete(t),e)).catch(e=>{throw this.inFlightNetworkRequests.delete(t),e})},e.setApiRunner=function(t){this.apiRunner=t,this.prefetchDisabled=t("disableCorePrefetching").some(t=>t)},e.fetchPageDataJson=function(t){const{pagePath:e,retries:n=0}=t,r=d(e);return this.memoizedGet(r).then(r=>{const{status:o,responseText:a}=r;if(200===o)try{const e=JSON.parse(a);if(void 0===e.path)throw new Error("not a valid pageData response");return Object.assign(t,{status:l.Success,payload:e})}catch(i){}return 404===o||200===o?"/404.html"===e?Object.assign(t,{status:l.Error}):this.fetchPageDataJson(Object.assign(t,{pagePath:"/404.html",notFound:!0})):500===o?Object.assign(t,{status:l.Error}):n<3?this.fetchPageDataJson(Object.assign(t,{retries:n+1})):Object.assign(t,{status:l.Error})})},e.loadPageDataJson=function(t){const e=Object(u.b)(t);if(this.pageDataDb.has(e)){const t=this.pageDataDb.get(e);return Promise.resolve(t)}return this.fetchPageDataJson({pagePath:e}).then(t=>(this.pageDataDb.set(e,t),t))},e.findMatchPath=function(t){return Object(u.a)(t)},e.loadPage=function(t){const e=Object(u.b)(t);if(this.pageDb.has(e)){const t=this.pageDb.get(e);return Promise.resolve(t.payload)}if(this.inFlightDb.has(e))return this.inFlightDb.get(e);const n=Promise.all([this.loadAppData(),this.loadPageDataJson(e)]).then(t=>{const n=t[1];if(n.status===l.Error)return{status:l.Error};let r=n.payload;const{componentChunkName:o,staticQueryHashes:a=[]}=r,i={},s=this.loadComponent(o).then(e=>{let o;return i.createdAt=new Date,e?(i.status=l.Success,!0===n.notFound&&(i.notFound=!0),r=Object.assign(r,{webpackCompilationHash:t[0]?t[0].webpackCompilationHash:""}),o=h(r,e)):i.status=l.Error,o}),u=Promise.all(a.map(t=>{if(this.staticQueryDb[t]){const e=this.staticQueryDb[t];return{staticQueryHash:t,jsonPayload:e}}return this.memoizedGet(`/smartblock/page-data/sq/d/${t}.json`).then(e=>{const n=JSON.parse(e.responseText);return{staticQueryHash:t,jsonPayload:n}})})).then(t=>{const e={};return t.forEach(t=>{let{staticQueryHash:n,jsonPayload:r}=t;e[n]=r,this.staticQueryDb[n]=r}),e});return Promise.all([s,u]).then(t=>{let n,[r,o]=t;return r&&(n={...r,staticQueryResults:o},i.payload=n,c.a.emit("onPostLoadPageResources",{page:n,pageResources:n})),this.pageDb.set(e,i),n})});return n.then(t=>{this.inFlightDb.delete(e)}).catch(t=>{throw this.inFlightDb.delete(e),t}),this.inFlightDb.set(e,n),n},e.loadPageSync=function(t){const e=Object(u.b)(t);if(this.pageDb.has(e)){return this.pageDb.get(e).payload}},e.shouldPrefetch=function(t){return!!(()=>{if("connection"in navigator&&void 0!==navigator.connection){if((navigator.connection.effectiveType||"").includes("2g"))return!1;if(navigator.connection.saveData)return!1}return!0})()&&!this.pageDb.has(t)},e.prefetch=function(t){if(!this.shouldPrefetch(t))return!1;if(this.prefetchTriggered.has(t)||(this.apiRunner("onPrefetchPathname",{pathname:t}),this.prefetchTriggered.add(t)),this.prefetchDisabled)return!1;const e=Object(u.b)(t);return this.doPrefetch(e).then(()=>{this.prefetchCompleted.has(t)||(this.apiRunner("onPostPrefetchPathname",{pathname:t}),this.prefetchCompleted.add(t))}),!0},e.doPrefetch=function(t){const e=d(t);return s(e,{crossOrigin:"anonymous",as:"fetch"}).then(()=>this.loadPageDataJson(t))},e.hovering=function(t){this.loadPage(t)},e.getResourceURLsForPathname=function(t){const e=Object(u.b)(t),n=this.pageDataDb.get(e);if(n){const t=h(n.payload);return[].concat(Object(o.a)(v(t.page.componentChunkName)),[d(e)])}return null},e.isPageNotFound=function(t){const e=Object(u.b)(t),n=this.pageDb.get(e);return!n||n.notFound},e.loadAppData=function(t){return void 0===t&&(t=0),this.memoizedGet("/smartblock/page-data/app-data.json").then(e=>{const{status:n,responseText:r}=e;let o;if(200!==n&&t<3)return this.loadAppData(t+1);if(200===n)try{const t=JSON.parse(r);if(void 0===t.webpackCompilationHash)throw new Error("not a valid app-data response");o=t}catch(a){}return o})},t}();const v=t=>(window.___chunkMapping[t]||[]).map(t=>"/smartblock"+t);let g,y=function(t){function e(e,n){return t.call(this,t=>e.components[t]?e.components[t]().then(p).catch(()=>null):Promise.resolve(),n)||this}Object(r.a)(e,t);var n=e.prototype;return n.doPrefetch=function(e){return t.prototype.doPrefetch.call(this,e).then(t=>{if(t.status!==l.Success)return Promise.resolve();const e=t.payload,n=e.componentChunkName,r=v(n);return Promise.all(r.map(s)).then(()=>e)})},n.loadPageDataJson=function(e){return t.prototype.loadPageDataJson.call(this,e).then(t=>t.notFound?f(e,"HEAD").then(e=>200===e.status?{status:l.Error}:t):t)},e}(m);const b=t=>{g=t},w={getResourcesForPathname:t=>(console.warn("Warning: getResourcesForPathname is deprecated. Use loadPage instead"),g.i.loadPage(t)),getResourcesForPathnameSync:t=>(console.warn("Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead"),g.i.loadPageSync(t)),enqueue:t=>g.prefetch(t),getResourceURLsForPathname:t=>g.getResourceURLsForPathname(t),loadPage:t=>g.loadPage(t),loadPageSync:t=>g.loadPageSync(t),prefetch:t=>g.prefetch(t),isPageNotFound:t=>g.isPageNotFound(t),hovering:t=>g.hovering(t),loadAppData:()=>g.loadAppData()};e.default=w;function P(){return g?g.staticQueryDb:{}}},hd9s:function(t,e,n){"use strict";var r=n("284h"),o=n("TqRt");e.__esModule=!0,e.ScrollContainer=void 0;var a=o(n("pVnL")),i=o(n("VbXa")),s=r(n("q1tI")),c=o(n("i8i4")),u=o(n("17x9")),l=n("Enzk"),p=n("YwZP"),d={scrollKey:u.default.string.isRequired,shouldUpdateScroll:u.default.func,children:u.default.element.isRequired},f=function(t){function e(e){return t.call(this,e)||this}(0,i.default)(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=this,e=c.default.findDOMNode(this),n=this.props,r=n.location,o=n.scrollKey;if(e){e.addEventListener("scroll",(function(){t.props.context.save(r,o,e.scrollTop)}));var a=this.props.context.read(r,o);e.scrollTo(0,a||0)}},n.render=function(){return this.props.children},e}(s.Component),h=function(t){return s.createElement(p.Location,null,(function(e){var n=e.location;return s.createElement(l.ScrollContext.Consumer,null,(function(e){return s.createElement(f,(0,a.default)({},t,{context:e,location:n}))}))}))};e.ScrollContainer=h,h.propTypes=d},lw3w:function(t,e,n){var r;t.exports=(r=n("rzlk"))&&r.default||r},npZl:function(t,e,n){"use strict";var r=n("TqRt");n("Wbzz"),r(n("9hXx"))},nqlD:function(t,e,n){const{createContext:r}=n("q1tI");t.exports=r,t.exports.default=r},nwwn:function(t,e,n){"use strict";e.DEFAULT_OPTIONS={maxWidth:650,wrapperStyle:"",backgroundColor:"white",linkImagesToOriginal:!0,showCaptions:!1,markdownCaptions:!1,withWebp:!1,withAvif:!1,tracedSVG:!1,loading:"lazy",disableBgImageOnAlpha:!1,disableBgImage:!1},e.EMPTY_ALT="GATSBY_EMPTY_ALT",e.imageClass="gatsby-resp-image-image",e.imageWrapperClass="gatsby-resp-image-wrapper",e.imageBackgroundClass="gatsby-resp-image-background-image"},pVnL:function(t,e){function n(){return t.exports=n=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let{location:e}=t;const n=a.default.loadPageSync(e.pathname);return n?o.a.createElement(i.a,{location:e,pageResources:n,...n.json}):null}},xtsi:function(t,e,n){const r=n("LeKB"),{getResourcesForPathname:o,getResourcesForPathnameSync:a,getResourceURLsForPathname:i,loadPage:s,loadPageSync:c}=n("emEt").publicLoader;e.apiRunner=function(t,e,n,u){void 0===e&&(e={});let l=r.map(n=>{if(!n.plugin[t])return;e.getResourcesForPathnameSync=a,e.getResourcesForPathname=o,e.getResourceURLsForPathname=i,e.loadPage=s,e.loadPageSync=c;const r=n.plugin[t](e,n.options);return r&&u&&(e=u({args:e,result:r,plugin:n})),r});return l=l.filter(t=>void 0!==t),l.length>0?l:n?[n]:[]},e.apiRunnerAsync=(t,e,n)=>r.reduce((n,r)=>r.plugin[t]?n.then(()=>r.plugin[t](e,r.options)):n,Promise.resolve())}},[["UxWs",1,8]]]); +//# sourceMappingURL=app-6a665d0d1f5bf65820ca.js.map \ No newline at end of file diff --git a/app-293e545d1846e72cd1dd.js.LICENSE.txt b/app-6a665d0d1f5bf65820ca.js.LICENSE.txt similarity index 100% rename from app-293e545d1846e72cd1dd.js.LICENSE.txt rename to app-6a665d0d1f5bf65820ca.js.LICENSE.txt diff --git a/app-3488d54c30c10bf56ca6.js.map b/app-6a665d0d1f5bf65820ca.js.map similarity index 99% rename from app-3488d54c30c10bf56ca6.js.map rename to app-6a665d0d1f5bf65820ca.js.map index 74c73bd..ba92a64 100644 --- a/app-3488d54c30c10bf56ca6.js.map +++ b/app-6a665d0d1f5bf65820ca.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./node_modules/gatsby-link/index.js","webpack:///./node_modules/gatsby-react-router-scroll/session-storage.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireWildcard.js","webpack:///./.cache/normalize-page-path.js","webpack:///./.cache/find-path.js","webpack:///./node_modules/gatsby-react-router-scroll/use-scroll-restoration.js","webpack:///./.cache/emitter.js","webpack:///./node_modules/mitt/dist/mitt.es.js","webpack:///./node_modules/gatsby-react-router-scroll/index.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./.cache/react-lifecycles-compat.js","webpack:///./node_modules/@reach/router/es/lib/history.js","webpack:///./node_modules/gatsby-plugin-manifest/get-manifest-pathname.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-handler.js","webpack:///./.cache/page-renderer.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/@reach/router/es/lib/utils.js","webpack:///./.cache/api-runner-browser-plugins.js","webpack:///./node_modules/@mikaelkristiansson/domready/ready.js","webpack:///./.cache/register-service-worker.js","webpack:///./.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js","webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./.cache/route-announcer-props.js","webpack:///./.cache/navigation.js","webpack:///./node_modules/shallow-compare/es/index.js","webpack:///./.cache/ensure-resources.js","webpack:///./.cache/production-app.js","webpack:///./node_modules/@babel/runtime/helpers/inheritsLoose.js","webpack:///./.cache/gatsby-browser-entry.js","webpack:///./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js","webpack:///./node_modules/@reach/router/es/index.js","webpack:///./node_modules/@babel/runtime/helpers/typeof.js","webpack:///./.cache/strip-prefix.js","webpack:///./node_modules/gatsby-link/parse-path.js","webpack:///./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///./.cache/prefetch.js","webpack:///./.cache/loader.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-container.js","webpack:///./.cache/public-page-renderer.js","webpack:///./node_modules/gatsby-plugin-manifest/gatsby-browser.js","webpack:///./.cache/create-react-context.js","webpack:///./node_modules/gatsby-remark-images/constants.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/gatsby-plugin-google-analytics/gatsby-browser.js","webpack:///./node_modules/gatsby-remark-images/gatsby-browser.js","webpack:///./.cache/public-page-renderer-prod.js","webpack:///./.cache/api-runner-browser.js"],"names":["_interopRequireDefault","exports","__esModule","withPrefix","withAssetPrefix","path","getGlobalPathPrefix","navigateTo","replace","push","navigate","default","_objectWithoutPropertiesLoose2","_assertThisInitialized2","_inheritsLoose2","_extends2","_propTypes","_react","_router","_utils","_parsePath","parsePath","isAbsolutePath","startsWith","prefix","_ref","_prefix","getGlobalBasePrefix","isLocalLink","base","endsWith","slice","rewriteLinkPath","relativeTo","current","resolve","absolutify","NavLinkPropTypes","activeClassName","string","activeStyle","object","partiallyActive","bool","GatsbyLinkLocationWrapper","props","createElement","Location","_ref2","location","GatsbyLink","_location","_React$Component","_this","call","this","defaultGetProps","_ref3","isPartiallyCurrent","isCurrent","className","filter","Boolean","join","style","IOSupported","window","IntersectionObserver","state","handleRef","bind","_proto","prototype","_prefetch","currentPath","pathname","rewrittenPath","to","newPathName","___loader","enqueue","componentDidUpdate","prevProps","prevState","componentDidMount","componentWillUnmount","io","_this$io","instance","el","unobserve","disconnect","ref","cb","_this2","innerRef","hasOwnProperty","entries","forEach","entry","target","isIntersecting","intersectionRatio","observe","render","_this3","_this$props","_this$props$getProps","getProps","_onClick","onClick","_onMouseEnter","onMouseEnter","rest","prefixedTo","Link","e","hovering","button","defaultPrevented","metaKey","altKey","ctrlKey","shiftKey","preventDefault","shouldReplace","encodeURI","___navigate","href","Component","propTypes","func","isRequired","showDeprecationWarning","functionName","altFunctionName","version","console","warn","_default","forwardRef","options","___push","___replace","SessionStorage","read","key","stateKey","getStateKey","value","sessionStorage","getItem","JSON","parse","save","storedValue","stringify","setItem","stateKeyBase","_typeof","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","module","obj","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","desc","set","undefined","charAt","length","pathCache","Map","matchPaths","trimPathname","rawPathname","decodeURIComponent","stripPrefix","__BASE_PATH__","split","URL","setMatchPaths","findMatchPath","trimmedPathname","cleanPath","pickPaths","map","matchPath","originalPath","pick","normalizePagePath","route","grabMatchParams","params","findPath","foundPath","useScrollRestoration","identifier","useLocation","useContext","_scrollHandler","ScrollContext","useRef","useLayoutEffect","position","scrollTo","onScroll","scrollTop","emitter","all","create","on","type","handler","off","splice","indexOf","emit","evt","mitt","ScrollContainer","ScrollHandler","_scrollContainer","_useScrollRestoration","source","excluded","i","sourceKeys","keys","polyfill","_extends","assign","arguments","getLocation","_source$location","search","hash","origin","protocol","host","hostname","port","canUseDOM","decodeURI","history","createHistory","listeners","transitioning","resolveTransition","_onTransitionComplete","listen","listener","popstateListener","action","addEventListener","removeEventListener","fn","_ref$replace","go","Date","now","replaceState","pushState","transition","Promise","res","createMemorySource","initialPath","searchIndex","initialLocation","substr","index","stack","states","name","_","uri","_uri$split","_uri$split$","_uri$split2","_uri$split2$","newIndex","document","globalHistory","localizedManifests","Array","isArray","localizedManifest","find","app","start_url","lang","_interopRequireWildcard","React","_sessionStorage","createContext","displayName","_len","args","_key","apply","concat","_stateStorage","scrollListener","scrollY","windowScroll","shouldUpdateScroll","scrollToHash","node","getElementById","substring","scrollIntoView","prevRouterProps","routerProps","scrollPosition","_this$props$location","_this$props$location2","Provider","children","element","PageRenderer","_inheritsLoose","pageResources","json","pageContext","__params","pathContext","replacementElement","apiRunner","loader","publicLoader","pageElement","component","page","result","pop","_arrayLikeToArray","arr","len","arr2","_toConsumableArray","iter","Symbol","iterator","from","o","minLen","n","toString","constructor","test","TypeError","routes","match","default_","uriPathname","uriSegments","segmentize","isRootUri","ranked","rankRoutes","l","missed","routeSegments","max","Math","routeSegment","uriSegment","isSplat","dynamicMatch","paramRe","exec","reservedNames","_to$split","toPathname","toQuery","basePathname","toSegments","baseSegments","addQuery","allSegments","segments","segment","insertParams","_path$split","pathBase","_path$split$","query","constructedPath","_params$location","_params$location$sear","searchSplit","validateRedirect","isDynamic","sort","rankRoute","score","reduce","isRootSegment","SEGMENT_POINTS","a","b","q","shallowCompare","obj1","obj2","obj1Keys","every","plugin","require","ie10","navigator","appVersion","fns","doc","hack","documentElement","doScroll","loaded","readyState","shift","setTimeout","definition","error","serviceWorker","register","then","reg","installingWorker","installing","log","controller","___swUpdated","___failedResources","reload","catch","components","component---src-pages-404-js","component---src-pages-index-js","component---src-templates-blog-post-js","self","ReferenceError","condition","format","c","d","f","Error","argIndex","framesToPop","_setPrototypeOf","p","setPrototypeOf","__proto__","RouteAnnouncerProps","id","top","width","height","padding","overflow","clip","whiteSpace","border","redirectMap","redirectIgnoreCaseMap","maybeRedirect","redirect","toLowerCase","toPath","redirects","ignoreCase","fromPath","onPreRouteUpdate","prevLocation","onRouteUpdate","timeoutId","loadPage","status","PageResourceStatus","clearTimeout","webpackCompilationHash","___webpackCompilationHash","postMessage","gatsbyApi","reachNavigate","results","getSavedScrollPosition","oldPathname","RouteAnnouncer","announcementRef","createRef","nextProps","requestAnimationFrame","pageName","title","pageHeadings","querySelectorAll","textContent","newAnnouncement","innerText","compareLocationProps","nextLocation","_prevLocation$state","_nextLocation$state","RouteUpdates","_React$Component2","_proto2","shouldComponentUpdate","Fragment","shallowDiffers","_i","EnsureResources","loadPageSync","getDerivedStateFromProps","loadResources","rawPath","setState","nextState","ProdLoader","asyncRequires","setLoader","setApiRunner","___emitter","apiRunnerAsync","RouteHandler","BaseContext","baseuri","basepath","DataContext","GatsbyRoot","staticQueryResults","getStaticQueryResults","StaticQueryContext","LocationHandler","Consumer","Router","pagePath","browserLoc","SiteRoot","_ref4","App","renderer","ReactDOM","hydrate","domReady","subClass","superClass","prefetchPathname","StaticQueryDataRenderer","staticQueryData","data","finalData","StaticQuery","useStaticQuery","_context$query","context","isNaN","Number","graphql","_objectWithoutProperties","_classCallCheck","Constructor","_possibleConstructorReturn","_inherits","enumerable","writable","configurable","createNamedContext","defaultValue","Ctx","LocationContext","LocationProvider","_temp","getContext","refs","unlisten","_props$history","componentDidCatch","info","isRedirect","_navigate","unmounted","defaultProps","ServerLocation","url","baseContext","locationContext","RouterImpl","_React$PureComponent","_props","_navigate2","primary","_props$component","domProps","Children","toArray","array","child","createRoute","clone","cloneElement","FocusWrapper","FocusHandler","wrapperProps","PureComponent","FocusContext","requestFocus","FocusHandlerImpl","initialRender","focusHandlerCount","_temp2","_this4","_len2","_key2","shouldFocus","focus","myURIChanged","navigatedUpToMe","contains","activeElement","_this5","_props2","_props2$component","Comp","outline","tabIndex","k","C","_ref5","_ref6","_props$getProps","anchorProps","encodedHref","event","shouldNavigate","_location$state","restState","RedirectRequest","redirectTo","RedirectImpl","_React$Component3","_props3","_props3$replace","noThrow","resolvedTo","_props4","Redirect","_ref7","Match","_ref8","_ref9","_ref10","resolvedPath","useNavigate","useParams","useMatch","stripSlashes","str","elementPath","hashIndex","supportedPrefetchStrategy","feature","fakeLink","relList","supports","err","support","reject","link","setAttribute","onload","onerror","getElementsByTagName","getElementsByName","parentNode","appendChild","req","XMLHttpRequest","open","send","preFetched","prefetch","Success","preferDefault","m","createPageDataUrl","s","doFetch","method","onreadystatechange","toPageResources","pageData","componentChunkName","staticQueryHashes","BaseLoader","loadComponent","inFlightNetworkRequests","pageDb","inFlightDb","staticQueryDb","pageDataDb","prefetchTriggered","Set","prefetchCompleted","memoizedGet","inFlightPromise","response","delete","prefetchDisabled","some","fetchPageDataJson","loadObj","retries","responseText","jsonPayload","payload","notFound","loadPageDataJson","loadAppData","allData","finalResult","componentChunkPromise","createdAt","staticQueryBatchPromise","staticQueryHash","staticQueryResultsMap","shouldPrefetch","doesConnectionSupportPrefetch","connection","effectiveType","includes","saveData","add","realPath","doPrefetch","pageDataUrl","prefetchHelper","crossOrigin","as","getResourceURLsForPathname","createComponentUrls","isPageNotFound","appData","___chunkMapping","chunk","__PATH_PREFIX__","_BaseLoader","chunkName","componentUrls","_loader","getResourcesForPathname","getResourcesForPathnameSync","_reactDom","scrollKey","ScrollContainerImplementation","findDOMNode","DEFAULT_OPTIONS","maxWidth","wrapperStyle","backgroundColor","linkImagesToOriginal","showCaptions","markdownCaptions","withWebp","withAvif","tracedSVG","loading","disableBgImageOnAlpha","disableBgImage","EMPTY_ALT","imageClass","imageWrapperClass","imageBackgroundClass","pluginOptions","ga","excludeGAPaths","rx","delay","pageTransitionDelay","_require","apiCallbackContext","imageWrappers","_loop","imageWrapper","backgroundElement","querySelector","imageElement","onImageLoad","onImageComplete","opacity","color","boxShadow","complete","ProdPageRenderer","InternalPageRenderer","plugins","api","defaultReturn","argTransform","previous","next"],"mappings":";6FAEA,IAAIA,EAAyB,EAAQ,QAErCC,EAAQC,YAAa,EACrBD,EAAQE,WAAaA,EACrBF,EAAQG,gBA4DR,SAAyBC,GACvB,OAAOF,EAAWE,EAAMC,MA5D1BL,EAAQM,WAAaN,EAAQO,QAAUP,EAAQQ,KAAOR,EAAQS,SAAWT,EAAQU,aAAU,EAE3F,IAAIC,EAAiCZ,EAAuB,EAAQ,SAEhEa,EAA0Bb,EAAuB,EAAQ,SAEzDc,EAAkBd,EAAuB,EAAQ,SAEjDe,EAAYf,EAAuB,EAAQ,SAE3CgB,EAAahB,EAAuB,EAAQ,SAE5CiB,EAASjB,EAAuB,EAAQ,SAExCkB,EAAU,EAAQ,QAElBC,EAAS,EAAQ,QAEjBC,EAAa,EAAQ,QAEzBnB,EAAQoB,UAAYD,EAAWC,UAE/B,IAAI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,EACF,CAACA,GAED,IAIXtyB,EAAQohB,eAAiB,CAACiR,EAAKnf,EAAMof,IACnCF,EAAQ/Y,OACN,CAACmZ,EAAUC,IACTA,EAAKzY,OAAOqY,GACRG,EAAStX,KAAK,IAAMuX,EAAKzY,OAAOqY,GAAKnf,EAAMuf,EAAK7pB,UAChD4pB,EACNxhB,QAAQ9O,a","file":"app-3488d54c30c10bf56ca6.js","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.withPrefix = withPrefix;\nexports.withAssetPrefix = withAssetPrefix;\nexports.navigateTo = exports.replace = exports.push = exports.navigate = exports.default = void 0;\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _router = require(\"@reach/router\");\n\nvar _utils = require(\"@reach/router/lib/utils\");\n\nvar _parsePath = require(\"./parse-path\");\n\nexports.parsePath = _parsePath.parsePath;\n\nvar isAbsolutePath = function isAbsolutePath(path) {\n return path === null || path === void 0 ? void 0 : path.startsWith(\"/\");\n};\n\nfunction withPrefix(path, prefix) {\n var _ref, _prefix;\n\n if (prefix === void 0) {\n prefix = getGlobalBasePrefix();\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n if (path.startsWith(\"./\") || path.startsWith(\"../\")) {\n return path;\n }\n\n var base = (_ref = (_prefix = prefix) !== null && _prefix !== void 0 ? _prefix : getGlobalPathPrefix()) !== null && _ref !== void 0 ? _ref : \"/\";\n return \"\" + ((base === null || base === void 0 ? void 0 : base.endsWith(\"/\")) ? base.slice(0, -1) : base) + (path.startsWith(\"/\") ? path : \"/\" + path);\n} // These global values are wrapped in typeof clauses to ensure the values exist.\n// This is especially problematic in unit testing of this component.\n\n\nvar getGlobalPathPrefix = function getGlobalPathPrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __PATH_PREFIX__ !== \"undefined\" ? __PATH_PREFIX__ : undefined : __PATH_PREFIX__;\n};\n\nvar getGlobalBasePrefix = function getGlobalBasePrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __BASE_PATH__ !== \"undefined\" ? __BASE_PATH__ : undefined : __BASE_PATH__;\n};\n\nvar isLocalLink = function isLocalLink(path) {\n return path && !path.startsWith(\"http://\") && !path.startsWith(\"https://\") && !path.startsWith(\"//\");\n};\n\nfunction withAssetPrefix(path) {\n return withPrefix(path, getGlobalPathPrefix());\n}\n\nfunction absolutify(path, current) {\n // If it's already absolute, return as-is\n if (isAbsolutePath(path)) {\n return path;\n }\n\n return (0, _utils.resolve)(path, current);\n}\n\nvar rewriteLinkPath = function rewriteLinkPath(path, relativeTo) {\n if (typeof path === \"number\") {\n return path;\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n return isAbsolutePath(path) ? withPrefix(path) : absolutify(path, relativeTo);\n};\n\nvar NavLinkPropTypes = {\n activeClassName: _propTypes.default.string,\n activeStyle: _propTypes.default.object,\n partiallyActive: _propTypes.default.bool\n}; // Set up IntersectionObserver\n\nvar createIntersectionObserver = function createIntersectionObserver(el, cb) {\n var io = new window.IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n if (el === entry.target) {\n // Check if element is within viewport, remove listener, destroy observer, and run link callback.\n // MSEdge doesn't currently support isIntersecting, so also test for an intersectionRatio > 0\n if (entry.isIntersecting || entry.intersectionRatio > 0) {\n io.unobserve(el);\n io.disconnect();\n cb();\n }\n }\n });\n }); // Add element to the observer\n\n io.observe(el);\n return {\n instance: io,\n el: el\n };\n};\n\nfunction GatsbyLinkLocationWrapper(props) {\n return /*#__PURE__*/_react.default.createElement(_router.Location, null, function (_ref2) {\n var location = _ref2.location;\n return /*#__PURE__*/_react.default.createElement(GatsbyLink, (0, _extends2.default)({}, props, {\n _location: location\n }));\n });\n}\n\nvar GatsbyLink = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(GatsbyLink, _React$Component);\n\n function GatsbyLink(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // Default to no support for IntersectionObserver\n\n _this.defaultGetProps = function (_ref3) {\n var isPartiallyCurrent = _ref3.isPartiallyCurrent,\n isCurrent = _ref3.isCurrent;\n\n if (_this.props.partiallyActive ? isPartiallyCurrent : isCurrent) {\n return {\n className: [_this.props.className, _this.props.activeClassName].filter(Boolean).join(\" \"),\n style: (0, _extends2.default)({}, _this.props.style, _this.props.activeStyle)\n };\n }\n\n return null;\n };\n\n var IOSupported = false;\n\n if (typeof window !== \"undefined\" && window.IntersectionObserver) {\n IOSupported = true;\n }\n\n _this.state = {\n IOSupported: IOSupported\n };\n _this.handleRef = _this.handleRef.bind((0, _assertThisInitialized2.default)(_this));\n return _this;\n }\n\n var _proto = GatsbyLink.prototype;\n\n _proto._prefetch = function _prefetch() {\n var currentPath = window.location.pathname; // reach router should have the correct state\n\n if (this.props._location && this.props._location.pathname) {\n currentPath = this.props._location.pathname;\n }\n\n var rewrittenPath = rewriteLinkPath(this.props.to, currentPath);\n var newPathName = (0, _parsePath.parsePath)(rewrittenPath).pathname; // Prefech is used to speed up next navigations. When you use it on the current navigation,\n // there could be a race-condition where Chrome uses the stale data instead of waiting for the network to complete\n\n if (currentPath !== newPathName) {\n ___loader.enqueue(newPathName);\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Preserve non IO functionality if no support\n if (this.props.to !== prevProps.to && !this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n // Preserve non IO functionality if no support\n if (!this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (!this.io) {\n return;\n }\n\n var _this$io = this.io,\n instance = _this$io.instance,\n el = _this$io.el;\n instance.unobserve(el);\n instance.disconnect();\n };\n\n _proto.handleRef = function handleRef(ref) {\n var _this2 = this;\n\n if (this.props.innerRef && this.props.innerRef.hasOwnProperty(\"current\")) {\n this.props.innerRef.current = ref;\n } else if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n if (this.state.IOSupported && ref) {\n // If IO supported and element reference found, setup Observer functionality\n this.io = createIntersectionObserver(ref, function () {\n _this2._prefetch();\n });\n }\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var _this$props = this.props,\n to = _this$props.to,\n _this$props$getProps = _this$props.getProps,\n getProps = _this$props$getProps === void 0 ? this.defaultGetProps : _this$props$getProps,\n _onClick = _this$props.onClick,\n _onMouseEnter = _this$props.onMouseEnter,\n $activeClassName = _this$props.activeClassName,\n $activeStyle = _this$props.activeStyle,\n $innerRef = _this$props.innerRef,\n partiallyActive = _this$props.partiallyActive,\n state = _this$props.state,\n replace = _this$props.replace,\n _location = _this$props._location,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"to\", \"getProps\", \"onClick\", \"onMouseEnter\", \"activeClassName\", \"activeStyle\", \"innerRef\", \"partiallyActive\", \"state\", \"replace\", \"_location\"]);\n\n if (process.env.NODE_ENV !== \"production\" && !isLocalLink(to)) {\n console.warn(\"External link \" + to + \" was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links\");\n }\n\n var prefixedTo = rewriteLinkPath(to, _location.pathname);\n\n if (!isLocalLink(prefixedTo)) {\n return /*#__PURE__*/_react.default.createElement(\"a\", (0, _extends2.default)({\n href: prefixedTo\n }, rest));\n }\n\n return /*#__PURE__*/_react.default.createElement(_router.Link, (0, _extends2.default)({\n to: prefixedTo,\n state: state,\n getProps: getProps,\n innerRef: this.handleRef,\n onMouseEnter: function onMouseEnter(e) {\n if (_onMouseEnter) {\n _onMouseEnter(e);\n }\n\n ___loader.hovering((0, _parsePath.parsePath)(prefixedTo).pathname);\n },\n onClick: function onClick(e) {\n if (_onClick) {\n _onClick(e);\n }\n\n if (e.button === 0 && // ignore right clicks\n !_this3.props.target && // let browser handle \"target=_blank\"\n !e.defaultPrevented && // onClick prevented default\n !e.metaKey && // ignore clicks with modifier keys...\n !e.altKey && !e.ctrlKey && !e.shiftKey) {\n e.preventDefault();\n var shouldReplace = replace;\n\n var isCurrent = encodeURI(prefixedTo) === _location.pathname;\n\n if (typeof replace !== \"boolean\" && isCurrent) {\n shouldReplace = true;\n } // Make sure the necessary scripts and data are\n // loaded before continuing.\n\n\n window.___navigate(prefixedTo, {\n state: state,\n replace: shouldReplace\n });\n }\n\n return true;\n }\n }, rest));\n };\n\n return GatsbyLink;\n}(_react.default.Component);\n\nGatsbyLink.propTypes = (0, _extends2.default)({}, NavLinkPropTypes, {\n onClick: _propTypes.default.func,\n to: _propTypes.default.string.isRequired,\n replace: _propTypes.default.bool,\n state: _propTypes.default.object\n});\n\nvar showDeprecationWarning = function showDeprecationWarning(functionName, altFunctionName, version) {\n return console.warn(\"The \\\"\" + functionName + \"\\\" method is now deprecated and will be removed in Gatsby v\" + version + \". Please use \\\"\" + altFunctionName + \"\\\" instead.\");\n};\n\nvar _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n return /*#__PURE__*/_react.default.createElement(GatsbyLinkLocationWrapper, (0, _extends2.default)({\n innerRef: ref\n }, props));\n});\n\nexports.default = _default;\n\nvar navigate = function navigate(to, options) {\n window.___navigate(rewriteLinkPath(to, window.location.pathname), options);\n};\n\nexports.navigate = navigate;\n\nvar push = function push(to) {\n showDeprecationWarning(\"push\", \"navigate\", 3);\n\n window.___push(rewriteLinkPath(to, window.location.pathname));\n};\n\nexports.push = push;\n\nvar replace = function replace(to) {\n showDeprecationWarning(\"replace\", \"navigate\", 3);\n\n window.___replace(rewriteLinkPath(to, window.location.pathname));\n}; // TODO: Remove navigateTo for Gatsby v3\n\n\nexports.replace = replace;\n\nvar navigateTo = function navigateTo(to) {\n showDeprecationWarning(\"navigateTo\", \"navigate\", 3);\n return push(to);\n};\n\nexports.navigateTo = navigateTo;","\"use strict\";\n\nexports.__esModule = true;\nexports.SessionStorage = void 0;\nvar STATE_KEY_PREFIX = \"@@scroll|\";\nvar GATSBY_ROUTER_SCROLL_STATE = \"___GATSBY_REACT_ROUTER_SCROLL\";\n\nvar SessionStorage = /*#__PURE__*/function () {\n function SessionStorage() {}\n\n var _proto = SessionStorage.prototype;\n\n _proto.read = function read(location, key) {\n var stateKey = this.getStateKey(location, key);\n\n try {\n var value = window.sessionStorage.getItem(stateKey);\n return value ? JSON.parse(value) : 0;\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to access sessionStorage; sessionStorage is not available.\");\n }\n\n if (window && window[GATSBY_ROUTER_SCROLL_STATE] && window[GATSBY_ROUTER_SCROLL_STATE][stateKey]) {\n return window[GATSBY_ROUTER_SCROLL_STATE][stateKey];\n }\n\n return 0;\n }\n };\n\n _proto.save = function save(location, key, value) {\n var stateKey = this.getStateKey(location, key);\n var storedValue = JSON.stringify(value);\n\n try {\n window.sessionStorage.setItem(stateKey, storedValue);\n } catch (e) {\n if (window && window[GATSBY_ROUTER_SCROLL_STATE]) {\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n } else {\n window[GATSBY_ROUTER_SCROLL_STATE] = {};\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to save state in sessionStorage; sessionStorage is not available.\");\n }\n }\n };\n\n _proto.getStateKey = function getStateKey(location, key) {\n var stateKeyBase = \"\" + STATE_KEY_PREFIX + location.pathname;\n return key === null || typeof key === \"undefined\" ? stateKeyBase : stateKeyBase + \"|\" + key;\n };\n\n return SessionStorage;\n}();\n\nexports.SessionStorage = SessionStorage;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n var cache = _getRequireWildcardCache(nodeInterop);\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj[\"default\"] = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nmodule.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default path => {\n if (path === undefined) {\n return path\n }\n if (path === `/`) {\n return `/`\n }\n if (path.charAt(path.length - 1) === `/`) {\n return path.slice(0, -1)\n }\n return path\n}\n","import { pick } from \"@reach/router/lib/utils\"\nimport stripPrefix from \"./strip-prefix\"\nimport normalizePagePath from \"./normalize-page-path\"\n\nconst pathCache = new Map()\nlet matchPaths = []\n\nconst trimPathname = rawPathname => {\n const pathname = decodeURIComponent(rawPathname)\n // Remove the pathPrefix from the pathname.\n const trimmedPathname = stripPrefix(pathname, __BASE_PATH__)\n // Remove any hashfragment\n .split(`#`)[0]\n // Remove search query\n .split(`?`)[0]\n\n return trimmedPathname\n}\n\nfunction absolutify(path) {\n // If it's already absolute, return as-is\n if (\n path.startsWith(`/`) ||\n path.startsWith(`https://`) ||\n path.startsWith(`http://`)\n ) {\n return path\n }\n // Calculate path relative to current location, adding a trailing slash to\n // match behavior of @reach/router\n return new URL(\n path,\n window.location.href + (window.location.href.endsWith(`/`) ? `` : `/`)\n ).pathname\n}\n\n/**\n * Set list of matchPaths\n *\n * @param {Array<{path: string, matchPath: string}>} value collection of matchPaths\n */\nexport const setMatchPaths = value => {\n matchPaths = value\n}\n\n/**\n * Return a matchpath url\n * if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n * `/foo?bar=far` => `/page1`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string|null}\n */\nexport const findMatchPath = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return normalizePagePath(path.route.originalPath)\n }\n\n return null\n}\n\n/**\n * Return a matchpath params from reach/router rules\n * if `match-paths.json` contains `{ \":bar/*foo\" }`, and the path is /baz/zaz/zoo\n * then it returns\n * { bar: baz, foo: zaz/zoo }\n *\n * @param {string} rawPathname A raw pathname\n * @return {object}\n */\nexport const grabMatchParams = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return path.params\n }\n\n return {}\n}\n\n// Given a raw URL path, returns the cleaned version of it (trim off\n// `#` and query params), or if it matches an entry in\n// `match-paths.json`, its matched path is returned\n//\n// E.g. `/foo?bar=far` => `/foo`\n//\n// Or if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n// `/foo?bar=far` => `/page1`\nexport const findPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n if (pathCache.has(trimmedPathname)) {\n return pathCache.get(trimmedPathname)\n }\n\n let foundPath = findMatchPath(trimmedPathname)\n\n if (!foundPath) {\n foundPath = cleanPath(rawPathname)\n }\n\n pathCache.set(trimmedPathname, foundPath)\n\n return foundPath\n}\n\n/**\n * Clean a url and converts /index.html => /\n * E.g. `/foo?bar=far` => `/foo`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string}\n */\nexport const cleanPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n\n let foundPath = trimmedPathname\n if (foundPath === `/index.html`) {\n foundPath = `/`\n }\n\n foundPath = normalizePagePath(foundPath)\n\n return foundPath\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = useScrollRestoration;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _react = require(\"react\");\n\nvar _router = require(\"@reach/router\");\n\nfunction useScrollRestoration(identifier) {\n var location = (0, _router.useLocation)();\n var state = (0, _react.useContext)(_scrollHandler.ScrollContext);\n var ref = (0, _react.useRef)();\n (0, _react.useLayoutEffect)(function () {\n if (ref.current) {\n var position = state.read(location, identifier);\n ref.current.scrollTo(0, position || 0);\n }\n }, []);\n return {\n ref: ref,\n onScroll: function onScroll() {\n if (ref.current) {\n state.save(location, identifier, ref.current.scrollTop);\n }\n }\n };\n}","import mitt from \"mitt\"\n\nconst emitter = mitt()\nexport default emitter\n","// \n// An event handler can take an optional event argument\n// and should not return a value\n \n \n\n// An array of all currently registered event handlers for a type\n \n \n// A map of event types and their corresponding event handlers.\n \n \n \n \n\n/** Mitt: Tiny (~200b) functional event emitter / pubsub.\n * @name mitt\n * @returns {Mitt}\n */\nfunction mitt(all ) {\n\tall = all || Object.create(null);\n\n\treturn {\n\t\t/**\n\t\t * Register an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to listen for, or `\"*\"` for all events\n\t\t * @param {Function} handler Function to call in response to given event\n\t\t * @memberOf mitt\n\t\t */\n\t\ton: function on(type , handler ) {\n\t\t\t(all[type] || (all[type] = [])).push(handler);\n\t\t},\n\n\t\t/**\n\t\t * Remove an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to unregister `handler` from, or `\"*\"`\n\t\t * @param {Function} handler Handler function to remove\n\t\t * @memberOf mitt\n\t\t */\n\t\toff: function off(type , handler ) {\n\t\t\tif (all[type]) {\n\t\t\t\tall[type].splice(all[type].indexOf(handler) >>> 0, 1);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Invoke all handlers for the given type.\n\t\t * If present, `\"*\"` handlers are invoked after type-matched handlers.\n\t\t *\n\t\t * @param {String} type The event type to invoke\n\t\t * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler\n\t\t * @memberOf mitt\n\t\t */\n\t\temit: function emit(type , evt ) {\n\t\t\t(all[type] || []).slice().map(function (handler) { handler(evt); });\n\t\t\t(all['*'] || []).slice().map(function (handler) { handler(type, evt); });\n\t\t}\n\t};\n}\n\nexport default mitt;\n//# sourceMappingURL=mitt.es.js.map\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = exports.ScrollContainer = exports.ScrollContext = void 0;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nexports.ScrollContext = _scrollHandler.ScrollHandler;\n\nvar _scrollContainer = require(\"./scroll-container\");\n\nexports.ScrollContainer = _scrollContainer.ScrollContainer;\n\nvar _useScrollRestoration = require(\"./use-scroll-restoration\");\n\nexports.useScrollRestoration = _useScrollRestoration.useScrollRestoration;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","exports.polyfill = Component => Component\n","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n\n\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\n\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n var resolveTransition = function resolveTransition() {};\n\n return {\n get location() {\n return location;\n },\n\n get transitioning() {\n return transitioning;\n },\n\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({ location: location, action: \"POP\" });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, { key: Date.now() + \"\" });\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({ location: location, action: \"PUSH\" });\n });\n return transition;\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n\n return {\n get location() {\n return stack[index];\n },\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n\n index++;\n stack.push({ pathname: pathname, search: search.length ? \"?\" + search : search });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n\n stack[index] = { pathname: pathname, search: search };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n\n index = newIndex;\n }\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\n\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate;\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport { globalHistory, navigate, createHistory, createMemorySource };","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @return string\n */\nvar _default = function _default(pathname, localizedManifests) {\n var defaultFilename = \"manifest.webmanifest\";\n\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n\n var localizedManifest = localizedManifests.find(function (app) {\n return pathname.startsWith(app.start_url);\n });\n\n if (!localizedManifest) {\n return defaultFilename;\n }\n\n return \"manifest_\" + localizedManifest.lang + \".webmanifest\";\n};\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollHandler = exports.ScrollContext = void 0;\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _sessionStorage = require(\"./session-storage\");\n\nvar ScrollContext = /*#__PURE__*/React.createContext(new _sessionStorage.SessionStorage());\nexports.ScrollContext = ScrollContext;\nScrollContext.displayName = \"GatsbyScrollContext\";\n\nvar ScrollHandler = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollHandler, _React$Component);\n\n function ScrollHandler() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this._stateStorage = new _sessionStorage.SessionStorage();\n\n _this.scrollListener = function () {\n var key = _this.props.location.key;\n\n if (key) {\n _this._stateStorage.save(_this.props.location, key, window.scrollY);\n }\n };\n\n _this.windowScroll = function (position, prevProps) {\n if (_this.shouldUpdateScroll(prevProps, _this.props)) {\n window.scrollTo(0, position);\n }\n };\n\n _this.scrollToHash = function (hash, prevProps) {\n var node = document.getElementById(hash.substring(1));\n\n if (node && _this.shouldUpdateScroll(prevProps, _this.props)) {\n node.scrollIntoView();\n }\n };\n\n _this.shouldUpdateScroll = function (prevRouterProps, routerProps) {\n var shouldUpdateScroll = _this.props.shouldUpdateScroll;\n\n if (!shouldUpdateScroll) {\n return true;\n } // Hack to allow accessing this._stateStorage.\n\n\n return shouldUpdateScroll.call((0, _assertThisInitialized2.default)(_this), prevRouterProps, routerProps);\n };\n\n return _this;\n }\n\n var _proto = ScrollHandler.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n window.addEventListener(\"scroll\", this.scrollListener);\n var scrollPosition;\n var _this$props$location = this.props.location,\n key = _this$props$location.key,\n hash = _this$props$location.hash;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n\n if (scrollPosition) {\n this.windowScroll(scrollPosition, undefined);\n } else if (hash) {\n this.scrollToHash(decodeURI(hash), undefined);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.scrollListener);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props$location2 = this.props.location,\n hash = _this$props$location2.hash,\n key = _this$props$location2.key;\n var scrollPosition;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n /** There are two pieces of state: the browser url and\n * history state which keeps track of scroll position\n * Native behaviour prescribes that we ought to restore scroll position\n * when a user navigates back in their browser (this is the `POP` action)\n * Currently, reach router has a bug that prevents this at https://github.com/reach/router/issues/228\n * So we _always_ stick to the url as a source of truth — if the url\n * contains a hash, we scroll to it\n */\n\n\n if (hash) {\n this.scrollToHash(decodeURI(hash), prevProps);\n } else {\n this.windowScroll(scrollPosition, prevProps);\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(ScrollContext.Provider, {\n value: this._stateStorage\n }, this.props.children);\n };\n\n return ScrollHandler;\n}(React.Component);\n\nexports.ScrollHandler = ScrollHandler;\nScrollHandler.propTypes = {\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired,\n location: _propTypes.default.object.isRequired\n};","import React, { createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { publicLoader } from \"./loader\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\n\n// Renders page\nclass PageRenderer extends React.Component {\n render() {\n const props = {\n ...this.props,\n params: {\n ...grabMatchParams(this.props.location.pathname),\n ...this.props.pageResources.json.pageContext.__params,\n },\n pathContext: this.props.pageContext,\n }\n\n const [replacementElement] = apiRunner(`replaceComponentRenderer`, {\n props: this.props,\n loader: publicLoader,\n })\n\n const pageElement =\n replacementElement ||\n createElement(this.props.pageResources.component, {\n ...props,\n key: this.props.path || this.props.pageResources.page.path,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n { element: pageElement, props },\n pageElement,\n ({ result }) => {\n return { element: result, props }\n }\n ).pop()\n\n return wrappedPage\n }\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import invariant from \"invariant\";\n\n////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n var dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : invariant(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\nvar match = function match(path, uri) {\n return pick([{ path: path }], uri);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\n};\n\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar paramRe = /^:(.+)/;\n\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\n\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\n\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return { route: route, score: score, index: index };\n};\n\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\n\nvar segmentize = function segmentize(uri) {\n return uri\n // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\n\nvar addQuery = function addQuery(pathname) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\n};\n\nvar reservedNames = [\"uri\", \"path\"];\n\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n};\n\n////////////////////////////////////////////////////////////////////////////////\nexport { startsWith, pick, match, resolve, insertParams, validateRedirect, shallowCompare };","module.exports = [{\n plugin: require('../node_modules/gatsby-remark-images/gatsby-browser.js'),\n options: {\"plugins\":[],\"maxWidth\":590,\"linkImagesToOriginal\":true,\"showCaptions\":false,\"markdownCaptions\":false,\"sizeByPixelDensity\":false,\"backgroundColor\":\"white\",\"quality\":50,\"withWebp\":false,\"tracedSVG\":false,\"loading\":\"lazy\",\"disableBgImageOnAlpha\":false,\"disableBgImage\":false},\n },{\n plugin: require('../node_modules/gatsby-plugin-google-analytics/gatsby-browser.js'),\n options: {\"plugins\":[],\"head\":false,\"anonymize\":false,\"respectDNT\":false,\"exclude\":[],\"pageTransitionDelay\":0},\n },{\n plugin: require('../node_modules/gatsby-plugin-manifest/gatsby-browser.js'),\n options: {\"plugins\":[],\"name\":\"SmartBlock\",\"short_name\":\"SmartBlock\",\"start_url\":\"/\",\"background_color\":\"#ffffff\",\"theme_color\":\"#663399\",\"display\":\"minimal-ui\",\"icon\":\"static/favicon.png\",\"legacy\":true,\"theme_color_in_head\":true,\"cache_busting_mode\":\"query\",\"crossOrigin\":\"anonymous\",\"include_favicon\":true,\"cacheDigest\":\"084321a740e799687cc736487af34310\"},\n },{\n plugin: require('../gatsby-browser.js'),\n options: {\"plugins\":[]},\n }]\n","/*!\n * domready (c) Dustin Diaz 2014 - License MIT\n * ie10 fix - Mikael Kristiansson 2019\n */\n!(function(name, definition) {\n if (typeof module != \"undefined\") module.exports = definition();\n else if (typeof define == \"function\" && typeof define.amd == \"object\")\n define(definition);\n else this[name] = definition();\n})(\"domready\", function() {\n var ie10 = false;\n if (navigator.appVersion.indexOf(\"MSIE 10\") !== -1) {\n ie10 = true;\n }\n\n var fns = [],\n listener,\n doc = typeof document === \"object\" && document,\n hack = ie10\n ? doc.documentElement.doScroll(\"left\")\n : doc.documentElement.doScroll,\n domContentLoaded = \"DOMContentLoaded\",\n loaded =\n doc && (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);\n\n if (!loaded && doc)\n doc.addEventListener(\n domContentLoaded,\n (listener = function() {\n doc.removeEventListener(domContentLoaded, listener);\n loaded = 1;\n while ((listener = fns.shift())) listener();\n })\n );\n\n return function(fn) {\n loaded ? setTimeout(fn, 0) : fns.push(fn);\n };\n});\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","// prefer default export if available\nconst preferDefault = m => (m && m.default) || m\n\nexports.components = {\n \"component---src-pages-404-js\": () => import(\"./../../../src/pages/404.js\" /* webpackChunkName: \"component---src-pages-404-js\" */),\n \"component---src-pages-index-js\": () => import(\"./../../../src/pages/index.js\" /* webpackChunkName: \"component---src-pages-index-js\" */),\n \"component---src-templates-blog-post-js\": () => import(\"./../../../src/templates/blog-post.js\" /* webpackChunkName: \"component---src-templates-blog-post-js\" */)\n}\n\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport redirects from \"./redirects.json\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport { navigate as reachNavigate } from \"@reach/router\"\nimport { globalHistory } from \"@reach/router/lib/history\"\nimport { parsePath } from \"gatsby-link\"\n\n// Convert to a map for faster lookup in maybeRedirect()\n\nconst redirectMap = new Map()\nconst redirectIgnoreCaseMap = new Map()\n\nredirects.forEach(redirect => {\n if (redirect.ignoreCase) {\n redirectIgnoreCaseMap.set(redirect.fromPath, redirect)\n } else {\n redirectMap.set(redirect.fromPath, redirect)\n }\n})\n\nfunction maybeRedirect(pathname) {\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n\n if (redirect != null) {\n if (process.env.NODE_ENV !== `production`) {\n if (!loader.isPageNotFound(pathname)) {\n console.error(\n `The route \"${pathname}\" matches both a page and a redirect; this is probably not intentional.`\n )\n }\n }\n\n window.___replace(redirect.toPath)\n return true\n } else {\n return false\n }\n}\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_EXPERIMENTAL_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n let { pathname } = parsePath(to)\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath\n pathname = parsePath(to).pathname\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n\n // Check for initial page-load redirect\n maybeRedirect(window.location.pathname)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
    \n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onPreRouteUpdate(this.props.location, prevProps.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n \n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources: pageResources || loader.loadPageSync(location.pathname),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(location.pathname)\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (process.env.NODE_ENV !== `production` && !this.state.pageResources) {\n throw new Error(\n `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n )\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { Router, navigate, Location, BaseContext } from \"@reach/router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport domReady from \"@mikaelkristiansson/domready\"\nimport { StaticQueryContext } from \"gatsby\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n \n \n \n )\n\n const DataContext = React.createContext({})\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n \n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n return (\n \n \n {children}\n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n \n {({ pageResources, location }) => (\n \n \n \n \n
    \n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). But\n // only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !== browserLoc.pathname &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath === `/404.html` ||\n pagePath.match(/^\\/404\\/?$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(__BASE_PATH__ + pagePath + browserLoc.search + browserLoc.hash, {\n replace: true,\n })\n }\n\n publicLoader.loadPage(browserLoc.pathname).then(page => {\n if (!page || page.status === PageResourceStatus.Error) {\n throw new Error(\n `page resources for ${browserLoc.pathname} not found. Not rendering React`\n )\n }\n\n window.___webpackCompilationHash = page.page.webpackCompilationHash\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element: },\n ,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = () => {SiteRoot}\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n ReactDOM.hydrate\n )[0]\n\n domReady(() => {\n renderer(\n ,\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : void 0,\n () => {\n apiRunner(`onInitialClientRender`)\n }\n )\n })\n })\n})\n","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Link, {\n withPrefix,\n withAssetPrefix,\n navigate,\n push,\n replace,\n navigateTo,\n parsePath,\n} from \"gatsby-link\"\nimport { useScrollRestoration } from \"gatsby-react-router-scroll\"\nimport PageRenderer from \"./public-page-renderer\"\nimport loader from \"./loader\"\n\nconst prefetchPathname = loader.enqueue\n\nconst StaticQueryContext = React.createContext({})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n \n {finalData && render(finalData)}\n {!finalData &&
    Loading (StaticQuery)
    }\n
    \n )\n}\n\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n return (\n \n {staticQueryData => (\n \n )}\n \n )\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nfunction graphql() {\n throw new Error(\n `It appears like Gatsby is misconfigured. Gatsby related \\`graphql\\` calls ` +\n `are supposed to only be evaluated at compile time, and then compiled away. ` +\n `Unfortunately, something went wrong and the query was left in the compiled code.\\n\\n` +\n `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`\n )\n}\n\nexport {\n Link,\n withAssetPrefix,\n withPrefix,\n graphql,\n parsePath,\n navigate,\n push, // TODO replace for v3\n replace, // TODO remove replace for v3\n navigateTo, // TODO: remove navigateTo for v3\n useScrollRestoration,\n StaticQueryContext,\n StaticQuery,\n PageRenderer,\n useStaticQuery,\n prefetchPathname,\n}\n","\"use strict\";\n\nmodule.exports = Object.assign;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint-disable jsx-a11y/anchor-has-content */\nimport React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport createContext from \"create-react-context\";\nimport { polyfill } from \"react-lifecycles-compat\";\nimport { startsWith, pick, resolve, match, insertParams, validateRedirect, shallowCompare } from \"./lib/utils\";\nimport { globalHistory, navigate, createHistory, createMemorySource } from \"./lib/history\";\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar createNamedContext = function createNamedContext(name, defaultValue) {\n var Ctx = createContext(defaultValue);\n Ctx.displayName = name;\n return Ctx;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Location Context/Provider\nvar LocationContext = createNamedContext(\"Location\");\n\n// sets up a listener if there isn't one already so apps don't need to be\n// wrapped in some top level provider\nvar Location = function Location(_ref) {\n var children = _ref.children;\n return React.createElement(\n LocationContext.Consumer,\n null,\n function (context) {\n return context ? children(context) : React.createElement(\n LocationProvider,\n null,\n children\n );\n }\n );\n};\n\nvar LocationProvider = function (_React$Component) {\n _inherits(LocationProvider, _React$Component);\n\n function LocationProvider() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, LocationProvider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n context: _this.getContext(),\n refs: { unlisten: null }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n LocationProvider.prototype.getContext = function getContext() {\n var _props$history = this.props.history,\n navigate = _props$history.navigate,\n location = _props$history.location;\n\n return { navigate: navigate, location: location };\n };\n\n LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {\n if (isRedirect(error)) {\n var _navigate = this.props.history.navigate;\n\n _navigate(error.uri, { replace: true });\n } else {\n throw error;\n }\n };\n\n LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevState.context.location !== this.state.context.location) {\n this.props.history._onTransitionComplete();\n }\n };\n\n LocationProvider.prototype.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n var refs = this.state.refs,\n history = this.props.history;\n\n history._onTransitionComplete();\n refs.unlisten = history.listen(function () {\n Promise.resolve().then(function () {\n // TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306\n requestAnimationFrame(function () {\n if (!_this2.unmounted) {\n _this2.setState(function () {\n return { context: _this2.getContext() };\n });\n }\n });\n });\n });\n };\n\n LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n var refs = this.state.refs;\n\n this.unmounted = true;\n refs.unlisten();\n };\n\n LocationProvider.prototype.render = function render() {\n var context = this.state.context,\n children = this.props.children;\n\n return React.createElement(\n LocationContext.Provider,\n { value: context },\n typeof children === \"function\" ? children(context) : children || null\n );\n };\n\n return LocationProvider;\n}(React.Component);\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nLocationProvider.defaultProps = {\n history: globalHistory\n};\nprocess.env.NODE_ENV !== \"production\" ? LocationProvider.propTypes = {\n history: PropTypes.object.isRequired\n} : void 0;\nvar ServerLocation = function ServerLocation(_ref2) {\n var url = _ref2.url,\n children = _ref2.children;\n\n var searchIndex = url.indexOf(\"?\");\n var searchExists = searchIndex > -1;\n var pathname = void 0;\n var search = \"\";\n var hash = \"\";\n\n if (searchExists) {\n pathname = url.substring(0, searchIndex);\n search = url.substring(searchIndex);\n } else {\n pathname = url;\n }\n\n return React.createElement(\n LocationContext.Provider,\n {\n value: {\n location: {\n pathname: pathname,\n search: search,\n hash: hash\n },\n navigate: function navigate() {\n throw new Error(\"You can't call navigate on the server.\");\n }\n }\n },\n children\n );\n};\n////////////////////////////////////////////////////////////////////////////////\n// Sets baseuri and basepath for nested routers and links\nvar BaseContext = createNamedContext(\"Base\", { baseuri: \"/\", basepath: \"/\" });\n\n////////////////////////////////////////////////////////////////////////////////\n// The main event, welcome to the show everybody.\nvar Router = function Router(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (baseContext) {\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RouterImpl, _extends({}, baseContext, locationContext, props));\n }\n );\n }\n );\n};\n\nvar RouterImpl = function (_React$PureComponent) {\n _inherits(RouterImpl, _React$PureComponent);\n\n function RouterImpl() {\n _classCallCheck(this, RouterImpl);\n\n return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));\n }\n\n RouterImpl.prototype.render = function render() {\n var _props = this.props,\n location = _props.location,\n _navigate2 = _props.navigate,\n basepath = _props.basepath,\n primary = _props.primary,\n children = _props.children,\n baseuri = _props.baseuri,\n _props$component = _props.component,\n component = _props$component === undefined ? \"div\" : _props$component,\n domProps = _objectWithoutProperties(_props, [\"location\", \"navigate\", \"basepath\", \"primary\", \"children\", \"baseuri\", \"component\"]);\n\n var routes = React.Children.toArray(children).reduce(function (array, child) {\n var routes = createRoute(basepath)(child);\n return array.concat(routes);\n }, []);\n var pathname = location.pathname;\n\n\n var match = pick(routes, pathname);\n\n if (match) {\n var params = match.params,\n uri = match.uri,\n route = match.route,\n element = match.route.value;\n\n // remove the /* from the end for child routes relative paths\n\n basepath = route.default ? basepath : route.path.replace(/\\*$/, \"\");\n\n var props = _extends({}, params, {\n uri: uri,\n location: location,\n navigate: function navigate(to, options) {\n return _navigate2(resolve(to, uri), options);\n }\n });\n\n var clone = React.cloneElement(element, props, element.props.children ? React.createElement(\n Router,\n { location: location, primary: primary },\n element.props.children\n ) : undefined);\n\n // using 'div' for < 16.3 support\n var FocusWrapper = primary ? FocusHandler : component;\n // don't pass any props to 'div'\n var wrapperProps = primary ? _extends({ uri: uri, location: location, component: component }, domProps) : domProps;\n\n return React.createElement(\n BaseContext.Provider,\n { value: { baseuri: uri, basepath: basepath } },\n React.createElement(\n FocusWrapper,\n wrapperProps,\n clone\n )\n );\n } else {\n // Not sure if we want this, would require index routes at every level\n // warning(\n // false,\n // `\\n\\nNothing matched:\\n\\t${\n // location.pathname\n // }\\n\\nPaths checked: \\n\\t${routes\n // .map(route => route.path)\n // .join(\n // \"\\n\\t\"\n // )}\\n\\nTo get rid of this warning, add a default NotFound component as child of Router:\n // \\n\\tlet NotFound = () =>
    Not Found!
    \n // \\n\\t\\n\\t \\n\\t {/* ... */}\\n\\t`\n // );\n return null;\n }\n };\n\n return RouterImpl;\n}(React.PureComponent);\n\nRouterImpl.defaultProps = {\n primary: true\n};\n\n\nvar FocusContext = createNamedContext(\"Focus\");\n\nvar FocusHandler = function FocusHandler(_ref3) {\n var uri = _ref3.uri,\n location = _ref3.location,\n component = _ref3.component,\n domProps = _objectWithoutProperties(_ref3, [\"uri\", \"location\", \"component\"]);\n\n return React.createElement(\n FocusContext.Consumer,\n null,\n function (requestFocus) {\n return React.createElement(FocusHandlerImpl, _extends({}, domProps, {\n component: component,\n requestFocus: requestFocus,\n uri: uri,\n location: location\n }));\n }\n );\n};\n\n// don't focus on initial render\nvar initialRender = true;\nvar focusHandlerCount = 0;\n\nvar FocusHandlerImpl = function (_React$Component2) {\n _inherits(FocusHandlerImpl, _React$Component2);\n\n function FocusHandlerImpl() {\n var _temp2, _this4, _ret2;\n\n _classCallCheck(this, FocusHandlerImpl);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this4 = _possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {\n if (!_this4.state.shouldFocus && node) {\n node.focus();\n }\n }, _temp2), _possibleConstructorReturn(_this4, _ret2);\n }\n\n FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var initial = prevState.uri == null;\n if (initial) {\n return _extends({\n shouldFocus: true\n }, nextProps);\n } else {\n var myURIChanged = nextProps.uri !== prevState.uri;\n var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;\n return _extends({\n shouldFocus: myURIChanged || navigatedUpToMe\n }, nextProps);\n }\n };\n\n FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {\n focusHandlerCount++;\n this.focus();\n };\n\n FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {\n focusHandlerCount--;\n if (focusHandlerCount === 0) {\n initialRender = true;\n }\n };\n\n FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevProps.location !== this.props.location && this.state.shouldFocus) {\n this.focus();\n }\n };\n\n FocusHandlerImpl.prototype.focus = function focus() {\n if (process.env.NODE_ENV === \"test\") {\n // getting cannot read property focus of null in the tests\n // and that bit of global `initialRender` state causes problems\n // should probably figure it out!\n return;\n }\n\n var requestFocus = this.props.requestFocus;\n\n\n if (requestFocus) {\n requestFocus(this.node);\n } else {\n if (initialRender) {\n initialRender = false;\n } else if (this.node) {\n // React polyfills [autofocus] and it fires earlier than cDM,\n // so we were stealing focus away, this line prevents that.\n if (!this.node.contains(document.activeElement)) {\n this.node.focus();\n }\n }\n }\n };\n\n FocusHandlerImpl.prototype.render = function render() {\n var _this5 = this;\n\n var _props2 = this.props,\n children = _props2.children,\n style = _props2.style,\n requestFocus = _props2.requestFocus,\n _props2$component = _props2.component,\n Comp = _props2$component === undefined ? \"div\" : _props2$component,\n uri = _props2.uri,\n location = _props2.location,\n domProps = _objectWithoutProperties(_props2, [\"children\", \"style\", \"requestFocus\", \"component\", \"uri\", \"location\"]);\n\n return React.createElement(\n Comp,\n _extends({\n style: _extends({ outline: \"none\" }, style),\n tabIndex: \"-1\",\n ref: function ref(n) {\n return _this5.node = n;\n }\n }, domProps),\n React.createElement(\n FocusContext.Provider,\n { value: this.requestFocus },\n this.props.children\n )\n );\n };\n\n return FocusHandlerImpl;\n}(React.Component);\n\npolyfill(FocusHandlerImpl);\n\nvar k = function k() {};\n\n////////////////////////////////////////////////////////////////////////////////\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = function forwardRef(C) {\n return C;\n };\n}\n\nvar Link = forwardRef(function (_ref4, ref) {\n var innerRef = _ref4.innerRef,\n props = _objectWithoutProperties(_ref4, [\"innerRef\"]);\n\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref5) {\n var basepath = _ref5.basepath,\n baseuri = _ref5.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref6) {\n var location = _ref6.location,\n navigate = _ref6.navigate;\n\n var to = props.to,\n state = props.state,\n replace = props.replace,\n _props$getProps = props.getProps,\n getProps = _props$getProps === undefined ? k : _props$getProps,\n anchorProps = _objectWithoutProperties(props, [\"to\", \"state\", \"replace\", \"getProps\"]);\n\n var href = resolve(to, baseuri);\n var encodedHref = encodeURI(href);\n var isCurrent = location.pathname === encodedHref;\n var isPartiallyCurrent = startsWith(location.pathname, encodedHref);\n\n return React.createElement(\"a\", _extends({\n ref: ref || innerRef,\n \"aria-current\": isCurrent ? \"page\" : undefined\n }, anchorProps, getProps({ isCurrent: isCurrent, isPartiallyCurrent: isPartiallyCurrent, href: href, location: location }), {\n href: href,\n onClick: function onClick(event) {\n if (anchorProps.onClick) anchorProps.onClick(event);\n if (shouldNavigate(event)) {\n event.preventDefault();\n var shouldReplace = replace;\n if (typeof replace !== \"boolean\" && isCurrent) {\n var _location$state = _extends({}, location.state),\n key = _location$state.key,\n restState = _objectWithoutProperties(_location$state, [\"key\"]);\n\n shouldReplace = shallowCompare(_extends({}, state), restState);\n }\n navigate(href, {\n state: state,\n replace: shouldReplace\n });\n }\n }\n }));\n }\n );\n }\n );\n});\n\nLink.displayName = \"Link\";\n\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nfunction RedirectRequest(uri) {\n this.uri = uri;\n}\n\nvar isRedirect = function isRedirect(o) {\n return o instanceof RedirectRequest;\n};\n\nvar redirectTo = function redirectTo(to) {\n throw new RedirectRequest(to);\n};\n\nvar RedirectImpl = function (_React$Component3) {\n _inherits(RedirectImpl, _React$Component3);\n\n function RedirectImpl() {\n _classCallCheck(this, RedirectImpl);\n\n return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));\n }\n\n // Support React < 16 with this hook\n RedirectImpl.prototype.componentDidMount = function componentDidMount() {\n var _props3 = this.props,\n navigate = _props3.navigate,\n to = _props3.to,\n from = _props3.from,\n _props3$replace = _props3.replace,\n replace = _props3$replace === undefined ? true : _props3$replace,\n state = _props3.state,\n noThrow = _props3.noThrow,\n baseuri = _props3.baseuri,\n props = _objectWithoutProperties(_props3, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n Promise.resolve().then(function () {\n var resolvedTo = resolve(to, baseuri);\n navigate(insertParams(resolvedTo, props), { replace: replace, state: state });\n });\n };\n\n RedirectImpl.prototype.render = function render() {\n var _props4 = this.props,\n navigate = _props4.navigate,\n to = _props4.to,\n from = _props4.from,\n replace = _props4.replace,\n state = _props4.state,\n noThrow = _props4.noThrow,\n baseuri = _props4.baseuri,\n props = _objectWithoutProperties(_props4, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n var resolvedTo = resolve(to, baseuri);\n if (!noThrow) redirectTo(insertParams(resolvedTo, props));\n return null;\n };\n\n return RedirectImpl;\n}(React.Component);\n\nvar Redirect = function Redirect(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref7) {\n var baseuri = _ref7.baseuri;\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RedirectImpl, _extends({}, locationContext, { baseuri: baseuri }, props));\n }\n );\n }\n );\n};\n\nprocess.env.NODE_ENV !== \"production\" ? Redirect.propTypes = {\n from: PropTypes.string,\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nvar Match = function Match(_ref8) {\n var path = _ref8.path,\n children = _ref8.children;\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref9) {\n var baseuri = _ref9.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref10) {\n var navigate = _ref10.navigate,\n location = _ref10.location;\n\n var resolvedPath = resolve(path, baseuri);\n var result = match(resolvedPath, location.pathname);\n return children({\n navigate: navigate,\n location: location,\n match: result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null\n });\n }\n );\n }\n );\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Hooks\n\nvar useLocation = function useLocation() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.location;\n};\n\nvar useNavigate = function useNavigate() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useNavigate hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.navigate;\n};\n\nvar useParams = function useParams() {\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var results = match(context.basepath, location.pathname);\n\n return results ? results.params : null;\n};\n\nvar useMatch = function useMatch(path) {\n if (!path) {\n throw new Error(\"useMatch(path: string) requires an argument of a string to match against\");\n }\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var resolvedPath = resolve(path, context.baseuri);\n var result = match(resolvedPath, location.pathname);\n return result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar stripSlashes = function stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n};\n\nvar createRoute = function createRoute(basepath) {\n return function (element) {\n if (!element) {\n return null;\n }\n\n if (element.type === React.Fragment && element.props.children) {\n return React.Children.map(element.props.children, createRoute(basepath));\n }\n !(element.props.path || element.props.default || element.type === Redirect) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \": Children of must have a `path` or `default` prop, or be a ``. None found on element type `\" + element.type + \"`\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && (!element.props.from || !element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" requires both \\\"from\\\" and \\\"to\\\" props when inside a .\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && !validateRedirect(element.props.from, element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.\") : invariant(false) : void 0;\n\n if (element.props.default) {\n return { value: element, default: true };\n }\n\n var elementPath = element.type === Redirect ? element.props.from : element.props.path;\n\n var path = elementPath === \"/\" ? basepath : stripSlashes(basepath) + \"/\" + stripSlashes(elementPath);\n\n return {\n value: element,\n default: element.props.default,\n path: element.props.children ? stripSlashes(path) + \"/*\" : path\n };\n };\n};\n\nvar shouldNavigate = function shouldNavigate(event) {\n return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n////////////////////////////////////////////////////////////////////////\nexport { Link, Location, LocationProvider, Match, Redirect, Router, ServerLocation, createHistory, createMemorySource, isRedirect, navigate, redirectTo, globalHistory, match as matchPath, useLocation, useNavigate, useParams, useMatch , BaseContext };","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.parsePath = parsePath;\n\nfunction parsePath(path) {\n var pathname = path || \"/\";\n var search = \"\";\n var hash = \"\";\n var hashIndex = pathname.indexOf(\"#\");\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf(\"?\");\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === \"?\" ? \"\" : search,\n hash: hash === \"#\" ? \"\" : hash\n };\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const support = function (feature) {\n if (typeof document === `undefined`) {\n return false\n }\n const fakeLink = document.createElement(`link`)\n try {\n if (fakeLink.relList && typeof fakeLink.relList.supports === `function`) {\n return fakeLink.relList.supports(feature)\n }\n } catch (err) {\n return false\n }\n return false\n}\n\nconst linkPrefetchStrategy = function (url, options) {\n return new Promise((resolve, reject) => {\n if (typeof document === `undefined`) {\n reject()\n return\n }\n\n const link = document.createElement(`link`)\n link.setAttribute(`rel`, `prefetch`)\n link.setAttribute(`href`, url)\n\n Object.keys(options).forEach(key => {\n link.setAttribute(key, options[key])\n })\n\n link.onload = resolve\n link.onerror = reject\n\n const parentElement =\n document.getElementsByTagName(`head`)[0] ||\n document.getElementsByName(`script`)[0].parentNode\n parentElement.appendChild(link)\n })\n}\n\nconst xhrPrefetchStrategy = function (url) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(`GET`, url, true)\n\n req.onload = () => {\n if (req.status === 200) {\n resolve()\n } else {\n reject()\n }\n }\n\n req.send(null)\n })\n}\n\nconst supportedPrefetchStrategy = support(`prefetch`)\n ? linkPrefetchStrategy\n : xhrPrefetchStrategy\n\nconst preFetched = {}\n\nconst prefetch = function (url, options) {\n return new Promise(resolve => {\n if (preFetched[url]) {\n resolve()\n return\n }\n\n supportedPrefetchStrategy(url, options)\n .then(() => {\n resolve()\n preFetched[url] = true\n })\n .catch(() => {}) // 404s are logged to the console anyway\n })\n}\n\nexport default prefetch\n","import prefetchHelper from \"./prefetch\"\nimport emitter from \"./emitter\"\nimport { setMatchPaths, findPath, findMatchPath } from \"./find-path\"\n\n/**\n * Available resource loading statuses\n */\nexport const PageResourceStatus = {\n /**\n * At least one of critical resources failed to load\n */\n Error: `error`,\n /**\n * Resources loaded successfully\n */\n Success: `success`,\n}\n\nconst preferDefault = m => (m && m.default) || m\n\nconst stripSurroundingSlashes = s => {\n s = s[0] === `/` ? s.slice(1) : s\n s = s.endsWith(`/`) ? s.slice(0, -1) : s\n return s\n}\n\nconst createPageDataUrl = path => {\n const fixedPath = path === `/` ? `index` : stripSurroundingSlashes(path)\n return `${__PATH_PREFIX__}/page-data/${fixedPath}/page-data.json`\n}\n\nfunction doFetch(url, method = `GET`) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(method, url, true)\n req.onreadystatechange = () => {\n if (req.readyState == 4) {\n resolve(req)\n }\n }\n req.send(null)\n })\n}\n\nconst doesConnectionSupportPrefetch = () => {\n if (\n `connection` in navigator &&\n typeof navigator.connection !== `undefined`\n ) {\n if ((navigator.connection.effectiveType || ``).includes(`2g`)) {\n return false\n }\n if (navigator.connection.saveData) {\n return false\n }\n }\n return true\n}\n\nconst toPageResources = (pageData, component = null) => {\n const page = {\n componentChunkName: pageData.componentChunkName,\n path: pageData.path,\n webpackCompilationHash: pageData.webpackCompilationHash,\n matchPath: pageData.matchPath,\n staticQueryHashes: pageData.staticQueryHashes,\n }\n\n return {\n component,\n json: pageData.result,\n page,\n }\n}\n\nexport class BaseLoader {\n constructor(loadComponent, matchPaths) {\n // Map of pagePath -> Page. Where Page is an object with: {\n // status: PageResourceStatus.Success || PageResourceStatus.Error,\n // payload: PageResources, // undefined if PageResourceStatus.Error\n // }\n // PageResources is {\n // component,\n // json: pageData.result,\n // page: {\n // componentChunkName,\n // path,\n // webpackCompilationHash,\n // staticQueryHashes\n // },\n // staticQueryResults\n // }\n this.pageDb = new Map()\n this.inFlightDb = new Map()\n this.staticQueryDb = {}\n this.pageDataDb = new Map()\n this.prefetchTriggered = new Set()\n this.prefetchCompleted = new Set()\n this.loadComponent = loadComponent\n setMatchPaths(matchPaths)\n }\n\n inFlightNetworkRequests = new Map()\n\n memoizedGet(url) {\n let inFlightPromise = this.inFlightNetworkRequests.get(url)\n\n if (!inFlightPromise) {\n inFlightPromise = doFetch(url, `GET`)\n this.inFlightNetworkRequests.set(url, inFlightPromise)\n }\n\n // Prefer duplication with then + catch over .finally to prevent problems in ie11 + firefox\n return inFlightPromise\n .then(response => {\n this.inFlightNetworkRequests.delete(url)\n return response\n })\n .catch(err => {\n this.inFlightNetworkRequests.delete(url)\n throw err\n })\n }\n\n setApiRunner(apiRunner) {\n this.apiRunner = apiRunner\n this.prefetchDisabled = apiRunner(`disableCorePrefetching`).some(a => a)\n }\n\n fetchPageDataJson(loadObj) {\n const { pagePath, retries = 0 } = loadObj\n const url = createPageDataUrl(pagePath)\n return this.memoizedGet(url).then(req => {\n const { status, responseText } = req\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.path === undefined) {\n throw new Error(`not a valid pageData response`)\n }\n\n return Object.assign(loadObj, {\n status: PageResourceStatus.Success,\n payload: jsonPayload,\n })\n } catch (err) {\n // continue regardless of error\n }\n }\n\n // Handle 404\n if (status === 404 || status === 200) {\n // If the request was for a 404 page and it doesn't exist, we're done\n if (pagePath === `/404.html`) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Need some code here to cache the 404 request. In case\n // multiple loadPageDataJsons result in 404s\n return this.fetchPageDataJson(\n Object.assign(loadObj, { pagePath: `/404.html`, notFound: true })\n )\n }\n\n // handle 500 response (Unrecoverable)\n if (status === 500) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Handle everything else, including status === 0, and 503s. Should retry\n if (retries < 3) {\n return this.fetchPageDataJson(\n Object.assign(loadObj, { retries: retries + 1 })\n )\n }\n\n // Retried 3 times already, result is an error.\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n })\n }\n\n loadPageDataJson(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDataDb.has(pagePath)) {\n const pageData = this.pageDataDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !pageData.stale) {\n return Promise.resolve(pageData)\n }\n }\n\n return this.fetchPageDataJson({ pagePath }).then(pageData => {\n this.pageDataDb.set(pagePath, pageData)\n\n return pageData\n })\n }\n\n findMatchPath(rawPath) {\n return findMatchPath(rawPath)\n }\n\n // TODO check all uses of this and whether they use undefined for page resources not exist\n loadPage(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const page = this.pageDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !page.payload.stale) {\n return Promise.resolve(page.payload)\n }\n }\n\n if (this.inFlightDb.has(pagePath)) {\n return this.inFlightDb.get(pagePath)\n }\n\n const inFlightPromise = Promise.all([\n this.loadAppData(),\n this.loadPageDataJson(pagePath),\n ]).then(allData => {\n const result = allData[1]\n if (result.status === PageResourceStatus.Error) {\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n let pageData = result.payload\n const { componentChunkName, staticQueryHashes = [] } = pageData\n\n const finalResult = {}\n\n const componentChunkPromise = this.loadComponent(componentChunkName).then(\n component => {\n finalResult.createdAt = new Date()\n let pageResources\n if (!component) {\n finalResult.status = PageResourceStatus.Error\n } else {\n finalResult.status = PageResourceStatus.Success\n if (result.notFound === true) {\n finalResult.notFound = true\n }\n pageData = Object.assign(pageData, {\n webpackCompilationHash: allData[0]\n ? allData[0].webpackCompilationHash\n : ``,\n })\n pageResources = toPageResources(pageData, component)\n }\n // undefined if final result is an error\n return pageResources\n }\n )\n\n const staticQueryBatchPromise = Promise.all(\n staticQueryHashes.map(staticQueryHash => {\n // Check for cache in case this static query result has already been loaded\n if (this.staticQueryDb[staticQueryHash]) {\n const jsonPayload = this.staticQueryDb[staticQueryHash]\n return { staticQueryHash, jsonPayload }\n }\n\n return this.memoizedGet(\n `${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json`\n ).then(req => {\n const jsonPayload = JSON.parse(req.responseText)\n return { staticQueryHash, jsonPayload }\n })\n })\n ).then(staticQueryResults => {\n const staticQueryResultsMap = {}\n\n staticQueryResults.forEach(({ staticQueryHash, jsonPayload }) => {\n staticQueryResultsMap[staticQueryHash] = jsonPayload\n this.staticQueryDb[staticQueryHash] = jsonPayload\n })\n\n return staticQueryResultsMap\n })\n\n return Promise.all([componentChunkPromise, staticQueryBatchPromise]).then(\n ([pageResources, staticQueryResults]) => {\n let payload\n if (pageResources) {\n payload = { ...pageResources, staticQueryResults }\n finalResult.payload = payload\n emitter.emit(`onPostLoadPageResources`, {\n page: payload,\n pageResources: payload,\n })\n }\n\n this.pageDb.set(pagePath, finalResult)\n\n return payload\n }\n )\n })\n\n inFlightPromise\n .then(response => {\n this.inFlightDb.delete(pagePath)\n })\n .catch(error => {\n this.inFlightDb.delete(pagePath)\n throw error\n })\n\n this.inFlightDb.set(pagePath, inFlightPromise)\n\n return inFlightPromise\n }\n\n // returns undefined if loading page ran into errors\n loadPageSync(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const pageData = this.pageDb.get(pagePath).payload\n return pageData\n }\n return undefined\n }\n\n shouldPrefetch(pagePath) {\n // Skip prefetching if we know user is on slow or constrained connection\n if (!doesConnectionSupportPrefetch()) {\n return false\n }\n\n // Check if the page exists.\n if (this.pageDb.has(pagePath)) {\n return false\n }\n\n return true\n }\n\n prefetch(pagePath) {\n if (!this.shouldPrefetch(pagePath)) {\n return false\n }\n\n // Tell plugins with custom prefetching logic that they should start\n // prefetching this path.\n if (!this.prefetchTriggered.has(pagePath)) {\n this.apiRunner(`onPrefetchPathname`, { pathname: pagePath })\n this.prefetchTriggered.add(pagePath)\n }\n\n // If a plugin has disabled core prefetching, stop now.\n if (this.prefetchDisabled) {\n return false\n }\n\n const realPath = findPath(pagePath)\n // Todo make doPrefetch logic cacheable\n // eslint-disable-next-line consistent-return\n this.doPrefetch(realPath).then(() => {\n if (!this.prefetchCompleted.has(pagePath)) {\n this.apiRunner(`onPostPrefetchPathname`, { pathname: pagePath })\n this.prefetchCompleted.add(pagePath)\n }\n })\n\n return true\n }\n\n doPrefetch(pagePath) {\n const pageDataUrl = createPageDataUrl(pagePath)\n return prefetchHelper(pageDataUrl, {\n crossOrigin: `anonymous`,\n as: `fetch`,\n }).then(() =>\n // This was just prefetched, so will return a response from\n // the cache instead of making another request to the server\n this.loadPageDataJson(pagePath)\n )\n }\n\n hovering(rawPath) {\n this.loadPage(rawPath)\n }\n\n getResourceURLsForPathname(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDataDb.get(pagePath)\n if (page) {\n const pageResources = toPageResources(page.payload)\n\n return [\n ...createComponentUrls(pageResources.page.componentChunkName),\n createPageDataUrl(pagePath),\n ]\n } else {\n return null\n }\n }\n\n isPageNotFound(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDb.get(pagePath)\n return !page || page.notFound\n }\n\n loadAppData(retries = 0) {\n return this.memoizedGet(`${__PATH_PREFIX__}/page-data/app-data.json`).then(\n req => {\n const { status, responseText } = req\n\n let appData\n\n if (status !== 200 && retries < 3) {\n // Retry 3 times incase of non-200 responses\n return this.loadAppData(retries + 1)\n }\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.webpackCompilationHash === undefined) {\n throw new Error(`not a valid app-data response`)\n }\n\n appData = jsonPayload\n } catch (err) {\n // continue regardless of error\n }\n }\n\n return appData\n }\n )\n }\n}\n\nconst createComponentUrls = componentChunkName =>\n (window.___chunkMapping[componentChunkName] || []).map(\n chunk => __PATH_PREFIX__ + chunk\n )\n\nexport class ProdLoader extends BaseLoader {\n constructor(asyncRequires, matchPaths) {\n const loadComponent = chunkName =>\n asyncRequires.components[chunkName]\n ? asyncRequires.components[chunkName]()\n .then(preferDefault)\n // loader will handle the case when component is null\n .catch(() => null)\n : Promise.resolve()\n\n super(loadComponent, matchPaths)\n }\n\n doPrefetch(pagePath) {\n return super.doPrefetch(pagePath).then(result => {\n if (result.status !== PageResourceStatus.Success) {\n return Promise.resolve()\n }\n const pageData = result.payload\n const chunkName = pageData.componentChunkName\n const componentUrls = createComponentUrls(chunkName)\n return Promise.all(componentUrls.map(prefetchHelper)).then(() => pageData)\n })\n }\n\n loadPageDataJson(rawPath) {\n return super.loadPageDataJson(rawPath).then(data => {\n if (data.notFound) {\n // check if html file exist using HEAD request:\n // if it does we should navigate to it instead of showing 404\n return doFetch(rawPath, `HEAD`).then(req => {\n if (req.status === 200) {\n // page (.html file) actually exist (or we asked for 404 )\n // returning page resources status as errored to trigger\n // regular browser navigation to given page\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n // if HEAD request wasn't 200, return notFound result\n // and show 404 page\n return data\n })\n }\n return data\n })\n }\n}\n\nlet instance\n\nexport const setLoader = _loader => {\n instance = _loader\n}\n\nexport const publicLoader = {\n // Deprecated methods. As far as we're aware, these are only used by\n // core gatsby and the offline plugin, however there's a very small\n // chance they're called by others.\n getResourcesForPathname: rawPath => {\n console.warn(\n `Warning: getResourcesForPathname is deprecated. Use loadPage instead`\n )\n return instance.i.loadPage(rawPath)\n },\n getResourcesForPathnameSync: rawPath => {\n console.warn(\n `Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead`\n )\n return instance.i.loadPageSync(rawPath)\n },\n enqueue: rawPath => instance.prefetch(rawPath),\n\n // Real methods\n getResourceURLsForPathname: rawPath =>\n instance.getResourceURLsForPathname(rawPath),\n loadPage: rawPath => instance.loadPage(rawPath),\n loadPageSync: rawPath => instance.loadPageSync(rawPath),\n prefetch: rawPath => instance.prefetch(rawPath),\n isPageNotFound: rawPath => instance.isPageNotFound(rawPath),\n hovering: rawPath => instance.hovering(rawPath),\n loadAppData: () => instance.loadAppData(),\n}\n\nexport default publicLoader\n\nexport function getStaticQueryResults() {\n if (instance) {\n return instance.staticQueryDb\n } else {\n return {}\n }\n}\n","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollContainer = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _router = require(\"@reach/router\");\n\n// TODO: In Gatsby v3, this file should be removed.\n// We are deprecating this in V2 in favor of useScrollRestoration\nvar propTypes = {\n scrollKey: _propTypes.default.string.isRequired,\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired\n};\nvar hasNotWarnedDeprecation = true;\n\nvar ScrollContainerImplementation = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollContainerImplementation, _React$Component);\n\n function ScrollContainerImplementation(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n\n if (process.env.NODE_ENV !== \"production\" && hasNotWarnedDeprecation) {\n hasNotWarnedDeprecation = false;\n console.log(\"Deprecation Warning:\\n\\n Gatsby is deprecated in Gatsby v2 and will be removed in Gatsby v3.\\n Update to the React hook alternative useScrollRestoration, like this:.\\n \\n ```\\n import React from 'react';\\n import { useScrollRestoration } from 'gatsby-react-router-scroll';\\n\\n function Component() {\\n const scrollRestoration = useScrollRestoration('\" + _this.props.scrollKey + \"');\\n\\n return
      ;\\n }\\n ```\\n \");\n }\n\n return _this;\n }\n\n var _proto = ScrollContainerImplementation.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n // eslint-disable-next-line react/no-find-dom-node\n var node = _reactDom.default.findDOMNode(this);\n\n var _this$props = this.props,\n location = _this$props.location,\n scrollKey = _this$props.scrollKey;\n if (!node) return;\n node.addEventListener(\"scroll\", function () {\n _this2.props.context.save(location, scrollKey, node.scrollTop);\n });\n var position = this.props.context.read(location, scrollKey);\n node.scrollTo(0, position || 0);\n };\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return ScrollContainerImplementation;\n}(React.Component);\n\nvar ScrollContainer = function ScrollContainer(props) {\n return /*#__PURE__*/React.createElement(_router.Location, null, function (_ref) {\n var location = _ref.location;\n return /*#__PURE__*/React.createElement(_scrollHandler.ScrollContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(ScrollContainerImplementation, (0, _extends2.default)({}, props, {\n context: context,\n location: location\n }));\n });\n });\n};\n\nexports.ScrollContainer = ScrollContainer;\nScrollContainer.propTypes = propTypes;","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _gatsby = require(\"gatsby\");\n\nvar _getManifestPathname = _interopRequireDefault(require(\"./get-manifest-pathname\"));\n\n/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\n// when we don't have localisation in our manifest, we tree shake everything away\nif (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n exports.onRouteUpdate = function (_ref, pluginOptions) {\n var location = _ref.location;\n var localize = pluginOptions.localize;\n var manifestFilename = (0, _getManifestPathname.default)(location.pathname, localize);\n var manifestEl = document.head.querySelector(\"link[rel=\\\"manifest\\\"]\");\n\n if (manifestEl) {\n manifestEl.setAttribute(\"href\", (0, _gatsby.withPrefix)(manifestFilename));\n }\n };\n}","/*\n Why commonjs and not ES imports/exports?\n\n This module is used to alias `create-react-context` package, but drop the the actual implementation part\n because Gatsby requires version of react that has implementatoin baked in.\n \n Package source is using ES modules:\n - https://github.com/jamiebuilds/create-react-context/blob/v0.3.0/src/index.js\n \n But to build this package `babel-plugin-add-module-exports` is used ( https://www.npmjs.com/package/babel-plugin-add-module-exports).\n Which result in both `module.exports` and `exports.default` being set to same thing.\n\n We don't use that babel plugin so we only have `exports.default`.\n\n This cause problems in various 3rd party react components that rely on `module.exports` being set.\n See https://github.com/gatsbyjs/gatsby/issues/23645 for example of it.\n \n Instead of adding same babel plugin we mimic output here. Adding babel plugin just for this would:\n a) unnecesairly slow down compilation for all other files (if we just apply it everywhere)\n b) or complicate babel-loader configuration with overwrite specifically for this file\n*/\n\nconst { createContext } = require(`react`)\n\nmodule.exports = createContext\nmodule.exports.default = createContext\n","\"use strict\";\n\nexports.DEFAULT_OPTIONS = {\n maxWidth: 650,\n wrapperStyle: \"\",\n backgroundColor: \"white\",\n linkImagesToOriginal: true,\n showCaptions: false,\n markdownCaptions: false,\n withWebp: false,\n withAvif: false,\n tracedSVG: false,\n loading: \"lazy\",\n disableBgImageOnAlpha: false,\n disableBgImage: false\n};\nexports.EMPTY_ALT = \"GATSBY_EMPTY_ALT\";\nexports.imageClass = \"gatsby-resp-image-image\";\nexports.imageWrapperClass = \"gatsby-resp-image-wrapper\";\nexports.imageBackgroundClass = \"gatsby-resp-image-background-image\";","function _extends() {\n module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _extends.apply(this, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nexports.__esModule = true;\nexports.onRouteUpdate = void 0;\n\nvar onRouteUpdate = function onRouteUpdate(_ref, pluginOptions) {\n var location = _ref.location;\n\n if (pluginOptions === void 0) {\n pluginOptions = {};\n }\n\n if (process.env.NODE_ENV !== \"production\" || typeof ga !== \"function\") {\n return null;\n }\n\n var pathIsExcluded = location && typeof window.excludeGAPaths !== \"undefined\" && window.excludeGAPaths.some(function (rx) {\n return rx.test(location.pathname);\n });\n if (pathIsExcluded) return null; // wrap inside a timeout to make sure react-helmet is done with it's changes (https://github.com/gatsbyjs/gatsby/issues/9139)\n // reactHelmet is using requestAnimationFrame: https://github.com/nfl/react-helmet/blob/5.2.0/src/HelmetUtils.js#L296-L299\n\n var sendPageView = function sendPageView() {\n var pagePath = location ? location.pathname + location.search + location.hash : undefined;\n window.ga(\"set\", \"page\", pagePath);\n window.ga(\"send\", \"pageview\");\n }; // Minimum delay for reactHelmet's requestAnimationFrame\n\n\n var delay = Math.max(32, pluginOptions.pageTransitionDelay || 0);\n setTimeout(sendPageView, delay);\n return null;\n};\n\nexports.onRouteUpdate = onRouteUpdate;","\"use strict\";\n\nvar _require = require(\"./constants\"),\n DEFAULT_OPTIONS = _require.DEFAULT_OPTIONS,\n imageClass = _require.imageClass,\n imageBackgroundClass = _require.imageBackgroundClass,\n imageWrapperClass = _require.imageWrapperClass;\n\nexports.onRouteUpdate = function (apiCallbackContext, pluginOptions) {\n var options = Object.assign({}, DEFAULT_OPTIONS, pluginOptions);\n var imageWrappers = document.querySelectorAll(\".\" + imageWrapperClass); // https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/\n // for cross-browser looping through NodeList without polyfills\n\n var _loop = function _loop(i) {\n var imageWrapper = imageWrappers[i];\n var backgroundElement = imageWrapper.querySelector(\".\" + imageBackgroundClass);\n var imageElement = imageWrapper.querySelector(\".\" + imageClass);\n\n var onImageLoad = function onImageLoad() {\n backgroundElement.style.transition = \"opacity 0.5s 0.5s\";\n imageElement.style.transition = \"opacity 0.5s\";\n onImageComplete();\n };\n\n var onImageComplete = function onImageComplete() {\n backgroundElement.style.opacity = 0;\n imageElement.style.opacity = 1;\n imageElement.style.color = \"inherit\";\n imageElement.style.boxShadow = \"inset 0px 0px 0px 400px \" + options.backgroundColor;\n imageElement.removeEventListener(\"load\", onImageLoad);\n imageElement.removeEventListener(\"error\", onImageComplete);\n };\n\n imageElement.style.opacity = 0;\n imageElement.addEventListener(\"load\", onImageLoad);\n imageElement.addEventListener(\"error\", onImageComplete);\n\n if (imageElement.complete) {\n onImageComplete();\n }\n };\n\n for (var i = 0; i < imageWrappers.length; i++) {\n _loop(i);\n }\n};","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","const plugins = require(`./api-runner-browser-plugins`)\nconst {\n getResourcesForPathname,\n getResourcesForPathnameSync,\n getResourceURLsForPathname,\n loadPage,\n loadPageSync,\n} = require(`./loader`).publicLoader\n\nexports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {\n // Hooks for gatsby-cypress's API handler\n if (process.env.CYPRESS_SUPPORT) {\n if (window.___apiHandler) {\n window.___apiHandler(api)\n } else if (window.___resolvedAPIs) {\n window.___resolvedAPIs.push(api)\n } else {\n window.___resolvedAPIs = [api]\n }\n }\n\n let results = plugins.map(plugin => {\n if (!plugin.plugin[api]) {\n return undefined\n }\n\n // Deprecated April 2019. Use `loadPageSync` instead\n args.getResourcesForPathnameSync = getResourcesForPathnameSync\n // Deprecated April 2019. Use `loadPage` instead\n args.getResourcesForPathname = getResourcesForPathname\n args.getResourceURLsForPathname = getResourceURLsForPathname\n args.loadPage = loadPage\n args.loadPageSync = loadPageSync\n\n const result = plugin.plugin[api](args, plugin.options)\n if (result && argTransform) {\n args = argTransform({ args, result, plugin })\n }\n return result\n })\n\n // Filter out undefined results.\n results = results.filter(result => typeof result !== `undefined`)\n\n if (results.length > 0) {\n return results\n } else if (defaultReturn) {\n return [defaultReturn]\n } else {\n return []\n }\n}\n\nexports.apiRunnerAsync = (api, args, defaultReturn) =>\n plugins.reduce(\n (previous, next) =>\n next.plugin[api]\n ? previous.then(() => next.plugin[api](args, next.options))\n : previous,\n Promise.resolve()\n )\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./node_modules/gatsby-link/index.js","webpack:///./node_modules/gatsby-react-router-scroll/session-storage.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireWildcard.js","webpack:///./.cache/normalize-page-path.js","webpack:///./.cache/find-path.js","webpack:///./node_modules/gatsby-react-router-scroll/use-scroll-restoration.js","webpack:///./.cache/emitter.js","webpack:///./node_modules/mitt/dist/mitt.es.js","webpack:///./node_modules/gatsby-react-router-scroll/index.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./.cache/react-lifecycles-compat.js","webpack:///./node_modules/@reach/router/es/lib/history.js","webpack:///./node_modules/gatsby-plugin-manifest/get-manifest-pathname.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-handler.js","webpack:///./.cache/page-renderer.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/@reach/router/es/lib/utils.js","webpack:///./.cache/api-runner-browser-plugins.js","webpack:///./node_modules/@mikaelkristiansson/domready/ready.js","webpack:///./.cache/register-service-worker.js","webpack:///./.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js","webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./.cache/route-announcer-props.js","webpack:///./.cache/navigation.js","webpack:///./node_modules/shallow-compare/es/index.js","webpack:///./.cache/ensure-resources.js","webpack:///./.cache/production-app.js","webpack:///./node_modules/@babel/runtime/helpers/inheritsLoose.js","webpack:///./.cache/gatsby-browser-entry.js","webpack:///./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js","webpack:///./node_modules/@reach/router/es/index.js","webpack:///./node_modules/@babel/runtime/helpers/typeof.js","webpack:///./.cache/strip-prefix.js","webpack:///./node_modules/gatsby-link/parse-path.js","webpack:///./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///./.cache/prefetch.js","webpack:///./.cache/loader.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-container.js","webpack:///./.cache/public-page-renderer.js","webpack:///./node_modules/gatsby-plugin-manifest/gatsby-browser.js","webpack:///./.cache/create-react-context.js","webpack:///./node_modules/gatsby-remark-images/constants.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/gatsby-plugin-google-analytics/gatsby-browser.js","webpack:///./node_modules/gatsby-remark-images/gatsby-browser.js","webpack:///./.cache/public-page-renderer-prod.js","webpack:///./.cache/api-runner-browser.js"],"names":["_interopRequireDefault","exports","__esModule","withPrefix","withAssetPrefix","path","getGlobalPathPrefix","navigateTo","replace","push","navigate","default","_objectWithoutPropertiesLoose2","_assertThisInitialized2","_inheritsLoose2","_extends2","_propTypes","_react","_router","_utils","_parsePath","parsePath","isAbsolutePath","startsWith","prefix","_ref","_prefix","getGlobalBasePrefix","isLocalLink","base","endsWith","slice","rewriteLinkPath","relativeTo","current","resolve","absolutify","NavLinkPropTypes","activeClassName","string","activeStyle","object","partiallyActive","bool","GatsbyLinkLocationWrapper","props","createElement","Location","_ref2","location","GatsbyLink","_location","_React$Component","_this","call","this","defaultGetProps","_ref3","isPartiallyCurrent","isCurrent","className","filter","Boolean","join","style","IOSupported","window","IntersectionObserver","state","handleRef","bind","_proto","prototype","_prefetch","currentPath","pathname","rewrittenPath","to","newPathName","___loader","enqueue","componentDidUpdate","prevProps","prevState","componentDidMount","componentWillUnmount","io","_this$io","instance","el","unobserve","disconnect","ref","cb","_this2","innerRef","hasOwnProperty","entries","forEach","entry","target","isIntersecting","intersectionRatio","observe","render","_this3","_this$props","_this$props$getProps","getProps","_onClick","onClick","_onMouseEnter","onMouseEnter","rest","prefixedTo","Link","e","hovering","button","defaultPrevented","metaKey","altKey","ctrlKey","shiftKey","preventDefault","shouldReplace","encodeURI","___navigate","href","Component","propTypes","func","isRequired","showDeprecationWarning","functionName","altFunctionName","version","console","warn","_default","forwardRef","options","___push","___replace","SessionStorage","read","key","stateKey","getStateKey","value","sessionStorage","getItem","JSON","parse","save","storedValue","stringify","setItem","stateKeyBase","_typeof","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","module","obj","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","desc","set","undefined","charAt","length","pathCache","Map","matchPaths","trimPathname","rawPathname","decodeURIComponent","stripPrefix","__BASE_PATH__","split","URL","setMatchPaths","findMatchPath","trimmedPathname","cleanPath","pickPaths","map","matchPath","originalPath","pick","normalizePagePath","route","grabMatchParams","params","findPath","foundPath","useScrollRestoration","identifier","useLocation","useContext","_scrollHandler","ScrollContext","useRef","useLayoutEffect","position","scrollTo","onScroll","scrollTop","emitter","all","create","on","type","handler","off","splice","indexOf","emit","evt","mitt","ScrollContainer","ScrollHandler","_scrollContainer","_useScrollRestoration","source","excluded","i","sourceKeys","keys","polyfill","_extends","assign","arguments","getLocation","_source$location","search","hash","origin","protocol","host","hostname","port","canUseDOM","decodeURI","history","createHistory","listeners","transitioning","resolveTransition","_onTransitionComplete","listen","listener","popstateListener","action","addEventListener","removeEventListener","fn","_ref$replace","go","Date","now","replaceState","pushState","transition","Promise","res","createMemorySource","initialPath","searchIndex","initialLocation","substr","index","stack","states","name","_","uri","_uri$split","_uri$split$","_uri$split2","_uri$split2$","newIndex","document","globalHistory","localizedManifests","Array","isArray","localizedManifest","find","app","start_url","lang","_interopRequireWildcard","React","_sessionStorage","createContext","displayName","_len","args","_key","apply","concat","_stateStorage","scrollListener","scrollY","windowScroll","shouldUpdateScroll","scrollToHash","node","getElementById","substring","scrollIntoView","prevRouterProps","routerProps","scrollPosition","_this$props$location","_this$props$location2","Provider","children","element","PageRenderer","_inheritsLoose","pageResources","json","pageContext","__params","pathContext","replacementElement","apiRunner","loader","publicLoader","pageElement","component","page","result","pop","_arrayLikeToArray","arr","len","arr2","_toConsumableArray","iter","Symbol","iterator","from","o","minLen","n","toString","constructor","test","TypeError","routes","match","default_","uriPathname","uriSegments","segmentize","isRootUri","ranked","rankRoutes","l","missed","routeSegments","max","Math","routeSegment","uriSegment","isSplat","dynamicMatch","paramRe","exec","reservedNames","_to$split","toPathname","toQuery","basePathname","toSegments","baseSegments","addQuery","allSegments","segments","segment","insertParams","_path$split","pathBase","_path$split$","query","constructedPath","_params$location","_params$location$sear","searchSplit","validateRedirect","isDynamic","sort","rankRoute","score","reduce","isRootSegment","SEGMENT_POINTS","a","b","q","shallowCompare","obj1","obj2","obj1Keys","every","plugin","require","ie10","navigator","appVersion","fns","doc","hack","documentElement","doScroll","loaded","readyState","shift","setTimeout","definition","error","serviceWorker","register","then","reg","installingWorker","installing","log","controller","___swUpdated","___failedResources","reload","catch","components","component---src-pages-404-js","component---src-pages-index-js","component---src-templates-blog-post-js","self","ReferenceError","condition","format","c","d","f","Error","argIndex","framesToPop","_setPrototypeOf","p","setPrototypeOf","__proto__","RouteAnnouncerProps","id","top","width","height","padding","overflow","clip","whiteSpace","border","redirectMap","redirectIgnoreCaseMap","maybeRedirect","redirect","toLowerCase","toPath","redirects","ignoreCase","fromPath","onPreRouteUpdate","prevLocation","onRouteUpdate","timeoutId","loadPage","status","PageResourceStatus","clearTimeout","webpackCompilationHash","___webpackCompilationHash","postMessage","gatsbyApi","reachNavigate","results","getSavedScrollPosition","oldPathname","RouteAnnouncer","announcementRef","createRef","nextProps","requestAnimationFrame","pageName","title","pageHeadings","querySelectorAll","textContent","newAnnouncement","innerText","compareLocationProps","nextLocation","_prevLocation$state","_nextLocation$state","RouteUpdates","_React$Component2","_proto2","shouldComponentUpdate","Fragment","shallowDiffers","_i","EnsureResources","loadPageSync","getDerivedStateFromProps","loadResources","rawPath","setState","nextState","ProdLoader","asyncRequires","setLoader","setApiRunner","___emitter","apiRunnerAsync","RouteHandler","BaseContext","baseuri","basepath","DataContext","GatsbyRoot","staticQueryResults","getStaticQueryResults","StaticQueryContext","LocationHandler","Consumer","Router","pagePath","browserLoc","SiteRoot","_ref4","App","renderer","ReactDOM","hydrate","domReady","subClass","superClass","prefetchPathname","StaticQueryDataRenderer","staticQueryData","data","finalData","StaticQuery","useStaticQuery","_context$query","context","isNaN","Number","graphql","_objectWithoutProperties","_classCallCheck","Constructor","_possibleConstructorReturn","_inherits","enumerable","writable","configurable","createNamedContext","defaultValue","Ctx","LocationContext","LocationProvider","_temp","getContext","refs","unlisten","_props$history","componentDidCatch","info","isRedirect","_navigate","unmounted","defaultProps","ServerLocation","url","baseContext","locationContext","RouterImpl","_React$PureComponent","_props","_navigate2","primary","_props$component","domProps","Children","toArray","array","child","createRoute","clone","cloneElement","FocusWrapper","FocusHandler","wrapperProps","PureComponent","FocusContext","requestFocus","FocusHandlerImpl","initialRender","focusHandlerCount","_temp2","_this4","_len2","_key2","shouldFocus","focus","myURIChanged","navigatedUpToMe","contains","activeElement","_this5","_props2","_props2$component","Comp","outline","tabIndex","k","C","_ref5","_ref6","_props$getProps","anchorProps","encodedHref","event","shouldNavigate","_location$state","restState","RedirectRequest","redirectTo","RedirectImpl","_React$Component3","_props3","_props3$replace","noThrow","resolvedTo","_props4","Redirect","_ref7","Match","_ref8","_ref9","_ref10","resolvedPath","useNavigate","useParams","useMatch","stripSlashes","str","elementPath","hashIndex","supportedPrefetchStrategy","feature","fakeLink","relList","supports","err","support","reject","link","setAttribute","onload","onerror","getElementsByTagName","getElementsByName","parentNode","appendChild","req","XMLHttpRequest","open","send","preFetched","prefetch","Success","preferDefault","m","createPageDataUrl","s","doFetch","method","onreadystatechange","toPageResources","pageData","componentChunkName","staticQueryHashes","BaseLoader","loadComponent","inFlightNetworkRequests","pageDb","inFlightDb","staticQueryDb","pageDataDb","prefetchTriggered","Set","prefetchCompleted","memoizedGet","inFlightPromise","response","delete","prefetchDisabled","some","fetchPageDataJson","loadObj","retries","responseText","jsonPayload","payload","notFound","loadPageDataJson","loadAppData","allData","finalResult","componentChunkPromise","createdAt","staticQueryBatchPromise","staticQueryHash","staticQueryResultsMap","shouldPrefetch","doesConnectionSupportPrefetch","connection","effectiveType","includes","saveData","add","realPath","doPrefetch","pageDataUrl","prefetchHelper","crossOrigin","as","getResourceURLsForPathname","createComponentUrls","isPageNotFound","appData","___chunkMapping","chunk","__PATH_PREFIX__","_BaseLoader","chunkName","componentUrls","_loader","getResourcesForPathname","getResourcesForPathnameSync","_reactDom","scrollKey","ScrollContainerImplementation","findDOMNode","DEFAULT_OPTIONS","maxWidth","wrapperStyle","backgroundColor","linkImagesToOriginal","showCaptions","markdownCaptions","withWebp","withAvif","tracedSVG","loading","disableBgImageOnAlpha","disableBgImage","EMPTY_ALT","imageClass","imageWrapperClass","imageBackgroundClass","pluginOptions","ga","excludeGAPaths","rx","delay","pageTransitionDelay","_require","apiCallbackContext","imageWrappers","_loop","imageWrapper","backgroundElement","querySelector","imageElement","onImageLoad","onImageComplete","opacity","color","boxShadow","complete","ProdPageRenderer","InternalPageRenderer","plugins","api","defaultReturn","argTransform","previous","next"],"mappings":";6FAEA,IAAIA,EAAyB,EAAQ,QAErCC,EAAQC,YAAa,EACrBD,EAAQE,WAAaA,EACrBF,EAAQG,gBA4DR,SAAyBC,GACvB,OAAOF,EAAWE,EAAMC,MA5D1BL,EAAQM,WAAaN,EAAQO,QAAUP,EAAQQ,KAAOR,EAAQS,SAAWT,EAAQU,aAAU,EAE3F,IAAIC,EAAiCZ,EAAuB,EAAQ,SAEhEa,EAA0Bb,EAAuB,EAAQ,SAEzDc,EAAkBd,EAAuB,EAAQ,SAEjDe,EAAYf,EAAuB,EAAQ,SAE3CgB,EAAahB,EAAuB,EAAQ,SAE5CiB,EAASjB,EAAuB,EAAQ,SAExCkB,EAAU,EAAQ,QAElBC,EAAS,EAAQ,QAEjBC,EAAa,EAAQ,QAEzBnB,EAAQoB,UAAYD,EAAWC,UAE/B,IAAIC,EAAiB,SAAwBjB,GAC3C,OAAOA,aAAmC,EAASA,EAAKkB,WAAW,MAGrE,SAASpB,EAAWE,EAAMmB,GACxB,IAAIC,EAAMC,EAMV,QAJe,IAAXF,IACFA,EAASG,MAGNC,EAAYvB,GACf,OAAOA,EAGT,GAAIA,EAAKkB,WAAW,OAASlB,EAAKkB,WAAW,OAC3C,OAAOlB,EAGT,IAAIwB,EAAwG,QAAhGJ,EAA8B,QAAtBC,EAAUF,SAAgC,IAAZE,EAAqBA,EAAUpB,WAA4C,IAATmB,EAAkBA,EAAO,IAC7I,MAAO,KAAOI,aAAmC,EAASA,EAAKC,SAAS,MAAQD,EAAKE,MAAM,GAAI,GAAKF,IAASxB,EAAKkB,WAAW,KAAOlB,EAAO,IAAMA,GAKnJ,IAAIC,EAAsB,WACxB,MAAsH,eAGpHqB,EAAsB,WAC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vB,IAAsB,CAC/CnvB,WACA0R,mBACGA,EAAcC,OALV,O,qBCTX,MAAMyd,EAAUnY,EAAS,SACnB,wBACJsV,EAAuB,4BACvBC,EAA2B,2BAC3BZ,EAA0B,SAC1BvQ,EAAQ,aACRoC,GACExG,EAAS,QAAW/E,aAExBlV,EAAQgV,UAAY,SAACqd,EAAKnf,EAAWof,EAAeC,QAAtB,IAAJrf,MAAO,IAY/B,IAAI4L,EAAUsT,EAAQlmB,IAAI8N,IACxB,IAAKA,EAAOA,OAAOqY,GACjB,OAIFnf,EAAKsc,4BAA8BA,EAEnCtc,EAAKqc,wBAA0BA,EAC/Brc,EAAK0b,2BAA6BA,EAClC1b,EAAKmL,SAAWA,EAChBnL,EAAKuN,aAAeA,EAEpB,MAAMnL,EAAS0E,EAAOA,OAAOqY,GAAKnf,EAAM8G,EAAOpR,SAI/C,OAHI0M,GAAUid,IACZrf,EAAOqf,EAAa,CAAErf,OAAMoC,SAAQ0E,YAE/B1E,IAMT,OAFAwJ,EAAUA,EAAQlb,OAAO0R,QAA6B,IAAZA,GAEtCwJ,EAAQ5T,OAAS,EACZ4T,EACEwT,EACF,CAACA,GAED,IAIXtyB,EAAQohB,eAAiB,CAACiR,EAAKnf,EAAMof,IACnCF,EAAQ/Y,OACN,CAACmZ,EAAUC,IACTA,EAAKzY,OAAOqY,GACRG,EAAStX,KAAK,IAAMuX,EAAKzY,OAAOqY,GAAKnf,EAAMuf,EAAK7pB,UAChD4pB,EACNxhB,QAAQ9O,a","file":"app-6a665d0d1f5bf65820ca.js","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.withPrefix = withPrefix;\nexports.withAssetPrefix = withAssetPrefix;\nexports.navigateTo = exports.replace = exports.push = exports.navigate = exports.default = void 0;\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _router = require(\"@reach/router\");\n\nvar _utils = require(\"@reach/router/lib/utils\");\n\nvar _parsePath = require(\"./parse-path\");\n\nexports.parsePath = _parsePath.parsePath;\n\nvar isAbsolutePath = function isAbsolutePath(path) {\n return path === null || path === void 0 ? void 0 : path.startsWith(\"/\");\n};\n\nfunction withPrefix(path, prefix) {\n var _ref, _prefix;\n\n if (prefix === void 0) {\n prefix = getGlobalBasePrefix();\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n if (path.startsWith(\"./\") || path.startsWith(\"../\")) {\n return path;\n }\n\n var base = (_ref = (_prefix = prefix) !== null && _prefix !== void 0 ? _prefix : getGlobalPathPrefix()) !== null && _ref !== void 0 ? _ref : \"/\";\n return \"\" + ((base === null || base === void 0 ? void 0 : base.endsWith(\"/\")) ? base.slice(0, -1) : base) + (path.startsWith(\"/\") ? path : \"/\" + path);\n} // These global values are wrapped in typeof clauses to ensure the values exist.\n// This is especially problematic in unit testing of this component.\n\n\nvar getGlobalPathPrefix = function getGlobalPathPrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __PATH_PREFIX__ !== \"undefined\" ? __PATH_PREFIX__ : undefined : __PATH_PREFIX__;\n};\n\nvar getGlobalBasePrefix = function getGlobalBasePrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __BASE_PATH__ !== \"undefined\" ? __BASE_PATH__ : undefined : __BASE_PATH__;\n};\n\nvar isLocalLink = function isLocalLink(path) {\n return path && !path.startsWith(\"http://\") && !path.startsWith(\"https://\") && !path.startsWith(\"//\");\n};\n\nfunction withAssetPrefix(path) {\n return withPrefix(path, getGlobalPathPrefix());\n}\n\nfunction absolutify(path, current) {\n // If it's already absolute, return as-is\n if (isAbsolutePath(path)) {\n return path;\n }\n\n return (0, _utils.resolve)(path, current);\n}\n\nvar rewriteLinkPath = function rewriteLinkPath(path, relativeTo) {\n if (typeof path === \"number\") {\n return path;\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n return isAbsolutePath(path) ? withPrefix(path) : absolutify(path, relativeTo);\n};\n\nvar NavLinkPropTypes = {\n activeClassName: _propTypes.default.string,\n activeStyle: _propTypes.default.object,\n partiallyActive: _propTypes.default.bool\n}; // Set up IntersectionObserver\n\nvar createIntersectionObserver = function createIntersectionObserver(el, cb) {\n var io = new window.IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n if (el === entry.target) {\n // Check if element is within viewport, remove listener, destroy observer, and run link callback.\n // MSEdge doesn't currently support isIntersecting, so also test for an intersectionRatio > 0\n if (entry.isIntersecting || entry.intersectionRatio > 0) {\n io.unobserve(el);\n io.disconnect();\n cb();\n }\n }\n });\n }); // Add element to the observer\n\n io.observe(el);\n return {\n instance: io,\n el: el\n };\n};\n\nfunction GatsbyLinkLocationWrapper(props) {\n return /*#__PURE__*/_react.default.createElement(_router.Location, null, function (_ref2) {\n var location = _ref2.location;\n return /*#__PURE__*/_react.default.createElement(GatsbyLink, (0, _extends2.default)({}, props, {\n _location: location\n }));\n });\n}\n\nvar GatsbyLink = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(GatsbyLink, _React$Component);\n\n function GatsbyLink(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // Default to no support for IntersectionObserver\n\n _this.defaultGetProps = function (_ref3) {\n var isPartiallyCurrent = _ref3.isPartiallyCurrent,\n isCurrent = _ref3.isCurrent;\n\n if (_this.props.partiallyActive ? isPartiallyCurrent : isCurrent) {\n return {\n className: [_this.props.className, _this.props.activeClassName].filter(Boolean).join(\" \"),\n style: (0, _extends2.default)({}, _this.props.style, _this.props.activeStyle)\n };\n }\n\n return null;\n };\n\n var IOSupported = false;\n\n if (typeof window !== \"undefined\" && window.IntersectionObserver) {\n IOSupported = true;\n }\n\n _this.state = {\n IOSupported: IOSupported\n };\n _this.handleRef = _this.handleRef.bind((0, _assertThisInitialized2.default)(_this));\n return _this;\n }\n\n var _proto = GatsbyLink.prototype;\n\n _proto._prefetch = function _prefetch() {\n var currentPath = window.location.pathname; // reach router should have the correct state\n\n if (this.props._location && this.props._location.pathname) {\n currentPath = this.props._location.pathname;\n }\n\n var rewrittenPath = rewriteLinkPath(this.props.to, currentPath);\n var newPathName = (0, _parsePath.parsePath)(rewrittenPath).pathname; // Prefech is used to speed up next navigations. When you use it on the current navigation,\n // there could be a race-condition where Chrome uses the stale data instead of waiting for the network to complete\n\n if (currentPath !== newPathName) {\n ___loader.enqueue(newPathName);\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Preserve non IO functionality if no support\n if (this.props.to !== prevProps.to && !this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n // Preserve non IO functionality if no support\n if (!this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (!this.io) {\n return;\n }\n\n var _this$io = this.io,\n instance = _this$io.instance,\n el = _this$io.el;\n instance.unobserve(el);\n instance.disconnect();\n };\n\n _proto.handleRef = function handleRef(ref) {\n var _this2 = this;\n\n if (this.props.innerRef && this.props.innerRef.hasOwnProperty(\"current\")) {\n this.props.innerRef.current = ref;\n } else if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n if (this.state.IOSupported && ref) {\n // If IO supported and element reference found, setup Observer functionality\n this.io = createIntersectionObserver(ref, function () {\n _this2._prefetch();\n });\n }\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var _this$props = this.props,\n to = _this$props.to,\n _this$props$getProps = _this$props.getProps,\n getProps = _this$props$getProps === void 0 ? this.defaultGetProps : _this$props$getProps,\n _onClick = _this$props.onClick,\n _onMouseEnter = _this$props.onMouseEnter,\n $activeClassName = _this$props.activeClassName,\n $activeStyle = _this$props.activeStyle,\n $innerRef = _this$props.innerRef,\n partiallyActive = _this$props.partiallyActive,\n state = _this$props.state,\n replace = _this$props.replace,\n _location = _this$props._location,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"to\", \"getProps\", \"onClick\", \"onMouseEnter\", \"activeClassName\", \"activeStyle\", \"innerRef\", \"partiallyActive\", \"state\", \"replace\", \"_location\"]);\n\n if (process.env.NODE_ENV !== \"production\" && !isLocalLink(to)) {\n console.warn(\"External link \" + to + \" was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links\");\n }\n\n var prefixedTo = rewriteLinkPath(to, _location.pathname);\n\n if (!isLocalLink(prefixedTo)) {\n return /*#__PURE__*/_react.default.createElement(\"a\", (0, _extends2.default)({\n href: prefixedTo\n }, rest));\n }\n\n return /*#__PURE__*/_react.default.createElement(_router.Link, (0, _extends2.default)({\n to: prefixedTo,\n state: state,\n getProps: getProps,\n innerRef: this.handleRef,\n onMouseEnter: function onMouseEnter(e) {\n if (_onMouseEnter) {\n _onMouseEnter(e);\n }\n\n ___loader.hovering((0, _parsePath.parsePath)(prefixedTo).pathname);\n },\n onClick: function onClick(e) {\n if (_onClick) {\n _onClick(e);\n }\n\n if (e.button === 0 && // ignore right clicks\n !_this3.props.target && // let browser handle \"target=_blank\"\n !e.defaultPrevented && // onClick prevented default\n !e.metaKey && // ignore clicks with modifier keys...\n !e.altKey && !e.ctrlKey && !e.shiftKey) {\n e.preventDefault();\n var shouldReplace = replace;\n\n var isCurrent = encodeURI(prefixedTo) === _location.pathname;\n\n if (typeof replace !== \"boolean\" && isCurrent) {\n shouldReplace = true;\n } // Make sure the necessary scripts and data are\n // loaded before continuing.\n\n\n window.___navigate(prefixedTo, {\n state: state,\n replace: shouldReplace\n });\n }\n\n return true;\n }\n }, rest));\n };\n\n return GatsbyLink;\n}(_react.default.Component);\n\nGatsbyLink.propTypes = (0, _extends2.default)({}, NavLinkPropTypes, {\n onClick: _propTypes.default.func,\n to: _propTypes.default.string.isRequired,\n replace: _propTypes.default.bool,\n state: _propTypes.default.object\n});\n\nvar showDeprecationWarning = function showDeprecationWarning(functionName, altFunctionName, version) {\n return console.warn(\"The \\\"\" + functionName + \"\\\" method is now deprecated and will be removed in Gatsby v\" + version + \". Please use \\\"\" + altFunctionName + \"\\\" instead.\");\n};\n\nvar _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n return /*#__PURE__*/_react.default.createElement(GatsbyLinkLocationWrapper, (0, _extends2.default)({\n innerRef: ref\n }, props));\n});\n\nexports.default = _default;\n\nvar navigate = function navigate(to, options) {\n window.___navigate(rewriteLinkPath(to, window.location.pathname), options);\n};\n\nexports.navigate = navigate;\n\nvar push = function push(to) {\n showDeprecationWarning(\"push\", \"navigate\", 3);\n\n window.___push(rewriteLinkPath(to, window.location.pathname));\n};\n\nexports.push = push;\n\nvar replace = function replace(to) {\n showDeprecationWarning(\"replace\", \"navigate\", 3);\n\n window.___replace(rewriteLinkPath(to, window.location.pathname));\n}; // TODO: Remove navigateTo for Gatsby v3\n\n\nexports.replace = replace;\n\nvar navigateTo = function navigateTo(to) {\n showDeprecationWarning(\"navigateTo\", \"navigate\", 3);\n return push(to);\n};\n\nexports.navigateTo = navigateTo;","\"use strict\";\n\nexports.__esModule = true;\nexports.SessionStorage = void 0;\nvar STATE_KEY_PREFIX = \"@@scroll|\";\nvar GATSBY_ROUTER_SCROLL_STATE = \"___GATSBY_REACT_ROUTER_SCROLL\";\n\nvar SessionStorage = /*#__PURE__*/function () {\n function SessionStorage() {}\n\n var _proto = SessionStorage.prototype;\n\n _proto.read = function read(location, key) {\n var stateKey = this.getStateKey(location, key);\n\n try {\n var value = window.sessionStorage.getItem(stateKey);\n return value ? JSON.parse(value) : 0;\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to access sessionStorage; sessionStorage is not available.\");\n }\n\n if (window && window[GATSBY_ROUTER_SCROLL_STATE] && window[GATSBY_ROUTER_SCROLL_STATE][stateKey]) {\n return window[GATSBY_ROUTER_SCROLL_STATE][stateKey];\n }\n\n return 0;\n }\n };\n\n _proto.save = function save(location, key, value) {\n var stateKey = this.getStateKey(location, key);\n var storedValue = JSON.stringify(value);\n\n try {\n window.sessionStorage.setItem(stateKey, storedValue);\n } catch (e) {\n if (window && window[GATSBY_ROUTER_SCROLL_STATE]) {\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n } else {\n window[GATSBY_ROUTER_SCROLL_STATE] = {};\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to save state in sessionStorage; sessionStorage is not available.\");\n }\n }\n };\n\n _proto.getStateKey = function getStateKey(location, key) {\n var stateKeyBase = \"\" + STATE_KEY_PREFIX + location.pathname;\n return key === null || typeof key === \"undefined\" ? stateKeyBase : stateKeyBase + \"|\" + key;\n };\n\n return SessionStorage;\n}();\n\nexports.SessionStorage = SessionStorage;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n var cache = _getRequireWildcardCache(nodeInterop);\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj[\"default\"] = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nmodule.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default path => {\n if (path === undefined) {\n return path\n }\n if (path === `/`) {\n return `/`\n }\n if (path.charAt(path.length - 1) === `/`) {\n return path.slice(0, -1)\n }\n return path\n}\n","import { pick } from \"@reach/router/lib/utils\"\nimport stripPrefix from \"./strip-prefix\"\nimport normalizePagePath from \"./normalize-page-path\"\n\nconst pathCache = new Map()\nlet matchPaths = []\n\nconst trimPathname = rawPathname => {\n const pathname = decodeURIComponent(rawPathname)\n // Remove the pathPrefix from the pathname.\n const trimmedPathname = stripPrefix(pathname, __BASE_PATH__)\n // Remove any hashfragment\n .split(`#`)[0]\n // Remove search query\n .split(`?`)[0]\n\n return trimmedPathname\n}\n\nfunction absolutify(path) {\n // If it's already absolute, return as-is\n if (\n path.startsWith(`/`) ||\n path.startsWith(`https://`) ||\n path.startsWith(`http://`)\n ) {\n return path\n }\n // Calculate path relative to current location, adding a trailing slash to\n // match behavior of @reach/router\n return new URL(\n path,\n window.location.href + (window.location.href.endsWith(`/`) ? `` : `/`)\n ).pathname\n}\n\n/**\n * Set list of matchPaths\n *\n * @param {Array<{path: string, matchPath: string}>} value collection of matchPaths\n */\nexport const setMatchPaths = value => {\n matchPaths = value\n}\n\n/**\n * Return a matchpath url\n * if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n * `/foo?bar=far` => `/page1`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string|null}\n */\nexport const findMatchPath = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return normalizePagePath(path.route.originalPath)\n }\n\n return null\n}\n\n/**\n * Return a matchpath params from reach/router rules\n * if `match-paths.json` contains `{ \":bar/*foo\" }`, and the path is /baz/zaz/zoo\n * then it returns\n * { bar: baz, foo: zaz/zoo }\n *\n * @param {string} rawPathname A raw pathname\n * @return {object}\n */\nexport const grabMatchParams = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return path.params\n }\n\n return {}\n}\n\n// Given a raw URL path, returns the cleaned version of it (trim off\n// `#` and query params), or if it matches an entry in\n// `match-paths.json`, its matched path is returned\n//\n// E.g. `/foo?bar=far` => `/foo`\n//\n// Or if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n// `/foo?bar=far` => `/page1`\nexport const findPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n if (pathCache.has(trimmedPathname)) {\n return pathCache.get(trimmedPathname)\n }\n\n let foundPath = findMatchPath(trimmedPathname)\n\n if (!foundPath) {\n foundPath = cleanPath(rawPathname)\n }\n\n pathCache.set(trimmedPathname, foundPath)\n\n return foundPath\n}\n\n/**\n * Clean a url and converts /index.html => /\n * E.g. `/foo?bar=far` => `/foo`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string}\n */\nexport const cleanPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n\n let foundPath = trimmedPathname\n if (foundPath === `/index.html`) {\n foundPath = `/`\n }\n\n foundPath = normalizePagePath(foundPath)\n\n return foundPath\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = useScrollRestoration;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _react = require(\"react\");\n\nvar _router = require(\"@reach/router\");\n\nfunction useScrollRestoration(identifier) {\n var location = (0, _router.useLocation)();\n var state = (0, _react.useContext)(_scrollHandler.ScrollContext);\n var ref = (0, _react.useRef)();\n (0, _react.useLayoutEffect)(function () {\n if (ref.current) {\n var position = state.read(location, identifier);\n ref.current.scrollTo(0, position || 0);\n }\n }, []);\n return {\n ref: ref,\n onScroll: function onScroll() {\n if (ref.current) {\n state.save(location, identifier, ref.current.scrollTop);\n }\n }\n };\n}","import mitt from \"mitt\"\n\nconst emitter = mitt()\nexport default emitter\n","// \n// An event handler can take an optional event argument\n// and should not return a value\n \n \n\n// An array of all currently registered event handlers for a type\n \n \n// A map of event types and their corresponding event handlers.\n \n \n \n \n\n/** Mitt: Tiny (~200b) functional event emitter / pubsub.\n * @name mitt\n * @returns {Mitt}\n */\nfunction mitt(all ) {\n\tall = all || Object.create(null);\n\n\treturn {\n\t\t/**\n\t\t * Register an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to listen for, or `\"*\"` for all events\n\t\t * @param {Function} handler Function to call in response to given event\n\t\t * @memberOf mitt\n\t\t */\n\t\ton: function on(type , handler ) {\n\t\t\t(all[type] || (all[type] = [])).push(handler);\n\t\t},\n\n\t\t/**\n\t\t * Remove an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to unregister `handler` from, or `\"*\"`\n\t\t * @param {Function} handler Handler function to remove\n\t\t * @memberOf mitt\n\t\t */\n\t\toff: function off(type , handler ) {\n\t\t\tif (all[type]) {\n\t\t\t\tall[type].splice(all[type].indexOf(handler) >>> 0, 1);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Invoke all handlers for the given type.\n\t\t * If present, `\"*\"` handlers are invoked after type-matched handlers.\n\t\t *\n\t\t * @param {String} type The event type to invoke\n\t\t * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler\n\t\t * @memberOf mitt\n\t\t */\n\t\temit: function emit(type , evt ) {\n\t\t\t(all[type] || []).slice().map(function (handler) { handler(evt); });\n\t\t\t(all['*'] || []).slice().map(function (handler) { handler(type, evt); });\n\t\t}\n\t};\n}\n\nexport default mitt;\n//# sourceMappingURL=mitt.es.js.map\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = exports.ScrollContainer = exports.ScrollContext = void 0;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nexports.ScrollContext = _scrollHandler.ScrollHandler;\n\nvar _scrollContainer = require(\"./scroll-container\");\n\nexports.ScrollContainer = _scrollContainer.ScrollContainer;\n\nvar _useScrollRestoration = require(\"./use-scroll-restoration\");\n\nexports.useScrollRestoration = _useScrollRestoration.useScrollRestoration;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","exports.polyfill = Component => Component\n","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n\n\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\n\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n var resolveTransition = function resolveTransition() {};\n\n return {\n get location() {\n return location;\n },\n\n get transitioning() {\n return transitioning;\n },\n\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({ location: location, action: \"POP\" });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, { key: Date.now() + \"\" });\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({ location: location, action: \"PUSH\" });\n });\n return transition;\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n\n return {\n get location() {\n return stack[index];\n },\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n\n index++;\n stack.push({ pathname: pathname, search: search.length ? \"?\" + search : search });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n\n stack[index] = { pathname: pathname, search: search };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n\n index = newIndex;\n }\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\n\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate;\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport { globalHistory, navigate, createHistory, createMemorySource };","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @return string\n */\nvar _default = function _default(pathname, localizedManifests) {\n var defaultFilename = \"manifest.webmanifest\";\n\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n\n var localizedManifest = localizedManifests.find(function (app) {\n return pathname.startsWith(app.start_url);\n });\n\n if (!localizedManifest) {\n return defaultFilename;\n }\n\n return \"manifest_\" + localizedManifest.lang + \".webmanifest\";\n};\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollHandler = exports.ScrollContext = void 0;\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _sessionStorage = require(\"./session-storage\");\n\nvar ScrollContext = /*#__PURE__*/React.createContext(new _sessionStorage.SessionStorage());\nexports.ScrollContext = ScrollContext;\nScrollContext.displayName = \"GatsbyScrollContext\";\n\nvar ScrollHandler = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollHandler, _React$Component);\n\n function ScrollHandler() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this._stateStorage = new _sessionStorage.SessionStorage();\n\n _this.scrollListener = function () {\n var key = _this.props.location.key;\n\n if (key) {\n _this._stateStorage.save(_this.props.location, key, window.scrollY);\n }\n };\n\n _this.windowScroll = function (position, prevProps) {\n if (_this.shouldUpdateScroll(prevProps, _this.props)) {\n window.scrollTo(0, position);\n }\n };\n\n _this.scrollToHash = function (hash, prevProps) {\n var node = document.getElementById(hash.substring(1));\n\n if (node && _this.shouldUpdateScroll(prevProps, _this.props)) {\n node.scrollIntoView();\n }\n };\n\n _this.shouldUpdateScroll = function (prevRouterProps, routerProps) {\n var shouldUpdateScroll = _this.props.shouldUpdateScroll;\n\n if (!shouldUpdateScroll) {\n return true;\n } // Hack to allow accessing this._stateStorage.\n\n\n return shouldUpdateScroll.call((0, _assertThisInitialized2.default)(_this), prevRouterProps, routerProps);\n };\n\n return _this;\n }\n\n var _proto = ScrollHandler.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n window.addEventListener(\"scroll\", this.scrollListener);\n var scrollPosition;\n var _this$props$location = this.props.location,\n key = _this$props$location.key,\n hash = _this$props$location.hash;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n\n if (scrollPosition) {\n this.windowScroll(scrollPosition, undefined);\n } else if (hash) {\n this.scrollToHash(decodeURI(hash), undefined);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.scrollListener);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props$location2 = this.props.location,\n hash = _this$props$location2.hash,\n key = _this$props$location2.key;\n var scrollPosition;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n /** There are two pieces of state: the browser url and\n * history state which keeps track of scroll position\n * Native behaviour prescribes that we ought to restore scroll position\n * when a user navigates back in their browser (this is the `POP` action)\n * Currently, reach router has a bug that prevents this at https://github.com/reach/router/issues/228\n * So we _always_ stick to the url as a source of truth — if the url\n * contains a hash, we scroll to it\n */\n\n\n if (hash) {\n this.scrollToHash(decodeURI(hash), prevProps);\n } else {\n this.windowScroll(scrollPosition, prevProps);\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(ScrollContext.Provider, {\n value: this._stateStorage\n }, this.props.children);\n };\n\n return ScrollHandler;\n}(React.Component);\n\nexports.ScrollHandler = ScrollHandler;\nScrollHandler.propTypes = {\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired,\n location: _propTypes.default.object.isRequired\n};","import React, { createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { publicLoader } from \"./loader\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\n\n// Renders page\nclass PageRenderer extends React.Component {\n render() {\n const props = {\n ...this.props,\n params: {\n ...grabMatchParams(this.props.location.pathname),\n ...this.props.pageResources.json.pageContext.__params,\n },\n pathContext: this.props.pageContext,\n }\n\n const [replacementElement] = apiRunner(`replaceComponentRenderer`, {\n props: this.props,\n loader: publicLoader,\n })\n\n const pageElement =\n replacementElement ||\n createElement(this.props.pageResources.component, {\n ...props,\n key: this.props.path || this.props.pageResources.page.path,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n { element: pageElement, props },\n pageElement,\n ({ result }) => {\n return { element: result, props }\n }\n ).pop()\n\n return wrappedPage\n }\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import invariant from \"invariant\";\n\n////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n var dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : invariant(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\nvar match = function match(path, uri) {\n return pick([{ path: path }], uri);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\n};\n\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar paramRe = /^:(.+)/;\n\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\n\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\n\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return { route: route, score: score, index: index };\n};\n\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\n\nvar segmentize = function segmentize(uri) {\n return uri\n // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\n\nvar addQuery = function addQuery(pathname) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\n};\n\nvar reservedNames = [\"uri\", \"path\"];\n\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n};\n\n////////////////////////////////////////////////////////////////////////////////\nexport { startsWith, pick, match, resolve, insertParams, validateRedirect, shallowCompare };","module.exports = [{\n plugin: require('../node_modules/gatsby-remark-images/gatsby-browser.js'),\n options: {\"plugins\":[],\"maxWidth\":590,\"linkImagesToOriginal\":true,\"showCaptions\":false,\"markdownCaptions\":false,\"sizeByPixelDensity\":false,\"backgroundColor\":\"white\",\"quality\":50,\"withWebp\":false,\"tracedSVG\":false,\"loading\":\"lazy\",\"disableBgImageOnAlpha\":false,\"disableBgImage\":false},\n },{\n plugin: require('../node_modules/gatsby-plugin-google-analytics/gatsby-browser.js'),\n options: {\"plugins\":[],\"head\":false,\"anonymize\":false,\"respectDNT\":false,\"exclude\":[],\"pageTransitionDelay\":0},\n },{\n plugin: require('../node_modules/gatsby-plugin-manifest/gatsby-browser.js'),\n options: {\"plugins\":[],\"name\":\"SmartBlock\",\"short_name\":\"SmartBlock\",\"start_url\":\"/\",\"background_color\":\"#ffffff\",\"theme_color\":\"#663399\",\"display\":\"minimal-ui\",\"icon\":\"static/favicon.png\",\"legacy\":true,\"theme_color_in_head\":true,\"cache_busting_mode\":\"query\",\"crossOrigin\":\"anonymous\",\"include_favicon\":true,\"cacheDigest\":\"084321a740e799687cc736487af34310\"},\n },{\n plugin: require('../gatsby-browser.js'),\n options: {\"plugins\":[]},\n }]\n","/*!\n * domready (c) Dustin Diaz 2014 - License MIT\n * ie10 fix - Mikael Kristiansson 2019\n */\n!(function(name, definition) {\n if (typeof module != \"undefined\") module.exports = definition();\n else if (typeof define == \"function\" && typeof define.amd == \"object\")\n define(definition);\n else this[name] = definition();\n})(\"domready\", function() {\n var ie10 = false;\n if (navigator.appVersion.indexOf(\"MSIE 10\") !== -1) {\n ie10 = true;\n }\n\n var fns = [],\n listener,\n doc = typeof document === \"object\" && document,\n hack = ie10\n ? doc.documentElement.doScroll(\"left\")\n : doc.documentElement.doScroll,\n domContentLoaded = \"DOMContentLoaded\",\n loaded =\n doc && (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);\n\n if (!loaded && doc)\n doc.addEventListener(\n domContentLoaded,\n (listener = function() {\n doc.removeEventListener(domContentLoaded, listener);\n loaded = 1;\n while ((listener = fns.shift())) listener();\n })\n );\n\n return function(fn) {\n loaded ? setTimeout(fn, 0) : fns.push(fn);\n };\n});\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","// prefer default export if available\nconst preferDefault = m => (m && m.default) || m\n\nexports.components = {\n \"component---src-pages-404-js\": () => import(\"./../../../src/pages/404.js\" /* webpackChunkName: \"component---src-pages-404-js\" */),\n \"component---src-pages-index-js\": () => import(\"./../../../src/pages/index.js\" /* webpackChunkName: \"component---src-pages-index-js\" */),\n \"component---src-templates-blog-post-js\": () => import(\"./../../../src/templates/blog-post.js\" /* webpackChunkName: \"component---src-templates-blog-post-js\" */)\n}\n\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport redirects from \"./redirects.json\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport { navigate as reachNavigate } from \"@reach/router\"\nimport { globalHistory } from \"@reach/router/lib/history\"\nimport { parsePath } from \"gatsby-link\"\n\n// Convert to a map for faster lookup in maybeRedirect()\n\nconst redirectMap = new Map()\nconst redirectIgnoreCaseMap = new Map()\n\nredirects.forEach(redirect => {\n if (redirect.ignoreCase) {\n redirectIgnoreCaseMap.set(redirect.fromPath, redirect)\n } else {\n redirectMap.set(redirect.fromPath, redirect)\n }\n})\n\nfunction maybeRedirect(pathname) {\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n\n if (redirect != null) {\n if (process.env.NODE_ENV !== `production`) {\n if (!loader.isPageNotFound(pathname)) {\n console.error(\n `The route \"${pathname}\" matches both a page and a redirect; this is probably not intentional.`\n )\n }\n }\n\n window.___replace(redirect.toPath)\n return true\n } else {\n return false\n }\n}\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_EXPERIMENTAL_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n let { pathname } = parsePath(to)\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath\n pathname = parsePath(to).pathname\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n\n // Check for initial page-load redirect\n maybeRedirect(window.location.pathname)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
      \n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onPreRouteUpdate(this.props.location, prevProps.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n \n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources: pageResources || loader.loadPageSync(location.pathname),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(location.pathname)\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (process.env.NODE_ENV !== `production` && !this.state.pageResources) {\n throw new Error(\n `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n )\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { Router, navigate, Location, BaseContext } from \"@reach/router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport domReady from \"@mikaelkristiansson/domready\"\nimport { StaticQueryContext } from \"gatsby\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n \n \n \n )\n\n const DataContext = React.createContext({})\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n \n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n return (\n \n \n {children}\n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n \n {({ pageResources, location }) => (\n \n \n \n \n
      \n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). But\n // only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !== browserLoc.pathname &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath === `/404.html` ||\n pagePath.match(/^\\/404\\/?$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(__BASE_PATH__ + pagePath + browserLoc.search + browserLoc.hash, {\n replace: true,\n })\n }\n\n publicLoader.loadPage(browserLoc.pathname).then(page => {\n if (!page || page.status === PageResourceStatus.Error) {\n throw new Error(\n `page resources for ${browserLoc.pathname} not found. Not rendering React`\n )\n }\n\n window.___webpackCompilationHash = page.page.webpackCompilationHash\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element: },\n ,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = () => {SiteRoot}\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n ReactDOM.hydrate\n )[0]\n\n domReady(() => {\n renderer(\n ,\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : void 0,\n () => {\n apiRunner(`onInitialClientRender`)\n }\n )\n })\n })\n})\n","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Link, {\n withPrefix,\n withAssetPrefix,\n navigate,\n push,\n replace,\n navigateTo,\n parsePath,\n} from \"gatsby-link\"\nimport { useScrollRestoration } from \"gatsby-react-router-scroll\"\nimport PageRenderer from \"./public-page-renderer\"\nimport loader from \"./loader\"\n\nconst prefetchPathname = loader.enqueue\n\nconst StaticQueryContext = React.createContext({})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n \n {finalData && render(finalData)}\n {!finalData &&
      Loading (StaticQuery)
      }\n
      \n )\n}\n\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n return (\n \n {staticQueryData => (\n \n )}\n \n )\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nfunction graphql() {\n throw new Error(\n `It appears like Gatsby is misconfigured. Gatsby related \\`graphql\\` calls ` +\n `are supposed to only be evaluated at compile time, and then compiled away. ` +\n `Unfortunately, something went wrong and the query was left in the compiled code.\\n\\n` +\n `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`\n )\n}\n\nexport {\n Link,\n withAssetPrefix,\n withPrefix,\n graphql,\n parsePath,\n navigate,\n push, // TODO replace for v3\n replace, // TODO remove replace for v3\n navigateTo, // TODO: remove navigateTo for v3\n useScrollRestoration,\n StaticQueryContext,\n StaticQuery,\n PageRenderer,\n useStaticQuery,\n prefetchPathname,\n}\n","\"use strict\";\n\nmodule.exports = Object.assign;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint-disable jsx-a11y/anchor-has-content */\nimport React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport createContext from \"create-react-context\";\nimport { polyfill } from \"react-lifecycles-compat\";\nimport { startsWith, pick, resolve, match, insertParams, validateRedirect, shallowCompare } from \"./lib/utils\";\nimport { globalHistory, navigate, createHistory, createMemorySource } from \"./lib/history\";\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar createNamedContext = function createNamedContext(name, defaultValue) {\n var Ctx = createContext(defaultValue);\n Ctx.displayName = name;\n return Ctx;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Location Context/Provider\nvar LocationContext = createNamedContext(\"Location\");\n\n// sets up a listener if there isn't one already so apps don't need to be\n// wrapped in some top level provider\nvar Location = function Location(_ref) {\n var children = _ref.children;\n return React.createElement(\n LocationContext.Consumer,\n null,\n function (context) {\n return context ? children(context) : React.createElement(\n LocationProvider,\n null,\n children\n );\n }\n );\n};\n\nvar LocationProvider = function (_React$Component) {\n _inherits(LocationProvider, _React$Component);\n\n function LocationProvider() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, LocationProvider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n context: _this.getContext(),\n refs: { unlisten: null }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n LocationProvider.prototype.getContext = function getContext() {\n var _props$history = this.props.history,\n navigate = _props$history.navigate,\n location = _props$history.location;\n\n return { navigate: navigate, location: location };\n };\n\n LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {\n if (isRedirect(error)) {\n var _navigate = this.props.history.navigate;\n\n _navigate(error.uri, { replace: true });\n } else {\n throw error;\n }\n };\n\n LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevState.context.location !== this.state.context.location) {\n this.props.history._onTransitionComplete();\n }\n };\n\n LocationProvider.prototype.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n var refs = this.state.refs,\n history = this.props.history;\n\n history._onTransitionComplete();\n refs.unlisten = history.listen(function () {\n Promise.resolve().then(function () {\n // TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306\n requestAnimationFrame(function () {\n if (!_this2.unmounted) {\n _this2.setState(function () {\n return { context: _this2.getContext() };\n });\n }\n });\n });\n });\n };\n\n LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n var refs = this.state.refs;\n\n this.unmounted = true;\n refs.unlisten();\n };\n\n LocationProvider.prototype.render = function render() {\n var context = this.state.context,\n children = this.props.children;\n\n return React.createElement(\n LocationContext.Provider,\n { value: context },\n typeof children === \"function\" ? children(context) : children || null\n );\n };\n\n return LocationProvider;\n}(React.Component);\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nLocationProvider.defaultProps = {\n history: globalHistory\n};\nprocess.env.NODE_ENV !== \"production\" ? LocationProvider.propTypes = {\n history: PropTypes.object.isRequired\n} : void 0;\nvar ServerLocation = function ServerLocation(_ref2) {\n var url = _ref2.url,\n children = _ref2.children;\n\n var searchIndex = url.indexOf(\"?\");\n var searchExists = searchIndex > -1;\n var pathname = void 0;\n var search = \"\";\n var hash = \"\";\n\n if (searchExists) {\n pathname = url.substring(0, searchIndex);\n search = url.substring(searchIndex);\n } else {\n pathname = url;\n }\n\n return React.createElement(\n LocationContext.Provider,\n {\n value: {\n location: {\n pathname: pathname,\n search: search,\n hash: hash\n },\n navigate: function navigate() {\n throw new Error(\"You can't call navigate on the server.\");\n }\n }\n },\n children\n );\n};\n////////////////////////////////////////////////////////////////////////////////\n// Sets baseuri and basepath for nested routers and links\nvar BaseContext = createNamedContext(\"Base\", { baseuri: \"/\", basepath: \"/\" });\n\n////////////////////////////////////////////////////////////////////////////////\n// The main event, welcome to the show everybody.\nvar Router = function Router(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (baseContext) {\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RouterImpl, _extends({}, baseContext, locationContext, props));\n }\n );\n }\n );\n};\n\nvar RouterImpl = function (_React$PureComponent) {\n _inherits(RouterImpl, _React$PureComponent);\n\n function RouterImpl() {\n _classCallCheck(this, RouterImpl);\n\n return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));\n }\n\n RouterImpl.prototype.render = function render() {\n var _props = this.props,\n location = _props.location,\n _navigate2 = _props.navigate,\n basepath = _props.basepath,\n primary = _props.primary,\n children = _props.children,\n baseuri = _props.baseuri,\n _props$component = _props.component,\n component = _props$component === undefined ? \"div\" : _props$component,\n domProps = _objectWithoutProperties(_props, [\"location\", \"navigate\", \"basepath\", \"primary\", \"children\", \"baseuri\", \"component\"]);\n\n var routes = React.Children.toArray(children).reduce(function (array, child) {\n var routes = createRoute(basepath)(child);\n return array.concat(routes);\n }, []);\n var pathname = location.pathname;\n\n\n var match = pick(routes, pathname);\n\n if (match) {\n var params = match.params,\n uri = match.uri,\n route = match.route,\n element = match.route.value;\n\n // remove the /* from the end for child routes relative paths\n\n basepath = route.default ? basepath : route.path.replace(/\\*$/, \"\");\n\n var props = _extends({}, params, {\n uri: uri,\n location: location,\n navigate: function navigate(to, options) {\n return _navigate2(resolve(to, uri), options);\n }\n });\n\n var clone = React.cloneElement(element, props, element.props.children ? React.createElement(\n Router,\n { location: location, primary: primary },\n element.props.children\n ) : undefined);\n\n // using 'div' for < 16.3 support\n var FocusWrapper = primary ? FocusHandler : component;\n // don't pass any props to 'div'\n var wrapperProps = primary ? _extends({ uri: uri, location: location, component: component }, domProps) : domProps;\n\n return React.createElement(\n BaseContext.Provider,\n { value: { baseuri: uri, basepath: basepath } },\n React.createElement(\n FocusWrapper,\n wrapperProps,\n clone\n )\n );\n } else {\n // Not sure if we want this, would require index routes at every level\n // warning(\n // false,\n // `\\n\\nNothing matched:\\n\\t${\n // location.pathname\n // }\\n\\nPaths checked: \\n\\t${routes\n // .map(route => route.path)\n // .join(\n // \"\\n\\t\"\n // )}\\n\\nTo get rid of this warning, add a default NotFound component as child of Router:\n // \\n\\tlet NotFound = () =>
      Not Found!
      \n // \\n\\t\\n\\t \\n\\t {/* ... */}\\n\\t`\n // );\n return null;\n }\n };\n\n return RouterImpl;\n}(React.PureComponent);\n\nRouterImpl.defaultProps = {\n primary: true\n};\n\n\nvar FocusContext = createNamedContext(\"Focus\");\n\nvar FocusHandler = function FocusHandler(_ref3) {\n var uri = _ref3.uri,\n location = _ref3.location,\n component = _ref3.component,\n domProps = _objectWithoutProperties(_ref3, [\"uri\", \"location\", \"component\"]);\n\n return React.createElement(\n FocusContext.Consumer,\n null,\n function (requestFocus) {\n return React.createElement(FocusHandlerImpl, _extends({}, domProps, {\n component: component,\n requestFocus: requestFocus,\n uri: uri,\n location: location\n }));\n }\n );\n};\n\n// don't focus on initial render\nvar initialRender = true;\nvar focusHandlerCount = 0;\n\nvar FocusHandlerImpl = function (_React$Component2) {\n _inherits(FocusHandlerImpl, _React$Component2);\n\n function FocusHandlerImpl() {\n var _temp2, _this4, _ret2;\n\n _classCallCheck(this, FocusHandlerImpl);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this4 = _possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {\n if (!_this4.state.shouldFocus && node) {\n node.focus();\n }\n }, _temp2), _possibleConstructorReturn(_this4, _ret2);\n }\n\n FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var initial = prevState.uri == null;\n if (initial) {\n return _extends({\n shouldFocus: true\n }, nextProps);\n } else {\n var myURIChanged = nextProps.uri !== prevState.uri;\n var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;\n return _extends({\n shouldFocus: myURIChanged || navigatedUpToMe\n }, nextProps);\n }\n };\n\n FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {\n focusHandlerCount++;\n this.focus();\n };\n\n FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {\n focusHandlerCount--;\n if (focusHandlerCount === 0) {\n initialRender = true;\n }\n };\n\n FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevProps.location !== this.props.location && this.state.shouldFocus) {\n this.focus();\n }\n };\n\n FocusHandlerImpl.prototype.focus = function focus() {\n if (process.env.NODE_ENV === \"test\") {\n // getting cannot read property focus of null in the tests\n // and that bit of global `initialRender` state causes problems\n // should probably figure it out!\n return;\n }\n\n var requestFocus = this.props.requestFocus;\n\n\n if (requestFocus) {\n requestFocus(this.node);\n } else {\n if (initialRender) {\n initialRender = false;\n } else if (this.node) {\n // React polyfills [autofocus] and it fires earlier than cDM,\n // so we were stealing focus away, this line prevents that.\n if (!this.node.contains(document.activeElement)) {\n this.node.focus();\n }\n }\n }\n };\n\n FocusHandlerImpl.prototype.render = function render() {\n var _this5 = this;\n\n var _props2 = this.props,\n children = _props2.children,\n style = _props2.style,\n requestFocus = _props2.requestFocus,\n _props2$component = _props2.component,\n Comp = _props2$component === undefined ? \"div\" : _props2$component,\n uri = _props2.uri,\n location = _props2.location,\n domProps = _objectWithoutProperties(_props2, [\"children\", \"style\", \"requestFocus\", \"component\", \"uri\", \"location\"]);\n\n return React.createElement(\n Comp,\n _extends({\n style: _extends({ outline: \"none\" }, style),\n tabIndex: \"-1\",\n ref: function ref(n) {\n return _this5.node = n;\n }\n }, domProps),\n React.createElement(\n FocusContext.Provider,\n { value: this.requestFocus },\n this.props.children\n )\n );\n };\n\n return FocusHandlerImpl;\n}(React.Component);\n\npolyfill(FocusHandlerImpl);\n\nvar k = function k() {};\n\n////////////////////////////////////////////////////////////////////////////////\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = function forwardRef(C) {\n return C;\n };\n}\n\nvar Link = forwardRef(function (_ref4, ref) {\n var innerRef = _ref4.innerRef,\n props = _objectWithoutProperties(_ref4, [\"innerRef\"]);\n\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref5) {\n var basepath = _ref5.basepath,\n baseuri = _ref5.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref6) {\n var location = _ref6.location,\n navigate = _ref6.navigate;\n\n var to = props.to,\n state = props.state,\n replace = props.replace,\n _props$getProps = props.getProps,\n getProps = _props$getProps === undefined ? k : _props$getProps,\n anchorProps = _objectWithoutProperties(props, [\"to\", \"state\", \"replace\", \"getProps\"]);\n\n var href = resolve(to, baseuri);\n var encodedHref = encodeURI(href);\n var isCurrent = location.pathname === encodedHref;\n var isPartiallyCurrent = startsWith(location.pathname, encodedHref);\n\n return React.createElement(\"a\", _extends({\n ref: ref || innerRef,\n \"aria-current\": isCurrent ? \"page\" : undefined\n }, anchorProps, getProps({ isCurrent: isCurrent, isPartiallyCurrent: isPartiallyCurrent, href: href, location: location }), {\n href: href,\n onClick: function onClick(event) {\n if (anchorProps.onClick) anchorProps.onClick(event);\n if (shouldNavigate(event)) {\n event.preventDefault();\n var shouldReplace = replace;\n if (typeof replace !== \"boolean\" && isCurrent) {\n var _location$state = _extends({}, location.state),\n key = _location$state.key,\n restState = _objectWithoutProperties(_location$state, [\"key\"]);\n\n shouldReplace = shallowCompare(_extends({}, state), restState);\n }\n navigate(href, {\n state: state,\n replace: shouldReplace\n });\n }\n }\n }));\n }\n );\n }\n );\n});\n\nLink.displayName = \"Link\";\n\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nfunction RedirectRequest(uri) {\n this.uri = uri;\n}\n\nvar isRedirect = function isRedirect(o) {\n return o instanceof RedirectRequest;\n};\n\nvar redirectTo = function redirectTo(to) {\n throw new RedirectRequest(to);\n};\n\nvar RedirectImpl = function (_React$Component3) {\n _inherits(RedirectImpl, _React$Component3);\n\n function RedirectImpl() {\n _classCallCheck(this, RedirectImpl);\n\n return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));\n }\n\n // Support React < 16 with this hook\n RedirectImpl.prototype.componentDidMount = function componentDidMount() {\n var _props3 = this.props,\n navigate = _props3.navigate,\n to = _props3.to,\n from = _props3.from,\n _props3$replace = _props3.replace,\n replace = _props3$replace === undefined ? true : _props3$replace,\n state = _props3.state,\n noThrow = _props3.noThrow,\n baseuri = _props3.baseuri,\n props = _objectWithoutProperties(_props3, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n Promise.resolve().then(function () {\n var resolvedTo = resolve(to, baseuri);\n navigate(insertParams(resolvedTo, props), { replace: replace, state: state });\n });\n };\n\n RedirectImpl.prototype.render = function render() {\n var _props4 = this.props,\n navigate = _props4.navigate,\n to = _props4.to,\n from = _props4.from,\n replace = _props4.replace,\n state = _props4.state,\n noThrow = _props4.noThrow,\n baseuri = _props4.baseuri,\n props = _objectWithoutProperties(_props4, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n var resolvedTo = resolve(to, baseuri);\n if (!noThrow) redirectTo(insertParams(resolvedTo, props));\n return null;\n };\n\n return RedirectImpl;\n}(React.Component);\n\nvar Redirect = function Redirect(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref7) {\n var baseuri = _ref7.baseuri;\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RedirectImpl, _extends({}, locationContext, { baseuri: baseuri }, props));\n }\n );\n }\n );\n};\n\nprocess.env.NODE_ENV !== \"production\" ? Redirect.propTypes = {\n from: PropTypes.string,\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nvar Match = function Match(_ref8) {\n var path = _ref8.path,\n children = _ref8.children;\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref9) {\n var baseuri = _ref9.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref10) {\n var navigate = _ref10.navigate,\n location = _ref10.location;\n\n var resolvedPath = resolve(path, baseuri);\n var result = match(resolvedPath, location.pathname);\n return children({\n navigate: navigate,\n location: location,\n match: result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null\n });\n }\n );\n }\n );\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Hooks\n\nvar useLocation = function useLocation() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.location;\n};\n\nvar useNavigate = function useNavigate() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useNavigate hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.navigate;\n};\n\nvar useParams = function useParams() {\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var results = match(context.basepath, location.pathname);\n\n return results ? results.params : null;\n};\n\nvar useMatch = function useMatch(path) {\n if (!path) {\n throw new Error(\"useMatch(path: string) requires an argument of a string to match against\");\n }\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var resolvedPath = resolve(path, context.baseuri);\n var result = match(resolvedPath, location.pathname);\n return result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar stripSlashes = function stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n};\n\nvar createRoute = function createRoute(basepath) {\n return function (element) {\n if (!element) {\n return null;\n }\n\n if (element.type === React.Fragment && element.props.children) {\n return React.Children.map(element.props.children, createRoute(basepath));\n }\n !(element.props.path || element.props.default || element.type === Redirect) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \": Children of must have a `path` or `default` prop, or be a ``. None found on element type `\" + element.type + \"`\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && (!element.props.from || !element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" requires both \\\"from\\\" and \\\"to\\\" props when inside a .\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && !validateRedirect(element.props.from, element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.\") : invariant(false) : void 0;\n\n if (element.props.default) {\n return { value: element, default: true };\n }\n\n var elementPath = element.type === Redirect ? element.props.from : element.props.path;\n\n var path = elementPath === \"/\" ? basepath : stripSlashes(basepath) + \"/\" + stripSlashes(elementPath);\n\n return {\n value: element,\n default: element.props.default,\n path: element.props.children ? stripSlashes(path) + \"/*\" : path\n };\n };\n};\n\nvar shouldNavigate = function shouldNavigate(event) {\n return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n////////////////////////////////////////////////////////////////////////\nexport { Link, Location, LocationProvider, Match, Redirect, Router, ServerLocation, createHistory, createMemorySource, isRedirect, navigate, redirectTo, globalHistory, match as matchPath, useLocation, useNavigate, useParams, useMatch , BaseContext };","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.parsePath = parsePath;\n\nfunction parsePath(path) {\n var pathname = path || \"/\";\n var search = \"\";\n var hash = \"\";\n var hashIndex = pathname.indexOf(\"#\");\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf(\"?\");\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === \"?\" ? \"\" : search,\n hash: hash === \"#\" ? \"\" : hash\n };\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const support = function (feature) {\n if (typeof document === `undefined`) {\n return false\n }\n const fakeLink = document.createElement(`link`)\n try {\n if (fakeLink.relList && typeof fakeLink.relList.supports === `function`) {\n return fakeLink.relList.supports(feature)\n }\n } catch (err) {\n return false\n }\n return false\n}\n\nconst linkPrefetchStrategy = function (url, options) {\n return new Promise((resolve, reject) => {\n if (typeof document === `undefined`) {\n reject()\n return\n }\n\n const link = document.createElement(`link`)\n link.setAttribute(`rel`, `prefetch`)\n link.setAttribute(`href`, url)\n\n Object.keys(options).forEach(key => {\n link.setAttribute(key, options[key])\n })\n\n link.onload = resolve\n link.onerror = reject\n\n const parentElement =\n document.getElementsByTagName(`head`)[0] ||\n document.getElementsByName(`script`)[0].parentNode\n parentElement.appendChild(link)\n })\n}\n\nconst xhrPrefetchStrategy = function (url) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(`GET`, url, true)\n\n req.onload = () => {\n if (req.status === 200) {\n resolve()\n } else {\n reject()\n }\n }\n\n req.send(null)\n })\n}\n\nconst supportedPrefetchStrategy = support(`prefetch`)\n ? linkPrefetchStrategy\n : xhrPrefetchStrategy\n\nconst preFetched = {}\n\nconst prefetch = function (url, options) {\n return new Promise(resolve => {\n if (preFetched[url]) {\n resolve()\n return\n }\n\n supportedPrefetchStrategy(url, options)\n .then(() => {\n resolve()\n preFetched[url] = true\n })\n .catch(() => {}) // 404s are logged to the console anyway\n })\n}\n\nexport default prefetch\n","import prefetchHelper from \"./prefetch\"\nimport emitter from \"./emitter\"\nimport { setMatchPaths, findPath, findMatchPath } from \"./find-path\"\n\n/**\n * Available resource loading statuses\n */\nexport const PageResourceStatus = {\n /**\n * At least one of critical resources failed to load\n */\n Error: `error`,\n /**\n * Resources loaded successfully\n */\n Success: `success`,\n}\n\nconst preferDefault = m => (m && m.default) || m\n\nconst stripSurroundingSlashes = s => {\n s = s[0] === `/` ? s.slice(1) : s\n s = s.endsWith(`/`) ? s.slice(0, -1) : s\n return s\n}\n\nconst createPageDataUrl = path => {\n const fixedPath = path === `/` ? `index` : stripSurroundingSlashes(path)\n return `${__PATH_PREFIX__}/page-data/${fixedPath}/page-data.json`\n}\n\nfunction doFetch(url, method = `GET`) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(method, url, true)\n req.onreadystatechange = () => {\n if (req.readyState == 4) {\n resolve(req)\n }\n }\n req.send(null)\n })\n}\n\nconst doesConnectionSupportPrefetch = () => {\n if (\n `connection` in navigator &&\n typeof navigator.connection !== `undefined`\n ) {\n if ((navigator.connection.effectiveType || ``).includes(`2g`)) {\n return false\n }\n if (navigator.connection.saveData) {\n return false\n }\n }\n return true\n}\n\nconst toPageResources = (pageData, component = null) => {\n const page = {\n componentChunkName: pageData.componentChunkName,\n path: pageData.path,\n webpackCompilationHash: pageData.webpackCompilationHash,\n matchPath: pageData.matchPath,\n staticQueryHashes: pageData.staticQueryHashes,\n }\n\n return {\n component,\n json: pageData.result,\n page,\n }\n}\n\nexport class BaseLoader {\n constructor(loadComponent, matchPaths) {\n // Map of pagePath -> Page. Where Page is an object with: {\n // status: PageResourceStatus.Success || PageResourceStatus.Error,\n // payload: PageResources, // undefined if PageResourceStatus.Error\n // }\n // PageResources is {\n // component,\n // json: pageData.result,\n // page: {\n // componentChunkName,\n // path,\n // webpackCompilationHash,\n // staticQueryHashes\n // },\n // staticQueryResults\n // }\n this.pageDb = new Map()\n this.inFlightDb = new Map()\n this.staticQueryDb = {}\n this.pageDataDb = new Map()\n this.prefetchTriggered = new Set()\n this.prefetchCompleted = new Set()\n this.loadComponent = loadComponent\n setMatchPaths(matchPaths)\n }\n\n inFlightNetworkRequests = new Map()\n\n memoizedGet(url) {\n let inFlightPromise = this.inFlightNetworkRequests.get(url)\n\n if (!inFlightPromise) {\n inFlightPromise = doFetch(url, `GET`)\n this.inFlightNetworkRequests.set(url, inFlightPromise)\n }\n\n // Prefer duplication with then + catch over .finally to prevent problems in ie11 + firefox\n return inFlightPromise\n .then(response => {\n this.inFlightNetworkRequests.delete(url)\n return response\n })\n .catch(err => {\n this.inFlightNetworkRequests.delete(url)\n throw err\n })\n }\n\n setApiRunner(apiRunner) {\n this.apiRunner = apiRunner\n this.prefetchDisabled = apiRunner(`disableCorePrefetching`).some(a => a)\n }\n\n fetchPageDataJson(loadObj) {\n const { pagePath, retries = 0 } = loadObj\n const url = createPageDataUrl(pagePath)\n return this.memoizedGet(url).then(req => {\n const { status, responseText } = req\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.path === undefined) {\n throw new Error(`not a valid pageData response`)\n }\n\n return Object.assign(loadObj, {\n status: PageResourceStatus.Success,\n payload: jsonPayload,\n })\n } catch (err) {\n // continue regardless of error\n }\n }\n\n // Handle 404\n if (status === 404 || status === 200) {\n // If the request was for a 404 page and it doesn't exist, we're done\n if (pagePath === `/404.html`) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Need some code here to cache the 404 request. In case\n // multiple loadPageDataJsons result in 404s\n return this.fetchPageDataJson(\n Object.assign(loadObj, { pagePath: `/404.html`, notFound: true })\n )\n }\n\n // handle 500 response (Unrecoverable)\n if (status === 500) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Handle everything else, including status === 0, and 503s. Should retry\n if (retries < 3) {\n return this.fetchPageDataJson(\n Object.assign(loadObj, { retries: retries + 1 })\n )\n }\n\n // Retried 3 times already, result is an error.\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n })\n }\n\n loadPageDataJson(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDataDb.has(pagePath)) {\n const pageData = this.pageDataDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !pageData.stale) {\n return Promise.resolve(pageData)\n }\n }\n\n return this.fetchPageDataJson({ pagePath }).then(pageData => {\n this.pageDataDb.set(pagePath, pageData)\n\n return pageData\n })\n }\n\n findMatchPath(rawPath) {\n return findMatchPath(rawPath)\n }\n\n // TODO check all uses of this and whether they use undefined for page resources not exist\n loadPage(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const page = this.pageDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !page.payload.stale) {\n return Promise.resolve(page.payload)\n }\n }\n\n if (this.inFlightDb.has(pagePath)) {\n return this.inFlightDb.get(pagePath)\n }\n\n const inFlightPromise = Promise.all([\n this.loadAppData(),\n this.loadPageDataJson(pagePath),\n ]).then(allData => {\n const result = allData[1]\n if (result.status === PageResourceStatus.Error) {\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n let pageData = result.payload\n const { componentChunkName, staticQueryHashes = [] } = pageData\n\n const finalResult = {}\n\n const componentChunkPromise = this.loadComponent(componentChunkName).then(\n component => {\n finalResult.createdAt = new Date()\n let pageResources\n if (!component) {\n finalResult.status = PageResourceStatus.Error\n } else {\n finalResult.status = PageResourceStatus.Success\n if (result.notFound === true) {\n finalResult.notFound = true\n }\n pageData = Object.assign(pageData, {\n webpackCompilationHash: allData[0]\n ? allData[0].webpackCompilationHash\n : ``,\n })\n pageResources = toPageResources(pageData, component)\n }\n // undefined if final result is an error\n return pageResources\n }\n )\n\n const staticQueryBatchPromise = Promise.all(\n staticQueryHashes.map(staticQueryHash => {\n // Check for cache in case this static query result has already been loaded\n if (this.staticQueryDb[staticQueryHash]) {\n const jsonPayload = this.staticQueryDb[staticQueryHash]\n return { staticQueryHash, jsonPayload }\n }\n\n return this.memoizedGet(\n `${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json`\n ).then(req => {\n const jsonPayload = JSON.parse(req.responseText)\n return { staticQueryHash, jsonPayload }\n })\n })\n ).then(staticQueryResults => {\n const staticQueryResultsMap = {}\n\n staticQueryResults.forEach(({ staticQueryHash, jsonPayload }) => {\n staticQueryResultsMap[staticQueryHash] = jsonPayload\n this.staticQueryDb[staticQueryHash] = jsonPayload\n })\n\n return staticQueryResultsMap\n })\n\n return Promise.all([componentChunkPromise, staticQueryBatchPromise]).then(\n ([pageResources, staticQueryResults]) => {\n let payload\n if (pageResources) {\n payload = { ...pageResources, staticQueryResults }\n finalResult.payload = payload\n emitter.emit(`onPostLoadPageResources`, {\n page: payload,\n pageResources: payload,\n })\n }\n\n this.pageDb.set(pagePath, finalResult)\n\n return payload\n }\n )\n })\n\n inFlightPromise\n .then(response => {\n this.inFlightDb.delete(pagePath)\n })\n .catch(error => {\n this.inFlightDb.delete(pagePath)\n throw error\n })\n\n this.inFlightDb.set(pagePath, inFlightPromise)\n\n return inFlightPromise\n }\n\n // returns undefined if loading page ran into errors\n loadPageSync(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const pageData = this.pageDb.get(pagePath).payload\n return pageData\n }\n return undefined\n }\n\n shouldPrefetch(pagePath) {\n // Skip prefetching if we know user is on slow or constrained connection\n if (!doesConnectionSupportPrefetch()) {\n return false\n }\n\n // Check if the page exists.\n if (this.pageDb.has(pagePath)) {\n return false\n }\n\n return true\n }\n\n prefetch(pagePath) {\n if (!this.shouldPrefetch(pagePath)) {\n return false\n }\n\n // Tell plugins with custom prefetching logic that they should start\n // prefetching this path.\n if (!this.prefetchTriggered.has(pagePath)) {\n this.apiRunner(`onPrefetchPathname`, { pathname: pagePath })\n this.prefetchTriggered.add(pagePath)\n }\n\n // If a plugin has disabled core prefetching, stop now.\n if (this.prefetchDisabled) {\n return false\n }\n\n const realPath = findPath(pagePath)\n // Todo make doPrefetch logic cacheable\n // eslint-disable-next-line consistent-return\n this.doPrefetch(realPath).then(() => {\n if (!this.prefetchCompleted.has(pagePath)) {\n this.apiRunner(`onPostPrefetchPathname`, { pathname: pagePath })\n this.prefetchCompleted.add(pagePath)\n }\n })\n\n return true\n }\n\n doPrefetch(pagePath) {\n const pageDataUrl = createPageDataUrl(pagePath)\n return prefetchHelper(pageDataUrl, {\n crossOrigin: `anonymous`,\n as: `fetch`,\n }).then(() =>\n // This was just prefetched, so will return a response from\n // the cache instead of making another request to the server\n this.loadPageDataJson(pagePath)\n )\n }\n\n hovering(rawPath) {\n this.loadPage(rawPath)\n }\n\n getResourceURLsForPathname(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDataDb.get(pagePath)\n if (page) {\n const pageResources = toPageResources(page.payload)\n\n return [\n ...createComponentUrls(pageResources.page.componentChunkName),\n createPageDataUrl(pagePath),\n ]\n } else {\n return null\n }\n }\n\n isPageNotFound(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDb.get(pagePath)\n return !page || page.notFound\n }\n\n loadAppData(retries = 0) {\n return this.memoizedGet(`${__PATH_PREFIX__}/page-data/app-data.json`).then(\n req => {\n const { status, responseText } = req\n\n let appData\n\n if (status !== 200 && retries < 3) {\n // Retry 3 times incase of non-200 responses\n return this.loadAppData(retries + 1)\n }\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.webpackCompilationHash === undefined) {\n throw new Error(`not a valid app-data response`)\n }\n\n appData = jsonPayload\n } catch (err) {\n // continue regardless of error\n }\n }\n\n return appData\n }\n )\n }\n}\n\nconst createComponentUrls = componentChunkName =>\n (window.___chunkMapping[componentChunkName] || []).map(\n chunk => __PATH_PREFIX__ + chunk\n )\n\nexport class ProdLoader extends BaseLoader {\n constructor(asyncRequires, matchPaths) {\n const loadComponent = chunkName =>\n asyncRequires.components[chunkName]\n ? asyncRequires.components[chunkName]()\n .then(preferDefault)\n // loader will handle the case when component is null\n .catch(() => null)\n : Promise.resolve()\n\n super(loadComponent, matchPaths)\n }\n\n doPrefetch(pagePath) {\n return super.doPrefetch(pagePath).then(result => {\n if (result.status !== PageResourceStatus.Success) {\n return Promise.resolve()\n }\n const pageData = result.payload\n const chunkName = pageData.componentChunkName\n const componentUrls = createComponentUrls(chunkName)\n return Promise.all(componentUrls.map(prefetchHelper)).then(() => pageData)\n })\n }\n\n loadPageDataJson(rawPath) {\n return super.loadPageDataJson(rawPath).then(data => {\n if (data.notFound) {\n // check if html file exist using HEAD request:\n // if it does we should navigate to it instead of showing 404\n return doFetch(rawPath, `HEAD`).then(req => {\n if (req.status === 200) {\n // page (.html file) actually exist (or we asked for 404 )\n // returning page resources status as errored to trigger\n // regular browser navigation to given page\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n // if HEAD request wasn't 200, return notFound result\n // and show 404 page\n return data\n })\n }\n return data\n })\n }\n}\n\nlet instance\n\nexport const setLoader = _loader => {\n instance = _loader\n}\n\nexport const publicLoader = {\n // Deprecated methods. As far as we're aware, these are only used by\n // core gatsby and the offline plugin, however there's a very small\n // chance they're called by others.\n getResourcesForPathname: rawPath => {\n console.warn(\n `Warning: getResourcesForPathname is deprecated. Use loadPage instead`\n )\n return instance.i.loadPage(rawPath)\n },\n getResourcesForPathnameSync: rawPath => {\n console.warn(\n `Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead`\n )\n return instance.i.loadPageSync(rawPath)\n },\n enqueue: rawPath => instance.prefetch(rawPath),\n\n // Real methods\n getResourceURLsForPathname: rawPath =>\n instance.getResourceURLsForPathname(rawPath),\n loadPage: rawPath => instance.loadPage(rawPath),\n loadPageSync: rawPath => instance.loadPageSync(rawPath),\n prefetch: rawPath => instance.prefetch(rawPath),\n isPageNotFound: rawPath => instance.isPageNotFound(rawPath),\n hovering: rawPath => instance.hovering(rawPath),\n loadAppData: () => instance.loadAppData(),\n}\n\nexport default publicLoader\n\nexport function getStaticQueryResults() {\n if (instance) {\n return instance.staticQueryDb\n } else {\n return {}\n }\n}\n","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollContainer = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _router = require(\"@reach/router\");\n\n// TODO: In Gatsby v3, this file should be removed.\n// We are deprecating this in V2 in favor of useScrollRestoration\nvar propTypes = {\n scrollKey: _propTypes.default.string.isRequired,\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired\n};\nvar hasNotWarnedDeprecation = true;\n\nvar ScrollContainerImplementation = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollContainerImplementation, _React$Component);\n\n function ScrollContainerImplementation(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n\n if (process.env.NODE_ENV !== \"production\" && hasNotWarnedDeprecation) {\n hasNotWarnedDeprecation = false;\n console.log(\"Deprecation Warning:\\n\\n Gatsby is deprecated in Gatsby v2 and will be removed in Gatsby v3.\\n Update to the React hook alternative useScrollRestoration, like this:.\\n \\n ```\\n import React from 'react';\\n import { useScrollRestoration } from 'gatsby-react-router-scroll';\\n\\n function Component() {\\n const scrollRestoration = useScrollRestoration('\" + _this.props.scrollKey + \"');\\n\\n return
        ;\\n }\\n ```\\n \");\n }\n\n return _this;\n }\n\n var _proto = ScrollContainerImplementation.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n // eslint-disable-next-line react/no-find-dom-node\n var node = _reactDom.default.findDOMNode(this);\n\n var _this$props = this.props,\n location = _this$props.location,\n scrollKey = _this$props.scrollKey;\n if (!node) return;\n node.addEventListener(\"scroll\", function () {\n _this2.props.context.save(location, scrollKey, node.scrollTop);\n });\n var position = this.props.context.read(location, scrollKey);\n node.scrollTo(0, position || 0);\n };\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return ScrollContainerImplementation;\n}(React.Component);\n\nvar ScrollContainer = function ScrollContainer(props) {\n return /*#__PURE__*/React.createElement(_router.Location, null, function (_ref) {\n var location = _ref.location;\n return /*#__PURE__*/React.createElement(_scrollHandler.ScrollContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(ScrollContainerImplementation, (0, _extends2.default)({}, props, {\n context: context,\n location: location\n }));\n });\n });\n};\n\nexports.ScrollContainer = ScrollContainer;\nScrollContainer.propTypes = propTypes;","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _gatsby = require(\"gatsby\");\n\nvar _getManifestPathname = _interopRequireDefault(require(\"./get-manifest-pathname\"));\n\n/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\n// when we don't have localisation in our manifest, we tree shake everything away\nif (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n exports.onRouteUpdate = function (_ref, pluginOptions) {\n var location = _ref.location;\n var localize = pluginOptions.localize;\n var manifestFilename = (0, _getManifestPathname.default)(location.pathname, localize);\n var manifestEl = document.head.querySelector(\"link[rel=\\\"manifest\\\"]\");\n\n if (manifestEl) {\n manifestEl.setAttribute(\"href\", (0, _gatsby.withPrefix)(manifestFilename));\n }\n };\n}","/*\n Why commonjs and not ES imports/exports?\n\n This module is used to alias `create-react-context` package, but drop the the actual implementation part\n because Gatsby requires version of react that has implementatoin baked in.\n \n Package source is using ES modules:\n - https://github.com/jamiebuilds/create-react-context/blob/v0.3.0/src/index.js\n \n But to build this package `babel-plugin-add-module-exports` is used ( https://www.npmjs.com/package/babel-plugin-add-module-exports).\n Which result in both `module.exports` and `exports.default` being set to same thing.\n\n We don't use that babel plugin so we only have `exports.default`.\n\n This cause problems in various 3rd party react components that rely on `module.exports` being set.\n See https://github.com/gatsbyjs/gatsby/issues/23645 for example of it.\n \n Instead of adding same babel plugin we mimic output here. Adding babel plugin just for this would:\n a) unnecesairly slow down compilation for all other files (if we just apply it everywhere)\n b) or complicate babel-loader configuration with overwrite specifically for this file\n*/\n\nconst { createContext } = require(`react`)\n\nmodule.exports = createContext\nmodule.exports.default = createContext\n","\"use strict\";\n\nexports.DEFAULT_OPTIONS = {\n maxWidth: 650,\n wrapperStyle: \"\",\n backgroundColor: \"white\",\n linkImagesToOriginal: true,\n showCaptions: false,\n markdownCaptions: false,\n withWebp: false,\n withAvif: false,\n tracedSVG: false,\n loading: \"lazy\",\n disableBgImageOnAlpha: false,\n disableBgImage: false\n};\nexports.EMPTY_ALT = \"GATSBY_EMPTY_ALT\";\nexports.imageClass = \"gatsby-resp-image-image\";\nexports.imageWrapperClass = \"gatsby-resp-image-wrapper\";\nexports.imageBackgroundClass = \"gatsby-resp-image-background-image\";","function _extends() {\n module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _extends.apply(this, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nexports.__esModule = true;\nexports.onRouteUpdate = void 0;\n\nvar onRouteUpdate = function onRouteUpdate(_ref, pluginOptions) {\n var location = _ref.location;\n\n if (pluginOptions === void 0) {\n pluginOptions = {};\n }\n\n if (process.env.NODE_ENV !== \"production\" || typeof ga !== \"function\") {\n return null;\n }\n\n var pathIsExcluded = location && typeof window.excludeGAPaths !== \"undefined\" && window.excludeGAPaths.some(function (rx) {\n return rx.test(location.pathname);\n });\n if (pathIsExcluded) return null; // wrap inside a timeout to make sure react-helmet is done with it's changes (https://github.com/gatsbyjs/gatsby/issues/9139)\n // reactHelmet is using requestAnimationFrame: https://github.com/nfl/react-helmet/blob/5.2.0/src/HelmetUtils.js#L296-L299\n\n var sendPageView = function sendPageView() {\n var pagePath = location ? location.pathname + location.search + location.hash : undefined;\n window.ga(\"set\", \"page\", pagePath);\n window.ga(\"send\", \"pageview\");\n }; // Minimum delay for reactHelmet's requestAnimationFrame\n\n\n var delay = Math.max(32, pluginOptions.pageTransitionDelay || 0);\n setTimeout(sendPageView, delay);\n return null;\n};\n\nexports.onRouteUpdate = onRouteUpdate;","\"use strict\";\n\nvar _require = require(\"./constants\"),\n DEFAULT_OPTIONS = _require.DEFAULT_OPTIONS,\n imageClass = _require.imageClass,\n imageBackgroundClass = _require.imageBackgroundClass,\n imageWrapperClass = _require.imageWrapperClass;\n\nexports.onRouteUpdate = function (apiCallbackContext, pluginOptions) {\n var options = Object.assign({}, DEFAULT_OPTIONS, pluginOptions);\n var imageWrappers = document.querySelectorAll(\".\" + imageWrapperClass); // https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/\n // for cross-browser looping through NodeList without polyfills\n\n var _loop = function _loop(i) {\n var imageWrapper = imageWrappers[i];\n var backgroundElement = imageWrapper.querySelector(\".\" + imageBackgroundClass);\n var imageElement = imageWrapper.querySelector(\".\" + imageClass);\n\n var onImageLoad = function onImageLoad() {\n backgroundElement.style.transition = \"opacity 0.5s 0.5s\";\n imageElement.style.transition = \"opacity 0.5s\";\n onImageComplete();\n };\n\n var onImageComplete = function onImageComplete() {\n backgroundElement.style.opacity = 0;\n imageElement.style.opacity = 1;\n imageElement.style.color = \"inherit\";\n imageElement.style.boxShadow = \"inset 0px 0px 0px 400px \" + options.backgroundColor;\n imageElement.removeEventListener(\"load\", onImageLoad);\n imageElement.removeEventListener(\"error\", onImageComplete);\n };\n\n imageElement.style.opacity = 0;\n imageElement.addEventListener(\"load\", onImageLoad);\n imageElement.addEventListener(\"error\", onImageComplete);\n\n if (imageElement.complete) {\n onImageComplete();\n }\n };\n\n for (var i = 0; i < imageWrappers.length; i++) {\n _loop(i);\n }\n};","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","const plugins = require(`./api-runner-browser-plugins`)\nconst {\n getResourcesForPathname,\n getResourcesForPathnameSync,\n getResourceURLsForPathname,\n loadPage,\n loadPageSync,\n} = require(`./loader`).publicLoader\n\nexports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {\n // Hooks for gatsby-cypress's API handler\n if (process.env.CYPRESS_SUPPORT) {\n if (window.___apiHandler) {\n window.___apiHandler(api)\n } else if (window.___resolvedAPIs) {\n window.___resolvedAPIs.push(api)\n } else {\n window.___resolvedAPIs = [api]\n }\n }\n\n let results = plugins.map(plugin => {\n if (!plugin.plugin[api]) {\n return undefined\n }\n\n // Deprecated April 2019. Use `loadPageSync` instead\n args.getResourcesForPathnameSync = getResourcesForPathnameSync\n // Deprecated April 2019. Use `loadPage` instead\n args.getResourcesForPathname = getResourcesForPathname\n args.getResourceURLsForPathname = getResourceURLsForPathname\n args.loadPage = loadPage\n args.loadPageSync = loadPageSync\n\n const result = plugin.plugin[api](args, plugin.options)\n if (result && argTransform) {\n args = argTransform({ args, result, plugin })\n }\n return result\n })\n\n // Filter out undefined results.\n results = results.filter(result => typeof result !== `undefined`)\n\n if (results.length > 0) {\n return results\n } else if (defaultReturn) {\n return [defaultReturn]\n } else {\n return []\n }\n}\n\nexports.apiRunnerAsync = (api, args, defaultReturn) =>\n plugins.reduce(\n (previous, next) =>\n next.plugin[api]\n ? previous.then(() => next.plugin[api](args, next.options))\n : previous,\n Promise.resolve()\n )\n"],"sourceRoot":""} \ No newline at end of file diff --git a/app-a5e2622415d2f9374880.js b/app-a5e2622415d2f9374880.js new file mode 100644 index 0000000..3540e70 --- /dev/null +++ b/app-a5e2622415d2f9374880.js @@ -0,0 +1,3 @@ +/*! For license information please see app-a5e2622415d2f9374880.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+ZDr":function(t,e,n){"use strict";var r=n("TqRt");e.__esModule=!0,e.withPrefix=h,e.withAssetPrefix=function(t){return h(t,m())},e.navigateTo=e.replace=e.push=e.navigate=e.default=void 0;var o=r(n("8OQS")),a=r(n("PJYZ")),i=r(n("VbXa")),s=r(n("pVnL")),c=r(n("17x9")),u=r(n("q1tI")),l=n("YwZP"),p=n("LYrO"),d=n("cu4x");e.parsePath=d.parsePath;var f=function(t){return null==t?void 0:t.startsWith("/")};function h(t,e){var n,r;if(void 0===e&&(e=v()),!g(t))return t;if(t.startsWith("./")||t.startsWith("../"))return t;var o=null!==(n=null!==(r=e)&&void 0!==r?r:m())&&void 0!==n?n:"/";return""+((null==o?void 0:o.endsWith("/"))?o.slice(0,-1):o)+(t.startsWith("/")?t:"/"+t)}var m=function(){return""},v=function(){return""},g=function(t){return t&&!t.startsWith("http://")&&!t.startsWith("https://")&&!t.startsWith("//")};var y=function(t,e){return"number"==typeof t?t:g(t)?f(t)?h(t):function(t,e){return f(t)?t:(0,p.resolve)(t,e)}(t,e):t},w={activeClassName:c.default.string,activeStyle:c.default.object,partiallyActive:c.default.bool};function b(t){return u.default.createElement(l.Location,null,(function(e){var n=e.location;return u.default.createElement(P,(0,s.default)({},t,{_location:n}))}))}var P=function(t){function e(e){var n;(n=t.call(this,e)||this).defaultGetProps=function(t){var e=t.isPartiallyCurrent,r=t.isCurrent;return(n.props.partiallyActive?e:r)?{className:[n.props.className,n.props.activeClassName].filter(Boolean).join(" "),style:(0,s.default)({},n.props.style,n.props.activeStyle)}:null};var r=!1;return"undefined"!=typeof window&&window.IntersectionObserver&&(r=!0),n.state={IOSupported:r},n.handleRef=n.handleRef.bind((0,a.default)(n)),n}(0,i.default)(e,t);var n=e.prototype;return n._prefetch=function(){var t=window.location.pathname;this.props._location&&this.props._location.pathname&&(t=this.props._location.pathname);var e=y(this.props.to,t),n=(0,d.parsePath)(e).pathname;t!==n&&___loader.enqueue(n)},n.componentDidUpdate=function(t,e){this.props.to===t.to||this.state.IOSupported||this._prefetch()},n.componentDidMount=function(){this.state.IOSupported||this._prefetch()},n.componentWillUnmount=function(){if(this.io){var t=this.io,e=t.instance,n=t.el;e.unobserve(n),e.disconnect()}},n.handleRef=function(t){var e,n,r,o=this;this.props.innerRef&&this.props.innerRef.hasOwnProperty("current")?this.props.innerRef.current=t:this.props.innerRef&&this.props.innerRef(t),this.state.IOSupported&&t&&(this.io=(e=t,n=function(){o._prefetch()},(r=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(r.unobserve(e),r.disconnect(),n())}))}))).observe(e),{instance:r,el:e}))},n.render=function(){var t=this,e=this.props,n=e.to,r=e.getProps,a=void 0===r?this.defaultGetProps:r,i=e.onClick,c=e.onMouseEnter,p=(e.activeClassName,e.activeStyle,e.innerRef,e.partiallyActive,e.state),f=e.replace,h=e._location,m=(0,o.default)(e,["to","getProps","onClick","onMouseEnter","activeClassName","activeStyle","innerRef","partiallyActive","state","replace","_location"]);var v=y(n,h.pathname);return g(v)?u.default.createElement(l.Link,(0,s.default)({to:v,state:p,getProps:a,innerRef:this.handleRef,onMouseEnter:function(t){c&&c(t),___loader.hovering((0,d.parsePath)(v).pathname)},onClick:function(e){if(i&&i(e),!(0!==e.button||t.props.target||e.defaultPrevented||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault();var n=f,r=encodeURI(v)===h.pathname;"boolean"!=typeof f&&r&&(n=!0),window.___navigate(v,{state:p,replace:n})}return!0}},m)):u.default.createElement("a",(0,s.default)({href:v},m))},e}(u.default.Component);P.propTypes=(0,s.default)({},w,{onClick:c.default.func,to:c.default.string.isRequired,replace:c.default.bool,state:c.default.object});var R=function(t,e,n){return console.warn('The "'+t+'" method is now deprecated and will be removed in Gatsby v'+n+'. Please use "'+e+'" instead.')},_=u.default.forwardRef((function(t,e){return u.default.createElement(b,(0,s.default)({innerRef:e},t))}));e.default=_;e.navigate=function(t,e){window.___navigate(y(t,window.location.pathname),e)};var O=function(t){R("push","navigate",3),window.___push(y(t,window.location.pathname))};e.push=O;e.replace=function(t){R("replace","navigate",3),window.___replace(y(t,window.location.pathname))};e.navigateTo=function(t){return R("navigateTo","navigate",3),O(t)}},"/hTd":function(t,e,n){"use strict";e.__esModule=!0,e.SessionStorage=void 0;var r=function(){function t(){}var e=t.prototype;return e.read=function(t,e){var n=this.getStateKey(t,e);try{var r=window.sessionStorage.getItem(n);return r?JSON.parse(r):0}catch(o){return window&&window.___GATSBY_REACT_ROUTER_SCROLL&&window.___GATSBY_REACT_ROUTER_SCROLL[n]?window.___GATSBY_REACT_ROUTER_SCROLL[n]:0}},e.save=function(t,e,n){var r=this.getStateKey(t,e),o=JSON.stringify(n);try{window.sessionStorage.setItem(r,o)}catch(a){window&&window.___GATSBY_REACT_ROUTER_SCROLL||(window.___GATSBY_REACT_ROUTER_SCROLL={}),window.___GATSBY_REACT_ROUTER_SCROLL[r]=JSON.parse(o)}},e.getStateKey=function(t,e){var n="@@scroll|"+t.pathname;return null==e?n:n+"|"+e},t}();e.SessionStorage=r},"284h":function(t,e,n){var r=n("cDf5").default;function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(o=function(t){return t?n:e})(t)}t.exports=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=o(e);if(n&&n.has(t))return n.get(t);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var c=i?Object.getOwnPropertyDescriptor(t,s):null;c&&(c.get||c.set)?Object.defineProperty(a,s,c):a[s]=t[s]}return a.default=t,n&&n.set(t,a),a},t.exports.__esModule=!0,t.exports.default=t.exports},"30RF":function(t,e,n){"use strict";n.d(e,"d",(function(){return l})),n.d(e,"a",(function(){return p})),n.d(e,"c",(function(){return d})),n.d(e,"b",(function(){return f}));var r=n("LYrO"),o=n("cSJ8"),a=t=>void 0===t?t:"/"===t?"/":"/"===t.charAt(t.length-1)?t.slice(0,-1):t;const i=new Map;let s=[];const c=t=>{const e=decodeURIComponent(t);return Object(o.a)(e,"").split("#")[0].split("?")[0]};function u(t){return t.startsWith("/")||t.startsWith("https://")||t.startsWith("http://")?t:new URL(t,window.location.href+(window.location.href.endsWith("/")?"":"/")).pathname}const l=t=>{s=t},p=t=>{const e=h(t),n=s.map(t=>{let{path:e,matchPath:n}=t;return{path:n,originalPath:e}}),o=Object(r.pick)(n,e);return o?a(o.route.originalPath):null},d=t=>{const e=h(t),n=s.map(t=>{let{path:e,matchPath:n}=t;return{path:n,originalPath:e}}),o=Object(r.pick)(n,e);return o?o.params:{}},f=t=>{const e=c(u(t));if(i.has(e))return i.get(e);let n=p(e);return n||(n=h(t)),i.set(e,n),n},h=t=>{let e=c(u(t));return"/index.html"===e&&(e="/"),e=a(e),e}},"3uz+":function(t,e,n){"use strict";e.__esModule=!0,e.useScrollRestoration=function(t){var e=(0,a.useLocation)(),n=(0,o.useContext)(r.ScrollContext),i=(0,o.useRef)();return(0,o.useLayoutEffect)((function(){if(i.current){var r=n.read(e,t);i.current.scrollTo(0,r||0)}}),[]),{ref:i,onScroll:function(){i.current&&n.save(e,t,i.current.scrollTop)}}};var r=n("Enzk"),o=n("q1tI"),a=n("YwZP")},"5yr3":function(t,e,n){"use strict";const r=function(t){return t=t||Object.create(null),{on:function(e,n){(t[e]||(t[e]=[])).push(n)},off:function(e,n){t[e]&&t[e].splice(t[e].indexOf(n)>>>0,1)},emit:function(e,n){(t[e]||[]).slice().map((function(t){t(n)})),(t["*"]||[]).slice().map((function(t){t(e,n)}))}}}();e.a=r},"7hJ6":function(t,e,n){"use strict";e.__esModule=!0,e.useScrollRestoration=e.ScrollContainer=e.ScrollContext=void 0;var r=n("Enzk");e.ScrollContext=r.ScrollHandler;var o=n("hd9s");e.ScrollContainer=o.ScrollContainer;var a=n("3uz+");e.useScrollRestoration=a.useScrollRestoration},"8OQS":function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o},t.exports.__esModule=!0,t.exports.default=t.exports},"94VI":function(t,e){e.polyfill=t=>t},"9Xx/":function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i}));var r=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},u=c.state,l=c.replace,p=void 0!==l&&l;if("number"==typeof e)t.history.go(e);else{u=r({},u,{key:Date.now()+""});try{i||p?t.history.replaceState(u,null,e):t.history.pushState(u,null,e)}catch(f){t.location[p?"replace":"assign"](e)}}a=o(t),i=!0;var d=new Promise((function(t){return s=t}));return n.forEach((function(t){return t({location:a,action:"PUSH"})})),d}}},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=t.indexOf("?"),n={pathname:e>-1?t.substr(0,e):t,search:e>-1?t.substr(e):""},r=0,o=[n],a=[null];return{get location(){return o[r]},addEventListener:function(t,e){},removeEventListener:function(t,e){},history:{get entries(){return o},get index(){return r},get state(){return a[r]},pushState:function(t,e,n){var i=n.split("?"),s=i[0],c=i[1],u=void 0===c?"":c;r++,o.push({pathname:s,search:u.length?"?"+u:u}),a.push(t)},replaceState:function(t,e,n){var i=n.split("?"),s=i[0],c=i[1],u=void 0===c?"":c;o[r]={pathname:s,search:u},a[r]=t},go:function(t){var e=r+t;e<0||e>a.length-1||(r=e)}}}},s=!("undefined"==typeof window||!window.document||!window.document.createElement),c=a(s?window:i()),u=c.navigate},"9hXx":function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;e.default=function(t,e){if(!Array.isArray(e))return"manifest.webmanifest";var n=e.find((function(e){return t.startsWith(e.start_url)}));return n?"manifest_"+n.lang+".webmanifest":"manifest.webmanifest"}},Enzk:function(t,e,n){"use strict";var r=n("284h"),o=n("TqRt");e.__esModule=!0,e.ScrollHandler=e.ScrollContext=void 0;var a=o(n("PJYZ")),i=o(n("VbXa")),s=r(n("q1tI")),c=o(n("17x9")),u=n("/hTd"),l=s.createContext(new u.SessionStorage);e.ScrollContext=l,l.displayName="GatsbyScrollContext";var p=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o{let{result:n}=e;return{element:n,props:t}}).pop()},e}(a.a.Component);e.a=u},JeVI:function(t){t.exports=JSON.parse("[]")},KQm4:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.score?-1:t.index-e.index}))},v=function(t){return t.replace(/(^\/+|\/+$)/g,"").split("/")},g=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r0})))&&n.length>0?"?"+n.join("&"):"")},y=["uri","path"],w=function(t,e){var n=Object.keys(t);return n.length===Object.keys(e).length&&n.every((function(n){return e.hasOwnProperty(n)&&t[n]===e[n]}))}},LeKB:function(t,e,n){t.exports=[{plugin:n("q9nr"),options:{plugins:[],maxWidth:590,linkImagesToOriginal:!0,showCaptions:!1,markdownCaptions:!1,sizeByPixelDensity:!1,backgroundColor:"white",quality:50,withWebp:!1,tracedSVG:!1,loading:"lazy",disableBgImageOnAlpha:!1,disableBgImage:!1}},{plugin:n("pWkz"),options:{plugins:[],head:!1,anonymize:!1,respectDNT:!1,exclude:[],pageTransitionDelay:0}},{plugin:n("npZl"),options:{plugins:[],name:"SmartBlock",short_name:"SmartBlock",start_url:"/",background_color:"#ffffff",theme_color:"#663399",display:"minimal-ui",icon:"static/favicon.png",legacy:!0,theme_color_in_head:!0,cache_busting_mode:"query",crossOrigin:"anonymous",include_favicon:!0,cacheDigest:"084321a740e799687cc736487af34310"}},{plugin:n("GddB"),options:{plugins:[]}}]},MMVs:function(t,e,n){t.exports=function(){var t=!1;-1!==navigator.appVersion.indexOf("MSIE 10")&&(t=!0);var e,n=[],r="object"==typeof document&&document,o=t?r.documentElement.doScroll("left"):r.documentElement.doScroll,a=r&&(o?/^loaded|^c/:/^loaded|^i|^c/).test(r.readyState);return!a&&r&&r.addEventListener("DOMContentLoaded",e=function(){for(r.removeEventListener("DOMContentLoaded",e),a=1;e=n.shift();)e()}),function(t){a?setTimeout(t,0):n.push(t)}}()},NSX3:function(t,e,n){"use strict";n.r(e);var r=n("xtsi");"https:"!==window.location.protocol&&"localhost"!==window.location.hostname?console.error("Service workers can only be used over HTTPS, or on localhost for development"):"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then((function(t){t.addEventListener("updatefound",()=>{Object(r.apiRunner)("onServiceWorkerUpdateFound",{serviceWorker:t});const e=t.installing;console.log("installingWorker",e),e.addEventListener("statechange",()=>{switch(e.state){case"installed":navigator.serviceWorker.controller?(window.___swUpdated=!0,Object(r.apiRunner)("onServiceWorkerUpdateReady",{serviceWorker:t}),window.___failedResources&&(console.log("resources failed, SW updated - reloading"),window.location.reload())):(console.log("Content is now available offline!"),Object(r.apiRunner)("onServiceWorkerInstalled",{serviceWorker:t}));break;case"redundant":console.error("The installing service worker became redundant."),Object(r.apiRunner)("onServiceWorkerRedundant",{serviceWorker:t});break;case"activated":Object(r.apiRunner)("onServiceWorkerActive",{serviceWorker:t})}})})})).catch((function(t){console.error("Error during service worker registration:",t)}))},NsGk:function(t,e,n){e.components={"component---src-pages-404-js":()=>Promise.all([n.e(0),n.e(4)]).then(n.bind(null,"w2l6")),"component---src-pages-index-js":()=>Promise.all([n.e(10),n.e(7),n.e(2),n.e(0),n.e(5)]).then(n.bind(null,"RXBc")),"component---src-templates-blog-post-js":()=>Promise.all([n.e(0),n.e(6)]).then(n.bind(null,"yZlL"))}},PJYZ:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},QLaP:function(t,e,n){"use strict";t.exports=function(t,e,n,r,o,a,i,s){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,s],l=0;(c=new Error(e.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},SksO:function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},TqRt:function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},UxWs:function(t,e,n){"use strict";n.r(e);var r=n("dI71"),o=n("xtsi"),a=n("q1tI"),i=n.n(a),s=n("i8i4"),c=n.n(s),u=n("YwZP"),l=n("7hJ6"),p=n("MMVs"),d=n.n(p),f=n("Wbzz"),h=n("emEt"),m=n("YLt+"),v=n("5yr3");const g={id:"gatsby-announcer",style:{position:"absolute",top:0,width:1,height:1,padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},"aria-live":"assertive","aria-atomic":"true"};var y=n("9Xx/"),w=n("+ZDr");const b=new Map,P=new Map;function R(t){let e=b.get(t);return e||(e=P.get(t.toLowerCase())),null!=e&&(window.___replace(e.toPath),!0)}m.forEach(t=>{t.ignoreCase?P.set(t.fromPath,t):b.set(t.fromPath,t)});const _=(t,e)=>{R(t.pathname)||Object(o.apiRunner)("onPreRouteUpdate",{location:t,prevLocation:e})},O=(t,e)=>{R(t.pathname)||Object(o.apiRunner)("onRouteUpdate",{location:t,prevLocation:e})},S=function(t,e){if(void 0===e&&(e={}),"number"==typeof t)return void y.c.navigate(t);let{pathname:n}=Object(w.parsePath)(t),r=b.get(n);if(r||(r=P.get(n.toLowerCase())),r&&(t=r.toPath,n=Object(w.parsePath)(t).pathname),window.___swUpdated)return void(window.location=n);const a=setTimeout(()=>{v.a.emit("onDelayedLoadPageResources",{pathname:n}),Object(o.apiRunner)("onRouteUpdateDelayed",{location:window.location})},1e3);h.default.loadPage(n).then(r=>{if(!r||r.status===h.PageResourceStatus.Error)return window.history.replaceState({},"",location.href),window.location=n,void clearTimeout(a);r&&r.page.webpackCompilationHash!==window.___webpackCompilationHash&&("serviceWorker"in navigator&&null!==navigator.serviceWorker.controller&&"activated"===navigator.serviceWorker.controller.state&&navigator.serviceWorker.controller.postMessage({gatsbyApi:"clearPathResources"}),window.location=n),Object(u.navigate)(t,e),clearTimeout(a)})};function x(t,e){let{location:n}=e;const{pathname:r,hash:a}=n,i=Object(o.apiRunner)("shouldUpdateScroll",{prevRouterProps:t,pathname:r,routerProps:{location:n},getSavedScrollPosition:t=>[0,this._stateStorage.read(t,t.key)]});if(i.length>0)return i[i.length-1];if(t){const{location:{pathname:e}}=t;if(e===r)return a?decodeURI(a.slice(1)):[0,0]}return!0}let E=function(t){function e(e){var n;return(n=t.call(this,e)||this).announcementRef=i.a.createRef(),n}Object(r.a)(e,t);var n=e.prototype;return n.componentDidUpdate=function(t,e){requestAnimationFrame(()=>{let t="new page at "+this.props.location.pathname;document.title&&(t=document.title);const e=document.querySelectorAll("#gatsby-focus-wrapper h1");e&&e.length&&(t=e[0].textContent);const n="Navigated to "+t;if(this.announcementRef.current){this.announcementRef.current.innerText!==n&&(this.announcementRef.current.innerText=n)}})},n.render=function(){return i.a.createElement("div",Object.assign({},g,{ref:this.announcementRef}))},e}(i.a.Component);const C=(t,e)=>{var n,r;return t.href!==e.href||(null==t||null===(n=t.state)||void 0===n?void 0:n.key)!==(null==e||null===(r=e.state)||void 0===r?void 0:r.key)};let j=function(t){function e(e){var n;return n=t.call(this,e)||this,_(e.location,null),n}Object(r.a)(e,t);var n=e.prototype;return n.componentDidMount=function(){O(this.props.location,null)},n.shouldComponentUpdate=function(t){return!!C(t.location,this.props.location)&&(_(this.props.location,t.location),!0)},n.componentDidUpdate=function(t){C(t.location,this.props.location)&&O(this.props.location,t.location)},n.render=function(){return i.a.createElement(i.a.Fragment,null,this.props.children,i.a.createElement(E,{location:location}))},e}(i.a.Component);var k=n("IOVJ"),L=n("NsGk"),T=n.n(L);function D(t,e){for(var n in t)if(!(n in e))return!0;for(var r in e)if(t[r]!==e[r])return!0;return!1}var M=function(t){function e(e){var n;n=t.call(this)||this;const{location:r,pageResources:o}=e;return n.state={location:{...r},pageResources:o||h.default.loadPageSync(r.pathname)},n}Object(r.a)(e,t),e.getDerivedStateFromProps=function(t,e){let{location:n}=t;if(e.location.href!==n.href){return{pageResources:h.default.loadPageSync(n.pathname),location:{...n}}}return{location:{...n}}};var n=e.prototype;return n.loadResources=function(t){h.default.loadPage(t).then(e=>{e&&e.status!==h.PageResourceStatus.Error?this.setState({location:{...window.location},pageResources:e}):(window.history.replaceState({},"",location.href),window.location=t)})},n.shouldComponentUpdate=function(t,e){return e.pageResources?this.state.pageResources!==e.pageResources||(this.state.pageResources.component!==e.pageResources.component||(this.state.pageResources.json!==e.pageResources.json||(!(this.state.location.key===e.location.key||!e.pageResources.page||!e.pageResources.page.matchPath&&!e.pageResources.page.path)||function(t,e,n){return D(t.props,e)||D(t.state,n)}(this,t,e)))):(this.loadResources(t.location.pathname),!1)},n.render=function(){return this.props.children(this.state)},e}(i.a.Component),A=n("cSJ8"),U=n("JeVI");const I=new h.ProdLoader(T.a,U);Object(h.setLoader)(I),I.setApiRunner(o.apiRunner),window.asyncRequires=T.a,window.___emitter=v.a,window.___loader=h.publicLoader,y.c.listen(t=>{t.location.action=t.action}),window.___push=t=>S(t,{replace:!1}),window.___replace=t=>S(t,{replace:!0}),window.___navigate=(t,e)=>S(t,e),R(window.location.pathname),Object(o.apiRunnerAsync)("onClientEntry").then(()=>{Object(o.apiRunner)("registerServiceWorker").length>0&&n("NSX3");const t=t=>i.a.createElement(u.BaseContext.Provider,{value:{baseuri:"/",basepath:"/"}},i.a.createElement(k.a,t)),e=i.a.createContext({});let a=function(t){function n(){return t.apply(this,arguments)||this}return Object(r.a)(n,t),n.prototype.render=function(){const{children:t}=this.props;return i.a.createElement(u.Location,null,n=>{let{location:r}=n;return i.a.createElement(M,{location:r},n=>{let{pageResources:r,location:o}=n;const a=Object(h.getStaticQueryResults)();return i.a.createElement(f.StaticQueryContext.Provider,{value:a},i.a.createElement(e.Provider,{value:{pageResources:r,location:o}},t))})})},n}(i.a.Component),s=function(n){function o(){return n.apply(this,arguments)||this}return Object(r.a)(o,n),o.prototype.render=function(){return i.a.createElement(e.Consumer,null,e=>{let{pageResources:n,location:r}=e;return i.a.createElement(j,{location:r},i.a.createElement(l.ScrollContext,{location:r,shouldUpdateScroll:x},i.a.createElement(u.Router,{basepath:"",location:r,id:"gatsby-focus-wrapper"},i.a.createElement(t,Object.assign({path:"/404.html"===n.page.path?Object(A.a)(r.pathname,""):encodeURI(n.page.matchPath||n.page.path)},this.props,{location:r,pageResources:n},n.json)))))})},o}(i.a.Component);const{pagePath:p,location:m}=window;p&&""+p!==m.pathname&&!(I.findMatchPath(Object(A.a)(m.pathname,""))||"/404.html"===p||p.match(/^\/404\/?$/)||p.match(/^\/offline-plugin-app-shell-fallback\/?$/))&&Object(u.navigate)(""+p+m.search+m.hash,{replace:!0}),h.publicLoader.loadPage(m.pathname).then(t=>{if(!t||t.status===h.PageResourceStatus.Error)throw new Error(`page resources for ${m.pathname} not found. Not rendering React`);window.___webpackCompilationHash=t.page.webpackCompilationHash;const e=Object(o.apiRunner)("wrapRootElement",{element:i.a.createElement(s,null)},i.a.createElement(s,null),t=>{let{result:e}=t;return{element:e}}).pop(),n=()=>i.a.createElement(a,null,e),r=Object(o.apiRunner)("replaceHydrateFunction",void 0,c.a.hydrate)[0];d()(()=>{r(i.a.createElement(n,null),"undefined"!=typeof window?document.getElementById("___gatsby"):void 0,()=>{Object(o.apiRunner)("onInitialClientRender")})})})})},VbXa:function(t,e,n){var r=n("SksO");t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},Wbzz:function(t,e,n){"use strict";n.r(e),n.d(e,"graphql",(function(){return m})),n.d(e,"StaticQueryContext",(function(){return p})),n.d(e,"StaticQuery",(function(){return f})),n.d(e,"useStaticQuery",(function(){return h})),n.d(e,"prefetchPathname",(function(){return l}));var r=n("q1tI"),o=n.n(r),a=n("+ZDr"),i=n.n(a);n.d(e,"Link",(function(){return i.a})),n.d(e,"withAssetPrefix",(function(){return a.withAssetPrefix})),n.d(e,"withPrefix",(function(){return a.withPrefix})),n.d(e,"parsePath",(function(){return a.parsePath})),n.d(e,"navigate",(function(){return a.navigate})),n.d(e,"push",(function(){return a.push})),n.d(e,"replace",(function(){return a.replace})),n.d(e,"navigateTo",(function(){return a.navigateTo}));var s=n("7hJ6");n.d(e,"useScrollRestoration",(function(){return s.useScrollRestoration}));var c=n("lw3w"),u=n.n(c);n.d(e,"PageRenderer",(function(){return u.a}));const l=n("emEt").default.enqueue,p=o.a.createContext({});function d(t){let{staticQueryData:e,data:n,query:r,render:a}=t;const i=n?n.data:e[r]&&e[r].data;return o.a.createElement(o.a.Fragment,null,i&&a(i),!i&&o.a.createElement("div",null,"Loading (StaticQuery)"))}const f=t=>{const{data:e,query:n,render:r,children:a}=t;return o.a.createElement(p.Consumer,null,t=>o.a.createElement(d,{data:e,query:n,render:r||a,staticQueryData:t}))},h=t=>{var e;o.a.useContext;const n=o.a.useContext(p);if(isNaN(Number(t)))throw new Error(`useStaticQuery was called with a string but expects to be called using \`graphql\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\`${t}\`);\n`);if(null!==(e=n[t])&&void 0!==e&&e.data)return n[t].data;throw new Error("The result of this StaticQuery could not be fetched.\n\nThis is likely a bug in Gatsby and if refreshing the page does not fix it, please open an issue in https://github.com/gatsbyjs/gatsby/issues")};function m(){throw new Error("It appears like Gatsby is misconfigured. Gatsby related `graphql` calls are supposed to only be evaluated at compile time, and then compiled away. Unfortunately, something went wrong and the query was left in the compiled code.\n\nUnless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.")}},"YLt+":function(t){t.exports=JSON.parse("[]")},YVoz:function(t,e,n){"use strict";t.exports=Object.assign},YwZP:function(t,e,n){"use strict";n.r(e),n.d(e,"Link",(function(){return T})),n.d(e,"Location",(function(){return w})),n.d(e,"LocationProvider",(function(){return b})),n.d(e,"Match",(function(){return q})),n.d(e,"Redirect",(function(){return I})),n.d(e,"Router",(function(){return _})),n.d(e,"ServerLocation",(function(){return P})),n.d(e,"isRedirect",(function(){return M})),n.d(e,"redirectTo",(function(){return A})),n.d(e,"useLocation",(function(){return W})),n.d(e,"useNavigate",(function(){return F})),n.d(e,"useParams",(function(){return N})),n.d(e,"useMatch",(function(){return J})),n.d(e,"BaseContext",(function(){return R}));var r=n("q1tI"),o=n.n(r),a=(n("17x9"),n("QLaP")),i=n.n(a),s=n("nqlD"),c=n.n(s),u=n("94VI"),l=n("LYrO");n.d(e,"matchPath",(function(){return l.match}));var p=n("9Xx/");n.d(e,"createHistory",(function(){return p.a})),n.d(e,"createMemorySource",(function(){return p.b})),n.d(e,"navigate",(function(){return p.d})),n.d(e,"globalHistory",(function(){return p.c}));var d=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var g=function(t,e){var n=c()(e);return n.displayName=t,n},y=g("Location"),w=function(t){var e=t.children;return o.a.createElement(y.Consumer,null,(function(t){return t?e(t):o.a.createElement(b,null,e)}))},b=function(t){function e(){var n,r;h(this,e);for(var o=arguments.length,a=Array(o),i=0;i-1?(a=e.substring(0,r),i=e.substring(r)):a=e,o.a.createElement(y.Provider,{value:{location:{pathname:a,search:i,hash:""},navigate:function(){throw new Error("You can't call navigate on the server.")}}},n)},R=g("Base",{baseuri:"/",basepath:"/"}),_=function(t){return o.a.createElement(R.Consumer,null,(function(e){return o.a.createElement(w,null,(function(n){return o.a.createElement(O,d({},e,n,t))}))}))},O=function(t){function e(){return h(this,e),m(this,t.apply(this,arguments))}return v(e,t),e.prototype.render=function(){var t=this.props,e=t.location,n=t.navigate,r=t.basepath,a=t.primary,i=t.children,s=(t.baseuri,t.component),c=void 0===s?"div":s,u=f(t,["location","navigate","basepath","primary","children","baseuri","component"]),p=o.a.Children.toArray(i).reduce((function(t,e){var n=G(r)(e);return t.concat(n)}),[]),h=e.pathname,m=Object(l.pick)(p,h);if(m){var v=m.params,g=m.uri,y=m.route,w=m.route.value;r=y.default?r:y.path.replace(/\*$/,"");var b=d({},v,{uri:g,location:e,navigate:function(t,e){return n(Object(l.resolve)(t,g),e)}}),P=o.a.cloneElement(w,b,w.props.children?o.a.createElement(_,{location:e,primary:a},w.props.children):void 0),O=a?x:c,S=a?d({uri:g,location:e,component:c},u):u;return o.a.createElement(R.Provider,{value:{baseuri:g,basepath:r}},o.a.createElement(O,S,P))}return null},e}(o.a.PureComponent);O.defaultProps={primary:!0};var S=g("Focus"),x=function(t){var e=t.uri,n=t.location,r=t.component,a=f(t,["uri","location","component"]);return o.a.createElement(S.Consumer,null,(function(t){return o.a.createElement(j,d({},a,{component:r,requestFocus:t,uri:e,location:n}))}))},E=!0,C=0,j=function(t){function e(){var n,r;h(this,e);for(var o=arguments.length,a=Array(o),i=0;i{if("undefined"==typeof document)return void r();const o=document.createElement("link");o.setAttribute("rel","prefetch"),o.setAttribute("href",t),Object.keys(e).forEach(t=>{o.setAttribute(t,e[t])}),o.onload=n,o.onerror=r;(document.getElementsByTagName("head")[0]||document.getElementsByName("script")[0].parentNode).appendChild(o)})}:function(t){return new Promise((e,n)=>{const r=new XMLHttpRequest;r.open("GET",t,!0),r.onload=()=>{200===r.status?e():n()},r.send(null)})},i={};var s=function(t,e){return new Promise(n=>{i[t]?n():a(t,e).then(()=>{n(),i[t]=!0}).catch(()=>{})})},c=n("5yr3"),u=n("30RF");const l={Error:"error",Success:"success"},p=t=>t&&t.default||t,d=t=>{var e;return`/page-data/${"/"===t?"index":e=(e="/"===(e=t)[0]?e.slice(1):e).endsWith("/")?e.slice(0,-1):e}/page-data.json`};function f(t,e){return void 0===e&&(e="GET"),new Promise((n,r)=>{const o=new XMLHttpRequest;o.open(e,t,!0),o.onreadystatechange=()=>{4==o.readyState&&n(o)},o.send(null)})}const h=function(t,e){void 0===e&&(e=null);const n={componentChunkName:t.componentChunkName,path:t.path,webpackCompilationHash:t.webpackCompilationHash,matchPath:t.matchPath,staticQueryHashes:t.staticQueryHashes};return{component:e,json:t.result,page:n}};let m=function(){function t(t,e){this.inFlightNetworkRequests=new Map,this.pageDb=new Map,this.inFlightDb=new Map,this.staticQueryDb={},this.pageDataDb=new Map,this.prefetchTriggered=new Set,this.prefetchCompleted=new Set,this.loadComponent=t,Object(u.d)(e)}var e=t.prototype;return e.memoizedGet=function(t){let e=this.inFlightNetworkRequests.get(t);return e||(e=f(t,"GET"),this.inFlightNetworkRequests.set(t,e)),e.then(e=>(this.inFlightNetworkRequests.delete(t),e)).catch(e=>{throw this.inFlightNetworkRequests.delete(t),e})},e.setApiRunner=function(t){this.apiRunner=t,this.prefetchDisabled=t("disableCorePrefetching").some(t=>t)},e.fetchPageDataJson=function(t){const{pagePath:e,retries:n=0}=t,r=d(e);return this.memoizedGet(r).then(r=>{const{status:o,responseText:a}=r;if(200===o)try{const e=JSON.parse(a);if(void 0===e.path)throw new Error("not a valid pageData response");return Object.assign(t,{status:l.Success,payload:e})}catch(i){}return 404===o||200===o?"/404.html"===e?Object.assign(t,{status:l.Error}):this.fetchPageDataJson(Object.assign(t,{pagePath:"/404.html",notFound:!0})):500===o?Object.assign(t,{status:l.Error}):n<3?this.fetchPageDataJson(Object.assign(t,{retries:n+1})):Object.assign(t,{status:l.Error})})},e.loadPageDataJson=function(t){const e=Object(u.b)(t);if(this.pageDataDb.has(e)){const t=this.pageDataDb.get(e);return Promise.resolve(t)}return this.fetchPageDataJson({pagePath:e}).then(t=>(this.pageDataDb.set(e,t),t))},e.findMatchPath=function(t){return Object(u.a)(t)},e.loadPage=function(t){const e=Object(u.b)(t);if(this.pageDb.has(e)){const t=this.pageDb.get(e);return Promise.resolve(t.payload)}if(this.inFlightDb.has(e))return this.inFlightDb.get(e);const n=Promise.all([this.loadAppData(),this.loadPageDataJson(e)]).then(t=>{const n=t[1];if(n.status===l.Error)return{status:l.Error};let r=n.payload;const{componentChunkName:o,staticQueryHashes:a=[]}=r,i={},s=this.loadComponent(o).then(e=>{let o;return i.createdAt=new Date,e?(i.status=l.Success,!0===n.notFound&&(i.notFound=!0),r=Object.assign(r,{webpackCompilationHash:t[0]?t[0].webpackCompilationHash:""}),o=h(r,e)):i.status=l.Error,o}),u=Promise.all(a.map(t=>{if(this.staticQueryDb[t]){const e=this.staticQueryDb[t];return{staticQueryHash:t,jsonPayload:e}}return this.memoizedGet(`/page-data/sq/d/${t}.json`).then(e=>{const n=JSON.parse(e.responseText);return{staticQueryHash:t,jsonPayload:n}})})).then(t=>{const e={};return t.forEach(t=>{let{staticQueryHash:n,jsonPayload:r}=t;e[n]=r,this.staticQueryDb[n]=r}),e});return Promise.all([s,u]).then(t=>{let n,[r,o]=t;return r&&(n={...r,staticQueryResults:o},i.payload=n,c.a.emit("onPostLoadPageResources",{page:n,pageResources:n})),this.pageDb.set(e,i),n})});return n.then(t=>{this.inFlightDb.delete(e)}).catch(t=>{throw this.inFlightDb.delete(e),t}),this.inFlightDb.set(e,n),n},e.loadPageSync=function(t){const e=Object(u.b)(t);if(this.pageDb.has(e)){return this.pageDb.get(e).payload}},e.shouldPrefetch=function(t){return!!(()=>{if("connection"in navigator&&void 0!==navigator.connection){if((navigator.connection.effectiveType||"").includes("2g"))return!1;if(navigator.connection.saveData)return!1}return!0})()&&!this.pageDb.has(t)},e.prefetch=function(t){if(!this.shouldPrefetch(t))return!1;if(this.prefetchTriggered.has(t)||(this.apiRunner("onPrefetchPathname",{pathname:t}),this.prefetchTriggered.add(t)),this.prefetchDisabled)return!1;const e=Object(u.b)(t);return this.doPrefetch(e).then(()=>{this.prefetchCompleted.has(t)||(this.apiRunner("onPostPrefetchPathname",{pathname:t}),this.prefetchCompleted.add(t))}),!0},e.doPrefetch=function(t){const e=d(t);return s(e,{crossOrigin:"anonymous",as:"fetch"}).then(()=>this.loadPageDataJson(t))},e.hovering=function(t){this.loadPage(t)},e.getResourceURLsForPathname=function(t){const e=Object(u.b)(t),n=this.pageDataDb.get(e);if(n){const t=h(n.payload);return[].concat(Object(o.a)(v(t.page.componentChunkName)),[d(e)])}return null},e.isPageNotFound=function(t){const e=Object(u.b)(t),n=this.pageDb.get(e);return!n||n.notFound},e.loadAppData=function(t){return void 0===t&&(t=0),this.memoizedGet("/page-data/app-data.json").then(e=>{const{status:n,responseText:r}=e;let o;if(200!==n&&t<3)return this.loadAppData(t+1);if(200===n)try{const t=JSON.parse(r);if(void 0===t.webpackCompilationHash)throw new Error("not a valid app-data response");o=t}catch(a){}return o})},t}();const v=t=>(window.___chunkMapping[t]||[]).map(t=>""+t);let g,y=function(t){function e(e,n){return t.call(this,t=>e.components[t]?e.components[t]().then(p).catch(()=>null):Promise.resolve(),n)||this}Object(r.a)(e,t);var n=e.prototype;return n.doPrefetch=function(e){return t.prototype.doPrefetch.call(this,e).then(t=>{if(t.status!==l.Success)return Promise.resolve();const e=t.payload,n=e.componentChunkName,r=v(n);return Promise.all(r.map(s)).then(()=>e)})},n.loadPageDataJson=function(e){return t.prototype.loadPageDataJson.call(this,e).then(t=>t.notFound?f(e,"HEAD").then(e=>200===e.status?{status:l.Error}:t):t)},e}(m);const w=t=>{g=t},b={getResourcesForPathname:t=>(console.warn("Warning: getResourcesForPathname is deprecated. Use loadPage instead"),g.i.loadPage(t)),getResourcesForPathnameSync:t=>(console.warn("Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead"),g.i.loadPageSync(t)),enqueue:t=>g.prefetch(t),getResourceURLsForPathname:t=>g.getResourceURLsForPathname(t),loadPage:t=>g.loadPage(t),loadPageSync:t=>g.loadPageSync(t),prefetch:t=>g.prefetch(t),isPageNotFound:t=>g.isPageNotFound(t),hovering:t=>g.hovering(t),loadAppData:()=>g.loadAppData()};e.default=b;function P(){return g?g.staticQueryDb:{}}},hd9s:function(t,e,n){"use strict";var r=n("284h"),o=n("TqRt");e.__esModule=!0,e.ScrollContainer=void 0;var a=o(n("pVnL")),i=o(n("VbXa")),s=r(n("q1tI")),c=o(n("i8i4")),u=o(n("17x9")),l=n("Enzk"),p=n("YwZP"),d={scrollKey:u.default.string.isRequired,shouldUpdateScroll:u.default.func,children:u.default.element.isRequired},f=function(t){function e(e){return t.call(this,e)||this}(0,i.default)(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=this,e=c.default.findDOMNode(this),n=this.props,r=n.location,o=n.scrollKey;if(e){e.addEventListener("scroll",(function(){t.props.context.save(r,o,e.scrollTop)}));var a=this.props.context.read(r,o);e.scrollTo(0,a||0)}},n.render=function(){return this.props.children},e}(s.Component),h=function(t){return s.createElement(p.Location,null,(function(e){var n=e.location;return s.createElement(l.ScrollContext.Consumer,null,(function(e){return s.createElement(f,(0,a.default)({},t,{context:e,location:n}))}))}))};e.ScrollContainer=h,h.propTypes=d},lw3w:function(t,e,n){var r;t.exports=(r=n("rzlk"))&&r.default||r},npZl:function(t,e,n){"use strict";var r=n("TqRt");n("Wbzz"),r(n("9hXx"))},nqlD:function(t,e,n){const{createContext:r}=n("q1tI");t.exports=r,t.exports.default=r},nwwn:function(t,e,n){"use strict";e.DEFAULT_OPTIONS={maxWidth:650,wrapperStyle:"",backgroundColor:"white",linkImagesToOriginal:!0,showCaptions:!1,markdownCaptions:!1,withWebp:!1,withAvif:!1,tracedSVG:!1,loading:"lazy",disableBgImageOnAlpha:!1,disableBgImage:!1},e.EMPTY_ALT="GATSBY_EMPTY_ALT",e.imageClass="gatsby-resp-image-image",e.imageWrapperClass="gatsby-resp-image-wrapper",e.imageBackgroundClass="gatsby-resp-image-background-image"},pVnL:function(t,e){function n(){return t.exports=n=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let{location:e}=t;const n=a.default.loadPageSync(e.pathname);return n?o.a.createElement(i.a,{location:e,pageResources:n,...n.json}):null}},xtsi:function(t,e,n){const r=n("LeKB"),{getResourcesForPathname:o,getResourcesForPathnameSync:a,getResourceURLsForPathname:i,loadPage:s,loadPageSync:c}=n("emEt").publicLoader;e.apiRunner=function(t,e,n,u){void 0===e&&(e={});let l=r.map(n=>{if(!n.plugin[t])return;e.getResourcesForPathnameSync=a,e.getResourcesForPathname=o,e.getResourceURLsForPathname=i,e.loadPage=s,e.loadPageSync=c;const r=n.plugin[t](e,n.options);return r&&u&&(e=u({args:e,result:r,plugin:n})),r});return l=l.filter(t=>void 0!==t),l.length>0?l:n?[n]:[]},e.apiRunnerAsync=(t,e,n)=>r.reduce((n,r)=>r.plugin[t]?n.then(()=>r.plugin[t](e,r.options)):n,Promise.resolve())}},[["UxWs",1,8]]]); +//# sourceMappingURL=app-a5e2622415d2f9374880.js.map \ No newline at end of file diff --git a/app-3488d54c30c10bf56ca6.js.LICENSE.txt b/app-a5e2622415d2f9374880.js.LICENSE.txt similarity index 100% rename from app-3488d54c30c10bf56ca6.js.LICENSE.txt rename to app-a5e2622415d2f9374880.js.LICENSE.txt diff --git a/app-bf2df6aaa6a77caf090e.js.map b/app-a5e2622415d2f9374880.js.map similarity index 99% rename from app-bf2df6aaa6a77caf090e.js.map rename to app-a5e2622415d2f9374880.js.map index 4d2038f..61d6ed2 100644 --- a/app-bf2df6aaa6a77caf090e.js.map +++ b/app-a5e2622415d2f9374880.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./node_modules/gatsby-link/index.js","webpack:///./node_modules/gatsby-react-router-scroll/session-storage.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireWildcard.js","webpack:///./.cache/normalize-page-path.js","webpack:///./.cache/find-path.js","webpack:///./node_modules/gatsby-react-router-scroll/use-scroll-restoration.js","webpack:///./.cache/emitter.js","webpack:///./node_modules/mitt/dist/mitt.es.js","webpack:///./node_modules/gatsby-react-router-scroll/index.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./.cache/react-lifecycles-compat.js","webpack:///./node_modules/@reach/router/es/lib/history.js","webpack:///./node_modules/gatsby-plugin-manifest/get-manifest-pathname.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-handler.js","webpack:///./.cache/page-renderer.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/@reach/router/es/lib/utils.js","webpack:///./.cache/api-runner-browser-plugins.js","webpack:///./node_modules/@mikaelkristiansson/domready/ready.js","webpack:///./.cache/register-service-worker.js","webpack:///./.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js","webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./.cache/route-announcer-props.js","webpack:///./.cache/navigation.js","webpack:///./node_modules/shallow-compare/es/index.js","webpack:///./.cache/ensure-resources.js","webpack:///./.cache/production-app.js","webpack:///./node_modules/@babel/runtime/helpers/inheritsLoose.js","webpack:///./.cache/gatsby-browser-entry.js","webpack:///./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js","webpack:///./node_modules/@reach/router/es/index.js","webpack:///./node_modules/@babel/runtime/helpers/typeof.js","webpack:///./.cache/strip-prefix.js","webpack:///./node_modules/gatsby-link/parse-path.js","webpack:///./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///./.cache/prefetch.js","webpack:///./.cache/loader.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-container.js","webpack:///./.cache/public-page-renderer.js","webpack:///./node_modules/gatsby-plugin-manifest/gatsby-browser.js","webpack:///./.cache/create-react-context.js","webpack:///./node_modules/gatsby-remark-images/constants.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/gatsby-plugin-google-analytics/gatsby-browser.js","webpack:///./node_modules/gatsby-remark-images/gatsby-browser.js","webpack:///./.cache/public-page-renderer-prod.js","webpack:///./.cache/api-runner-browser.js"],"names":["_interopRequireDefault","exports","__esModule","withPrefix","withAssetPrefix","path","getGlobalPathPrefix","navigateTo","replace","push","navigate","default","_objectWithoutPropertiesLoose2","_assertThisInitialized2","_inheritsLoose2","_extends2","_propTypes","_react","_router","_utils","_parsePath","parsePath","isAbsolutePath","startsWith","prefix","_ref","_prefix","getGlobalBasePrefix","isLocalLink","base","endsWith","slice","rewriteLinkPath","relativeTo","current","resolve","absolutify","NavLinkPropTypes","activeClassName","string","activeStyle","object","partiallyActive","bool","GatsbyLinkLocationWrapper","props","createElement","Location","_ref2","location","GatsbyLink","_location","_React$Component","_this","call","this","defaultGetProps","_ref3","isPartiallyCurrent","isCurrent","className","filter","Boolean","join","style","IOSupported","window","IntersectionObserver","state","handleRef","bind","_proto","prototype","_prefetch","currentPath","pathname","rewrittenPath","to","newPathName","___loader","enqueue","componentDidUpdate","prevProps","prevState","componentDidMount","componentWillUnmount","io","_this$io","instance","el","unobserve","disconnect","ref","cb","_this2","innerRef","hasOwnProperty","entries","forEach","entry","target","isIntersecting","intersectionRatio","observe","render","_this3","_this$props","_this$props$getProps","getProps","_onClick","onClick","_onMouseEnter","onMouseEnter","rest","prefixedTo","Link","e","hovering","button","defaultPrevented","metaKey","altKey","ctrlKey","shiftKey","preventDefault","shouldReplace","encodeURI","___navigate","href","Component","propTypes","func","isRequired","showDeprecationWarning","functionName","altFunctionName","version","console","warn","_default","forwardRef","options","___push","___replace","SessionStorage","read","key","stateKey","getStateKey","value","sessionStorage","getItem","JSON","parse","save","storedValue","stringify","setItem","stateKeyBase","_typeof","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","module","obj","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","desc","set","undefined","charAt","length","pathCache","Map","matchPaths","trimPathname","rawPathname","decodeURIComponent","stripPrefix","__BASE_PATH__","split","URL","setMatchPaths","findMatchPath","trimmedPathname","cleanPath","pickPaths","map","matchPath","originalPath","pick","normalizePagePath","route","grabMatchParams","params","findPath","foundPath","useScrollRestoration","identifier","useLocation","useContext","_scrollHandler","ScrollContext","useRef","useLayoutEffect","position","scrollTo","onScroll","scrollTop","emitter","all","create","on","type","handler","off","splice","indexOf","emit","evt","mitt","ScrollContainer","ScrollHandler","_scrollContainer","_useScrollRestoration","source","excluded","i","sourceKeys","keys","polyfill","_extends","assign","arguments","getLocation","_source$location","search","hash","origin","protocol","host","hostname","port","canUseDOM","decodeURI","history","createHistory","listeners","transitioning","resolveTransition","_onTransitionComplete","listen","listener","popstateListener","action","addEventListener","removeEventListener","fn","_ref$replace","go","Date","now","replaceState","pushState","transition","Promise","res","createMemorySource","initialPath","searchIndex","initialLocation","substr","index","stack","states","name","_","uri","_uri$split","_uri$split$","_uri$split2","_uri$split2$","newIndex","document","globalHistory","localizedManifests","Array","isArray","localizedManifest","find","app","start_url","lang","_interopRequireWildcard","React","_sessionStorage","createContext","displayName","_len","args","_key","apply","concat","_stateStorage","scrollListener","scrollY","windowScroll","shouldUpdateScroll","scrollToHash","node","getElementById","substring","scrollIntoView","prevRouterProps","routerProps","scrollPosition","_this$props$location","_this$props$location2","Provider","children","element","PageRenderer","_inheritsLoose","pageResources","json","pageContext","__params","pathContext","replacementElement","apiRunner","loader","publicLoader","pageElement","component","page","result","pop","_arrayLikeToArray","arr","len","arr2","_toConsumableArray","iter","Symbol","iterator","from","o","minLen","n","toString","constructor","test","TypeError","routes","match","default_","uriPathname","uriSegments","segmentize","isRootUri","ranked","rankRoutes","l","missed","routeSegments","max","Math","routeSegment","uriSegment","isSplat","dynamicMatch","paramRe","exec","reservedNames","_to$split","toPathname","toQuery","basePathname","toSegments","baseSegments","addQuery","allSegments","segments","segment","insertParams","_path$split","pathBase","_path$split$","query","constructedPath","_params$location","_params$location$sear","searchSplit","validateRedirect","isDynamic","sort","rankRoute","score","reduce","isRootSegment","SEGMENT_POINTS","a","b","q","shallowCompare","obj1","obj2","obj1Keys","every","plugin","require","ie10","navigator","appVersion","fns","doc","hack","documentElement","doScroll","loaded","readyState","shift","setTimeout","definition","error","serviceWorker","register","then","reg","installingWorker","installing","log","controller","___swUpdated","___failedResources","reload","catch","components","component---src-pages-404-js","component---src-pages-index-js","component---src-templates-blog-post-js","self","ReferenceError","condition","format","c","d","f","Error","argIndex","framesToPop","_setPrototypeOf","p","setPrototypeOf","__proto__","RouteAnnouncerProps","id","top","width","height","padding","overflow","clip","whiteSpace","border","redirectMap","redirectIgnoreCaseMap","maybeRedirect","redirect","toLowerCase","toPath","redirects","ignoreCase","fromPath","onPreRouteUpdate","prevLocation","onRouteUpdate","timeoutId","loadPage","status","PageResourceStatus","clearTimeout","webpackCompilationHash","___webpackCompilationHash","postMessage","gatsbyApi","reachNavigate","results","getSavedScrollPosition","oldPathname","RouteAnnouncer","announcementRef","createRef","nextProps","requestAnimationFrame","pageName","title","pageHeadings","querySelectorAll","textContent","newAnnouncement","innerText","compareLocationProps","nextLocation","_prevLocation$state","_nextLocation$state","RouteUpdates","_React$Component2","_proto2","shouldComponentUpdate","Fragment","shallowDiffers","_i","EnsureResources","loadPageSync","getDerivedStateFromProps","loadResources","rawPath","setState","nextState","ProdLoader","asyncRequires","setLoader","setApiRunner","___emitter","apiRunnerAsync","RouteHandler","BaseContext","baseuri","basepath","DataContext","GatsbyRoot","staticQueryResults","getStaticQueryResults","StaticQueryContext","LocationHandler","Consumer","Router","pagePath","browserLoc","SiteRoot","_ref4","App","renderer","ReactDOM","hydrate","domReady","subClass","superClass","prefetchPathname","StaticQueryDataRenderer","staticQueryData","data","finalData","StaticQuery","useStaticQuery","_context$query","context","isNaN","Number","graphql","_objectWithoutProperties","_classCallCheck","Constructor","_possibleConstructorReturn","_inherits","enumerable","writable","configurable","createNamedContext","defaultValue","Ctx","LocationContext","LocationProvider","_temp","getContext","refs","unlisten","_props$history","componentDidCatch","info","isRedirect","_navigate","unmounted","defaultProps","ServerLocation","url","baseContext","locationContext","RouterImpl","_React$PureComponent","_props","_navigate2","primary","_props$component","domProps","Children","toArray","array","child","createRoute","clone","cloneElement","FocusWrapper","FocusHandler","wrapperProps","PureComponent","FocusContext","requestFocus","FocusHandlerImpl","initialRender","focusHandlerCount","_temp2","_this4","_len2","_key2","shouldFocus","focus","myURIChanged","navigatedUpToMe","contains","activeElement","_this5","_props2","_props2$component","Comp","outline","tabIndex","k","C","_ref5","_ref6","_props$getProps","anchorProps","encodedHref","event","shouldNavigate","_location$state","restState","RedirectRequest","redirectTo","RedirectImpl","_React$Component3","_props3","_props3$replace","noThrow","resolvedTo","_props4","Redirect","_ref7","Match","_ref8","_ref9","_ref10","resolvedPath","useNavigate","useParams","useMatch","stripSlashes","str","elementPath","hashIndex","supportedPrefetchStrategy","feature","fakeLink","relList","supports","err","support","reject","link","setAttribute","onload","onerror","getElementsByTagName","getElementsByName","parentNode","appendChild","req","XMLHttpRequest","open","send","preFetched","prefetch","Success","preferDefault","m","createPageDataUrl","s","doFetch","method","onreadystatechange","toPageResources","pageData","componentChunkName","staticQueryHashes","BaseLoader","loadComponent","inFlightNetworkRequests","pageDb","inFlightDb","staticQueryDb","pageDataDb","prefetchTriggered","Set","prefetchCompleted","memoizedGet","inFlightPromise","response","delete","prefetchDisabled","some","fetchPageDataJson","loadObj","retries","responseText","jsonPayload","payload","notFound","loadPageDataJson","loadAppData","allData","finalResult","componentChunkPromise","createdAt","staticQueryBatchPromise","staticQueryHash","staticQueryResultsMap","shouldPrefetch","doesConnectionSupportPrefetch","connection","effectiveType","includes","saveData","add","realPath","doPrefetch","pageDataUrl","prefetchHelper","crossOrigin","as","getResourceURLsForPathname","createComponentUrls","isPageNotFound","appData","___chunkMapping","chunk","__PATH_PREFIX__","_BaseLoader","chunkName","componentUrls","_loader","getResourcesForPathname","getResourcesForPathnameSync","_reactDom","scrollKey","ScrollContainerImplementation","findDOMNode","DEFAULT_OPTIONS","maxWidth","wrapperStyle","backgroundColor","linkImagesToOriginal","showCaptions","markdownCaptions","withWebp","withAvif","tracedSVG","loading","disableBgImageOnAlpha","disableBgImage","EMPTY_ALT","imageClass","imageWrapperClass","imageBackgroundClass","pluginOptions","ga","excludeGAPaths","rx","delay","pageTransitionDelay","_require","apiCallbackContext","imageWrappers","_loop","imageWrapper","backgroundElement","querySelector","imageElement","onImageLoad","onImageComplete","opacity","color","boxShadow","complete","ProdPageRenderer","InternalPageRenderer","plugins","api","defaultReturn","argTransform","previous","next"],"mappings":";6FAEA,IAAIA,EAAyB,EAAQ,QAErCC,EAAQC,YAAa,EACrBD,EAAQE,WAAaA,EACrBF,EAAQG,gBA4DR,SAAyBC,GACvB,OAAOF,EAAWE,EAAMC,MA5D1BL,EAAQM,WAAaN,EAAQO,QAAUP,EAAQQ,KAAOR,EAAQS,SAAWT,EAAQU,aAAU,EAE3F,IAAIC,EAAiCZ,EAAuB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AAWA,EAChBnL,EAAKuN,aAAeA,EAEpB,MAAMnL,EAAS0E,EAAOA,OAAOqY,GAAKnf,EAAM8G,EAAOpR,SAI/C,OAHI0M,GAAUid,IACZrf,EAAOqf,EAAa,CAAErf,OAAMoC,SAAQ0E,YAE/B1E,IAMT,OAFAwJ,EAAUA,EAAQlb,OAAO0R,QAA6B,IAAZA,GAEtCwJ,EAAQ5T,OAAS,EACZ4T,EACEwT,EACF,CAACA,GAED,IAIXtyB,EAAQohB,eAAiB,CAACiR,EAAKnf,EAAMof,IACnCF,EAAQ/Y,OACN,CAACmZ,EAAUC,IACTA,EAAKzY,OAAOqY,GACRG,EAAStX,KAAK,IAAMuX,EAAKzY,OAAOqY,GAAKnf,EAAMuf,EAAK7pB,UAChD4pB,EACNxhB,QAAQ9O,a","file":"app-bf2df6aaa6a77caf090e.js","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.withPrefix = withPrefix;\nexports.withAssetPrefix = withAssetPrefix;\nexports.navigateTo = exports.replace = exports.push = exports.navigate = exports.default = void 0;\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _router = require(\"@reach/router\");\n\nvar _utils = require(\"@reach/router/lib/utils\");\n\nvar _parsePath = require(\"./parse-path\");\n\nexports.parsePath = _parsePath.parsePath;\n\nvar isAbsolutePath = function isAbsolutePath(path) {\n return path === null || path === void 0 ? void 0 : path.startsWith(\"/\");\n};\n\nfunction withPrefix(path, prefix) {\n var _ref, _prefix;\n\n if (prefix === void 0) {\n prefix = getGlobalBasePrefix();\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n if (path.startsWith(\"./\") || path.startsWith(\"../\")) {\n return path;\n }\n\n var base = (_ref = (_prefix = prefix) !== null && _prefix !== void 0 ? _prefix : getGlobalPathPrefix()) !== null && _ref !== void 0 ? _ref : \"/\";\n return \"\" + ((base === null || base === void 0 ? void 0 : base.endsWith(\"/\")) ? base.slice(0, -1) : base) + (path.startsWith(\"/\") ? path : \"/\" + path);\n} // These global values are wrapped in typeof clauses to ensure the values exist.\n// This is especially problematic in unit testing of this component.\n\n\nvar getGlobalPathPrefix = function getGlobalPathPrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __PATH_PREFIX__ !== \"undefined\" ? __PATH_PREFIX__ : undefined : __PATH_PREFIX__;\n};\n\nvar getGlobalBasePrefix = function getGlobalBasePrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __BASE_PATH__ !== \"undefined\" ? __BASE_PATH__ : undefined : __BASE_PATH__;\n};\n\nvar isLocalLink = function isLocalLink(path) {\n return path && !path.startsWith(\"http://\") && !path.startsWith(\"https://\") && !path.startsWith(\"//\");\n};\n\nfunction withAssetPrefix(path) {\n return withPrefix(path, getGlobalPathPrefix());\n}\n\nfunction absolutify(path, current) {\n // If it's already absolute, return as-is\n if (isAbsolutePath(path)) {\n return path;\n }\n\n return (0, _utils.resolve)(path, current);\n}\n\nvar rewriteLinkPath = function rewriteLinkPath(path, relativeTo) {\n if (typeof path === \"number\") {\n return path;\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n return isAbsolutePath(path) ? withPrefix(path) : absolutify(path, relativeTo);\n};\n\nvar NavLinkPropTypes = {\n activeClassName: _propTypes.default.string,\n activeStyle: _propTypes.default.object,\n partiallyActive: _propTypes.default.bool\n}; // Set up IntersectionObserver\n\nvar createIntersectionObserver = function createIntersectionObserver(el, cb) {\n var io = new window.IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n if (el === entry.target) {\n // Check if element is within viewport, remove listener, destroy observer, and run link callback.\n // MSEdge doesn't currently support isIntersecting, so also test for an intersectionRatio > 0\n if (entry.isIntersecting || entry.intersectionRatio > 0) {\n io.unobserve(el);\n io.disconnect();\n cb();\n }\n }\n });\n }); // Add element to the observer\n\n io.observe(el);\n return {\n instance: io,\n el: el\n };\n};\n\nfunction GatsbyLinkLocationWrapper(props) {\n return /*#__PURE__*/_react.default.createElement(_router.Location, null, function (_ref2) {\n var location = _ref2.location;\n return /*#__PURE__*/_react.default.createElement(GatsbyLink, (0, _extends2.default)({}, props, {\n _location: location\n }));\n });\n}\n\nvar GatsbyLink = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(GatsbyLink, _React$Component);\n\n function GatsbyLink(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // Default to no support for IntersectionObserver\n\n _this.defaultGetProps = function (_ref3) {\n var isPartiallyCurrent = _ref3.isPartiallyCurrent,\n isCurrent = _ref3.isCurrent;\n\n if (_this.props.partiallyActive ? isPartiallyCurrent : isCurrent) {\n return {\n className: [_this.props.className, _this.props.activeClassName].filter(Boolean).join(\" \"),\n style: (0, _extends2.default)({}, _this.props.style, _this.props.activeStyle)\n };\n }\n\n return null;\n };\n\n var IOSupported = false;\n\n if (typeof window !== \"undefined\" && window.IntersectionObserver) {\n IOSupported = true;\n }\n\n _this.state = {\n IOSupported: IOSupported\n };\n _this.handleRef = _this.handleRef.bind((0, _assertThisInitialized2.default)(_this));\n return _this;\n }\n\n var _proto = GatsbyLink.prototype;\n\n _proto._prefetch = function _prefetch() {\n var currentPath = window.location.pathname; // reach router should have the correct state\n\n if (this.props._location && this.props._location.pathname) {\n currentPath = this.props._location.pathname;\n }\n\n var rewrittenPath = rewriteLinkPath(this.props.to, currentPath);\n var newPathName = (0, _parsePath.parsePath)(rewrittenPath).pathname; // Prefech is used to speed up next navigations. When you use it on the current navigation,\n // there could be a race-condition where Chrome uses the stale data instead of waiting for the network to complete\n\n if (currentPath !== newPathName) {\n ___loader.enqueue(newPathName);\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Preserve non IO functionality if no support\n if (this.props.to !== prevProps.to && !this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n // Preserve non IO functionality if no support\n if (!this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (!this.io) {\n return;\n }\n\n var _this$io = this.io,\n instance = _this$io.instance,\n el = _this$io.el;\n instance.unobserve(el);\n instance.disconnect();\n };\n\n _proto.handleRef = function handleRef(ref) {\n var _this2 = this;\n\n if (this.props.innerRef && this.props.innerRef.hasOwnProperty(\"current\")) {\n this.props.innerRef.current = ref;\n } else if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n if (this.state.IOSupported && ref) {\n // If IO supported and element reference found, setup Observer functionality\n this.io = createIntersectionObserver(ref, function () {\n _this2._prefetch();\n });\n }\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var _this$props = this.props,\n to = _this$props.to,\n _this$props$getProps = _this$props.getProps,\n getProps = _this$props$getProps === void 0 ? this.defaultGetProps : _this$props$getProps,\n _onClick = _this$props.onClick,\n _onMouseEnter = _this$props.onMouseEnter,\n $activeClassName = _this$props.activeClassName,\n $activeStyle = _this$props.activeStyle,\n $innerRef = _this$props.innerRef,\n partiallyActive = _this$props.partiallyActive,\n state = _this$props.state,\n replace = _this$props.replace,\n _location = _this$props._location,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"to\", \"getProps\", \"onClick\", \"onMouseEnter\", \"activeClassName\", \"activeStyle\", \"innerRef\", \"partiallyActive\", \"state\", \"replace\", \"_location\"]);\n\n if (process.env.NODE_ENV !== \"production\" && !isLocalLink(to)) {\n console.warn(\"External link \" + to + \" was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links\");\n }\n\n var prefixedTo = rewriteLinkPath(to, _location.pathname);\n\n if (!isLocalLink(prefixedTo)) {\n return /*#__PURE__*/_react.default.createElement(\"a\", (0, _extends2.default)({\n href: prefixedTo\n }, rest));\n }\n\n return /*#__PURE__*/_react.default.createElement(_router.Link, (0, _extends2.default)({\n to: prefixedTo,\n state: state,\n getProps: getProps,\n innerRef: this.handleRef,\n onMouseEnter: function onMouseEnter(e) {\n if (_onMouseEnter) {\n _onMouseEnter(e);\n }\n\n ___loader.hovering((0, _parsePath.parsePath)(prefixedTo).pathname);\n },\n onClick: function onClick(e) {\n if (_onClick) {\n _onClick(e);\n }\n\n if (e.button === 0 && // ignore right clicks\n !_this3.props.target && // let browser handle \"target=_blank\"\n !e.defaultPrevented && // onClick prevented default\n !e.metaKey && // ignore clicks with modifier keys...\n !e.altKey && !e.ctrlKey && !e.shiftKey) {\n e.preventDefault();\n var shouldReplace = replace;\n\n var isCurrent = encodeURI(prefixedTo) === _location.pathname;\n\n if (typeof replace !== \"boolean\" && isCurrent) {\n shouldReplace = true;\n } // Make sure the necessary scripts and data are\n // loaded before continuing.\n\n\n window.___navigate(prefixedTo, {\n state: state,\n replace: shouldReplace\n });\n }\n\n return true;\n }\n }, rest));\n };\n\n return GatsbyLink;\n}(_react.default.Component);\n\nGatsbyLink.propTypes = (0, _extends2.default)({}, NavLinkPropTypes, {\n onClick: _propTypes.default.func,\n to: _propTypes.default.string.isRequired,\n replace: _propTypes.default.bool,\n state: _propTypes.default.object\n});\n\nvar showDeprecationWarning = function showDeprecationWarning(functionName, altFunctionName, version) {\n return console.warn(\"The \\\"\" + functionName + \"\\\" method is now deprecated and will be removed in Gatsby v\" + version + \". Please use \\\"\" + altFunctionName + \"\\\" instead.\");\n};\n\nvar _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n return /*#__PURE__*/_react.default.createElement(GatsbyLinkLocationWrapper, (0, _extends2.default)({\n innerRef: ref\n }, props));\n});\n\nexports.default = _default;\n\nvar navigate = function navigate(to, options) {\n window.___navigate(rewriteLinkPath(to, window.location.pathname), options);\n};\n\nexports.navigate = navigate;\n\nvar push = function push(to) {\n showDeprecationWarning(\"push\", \"navigate\", 3);\n\n window.___push(rewriteLinkPath(to, window.location.pathname));\n};\n\nexports.push = push;\n\nvar replace = function replace(to) {\n showDeprecationWarning(\"replace\", \"navigate\", 3);\n\n window.___replace(rewriteLinkPath(to, window.location.pathname));\n}; // TODO: Remove navigateTo for Gatsby v3\n\n\nexports.replace = replace;\n\nvar navigateTo = function navigateTo(to) {\n showDeprecationWarning(\"navigateTo\", \"navigate\", 3);\n return push(to);\n};\n\nexports.navigateTo = navigateTo;","\"use strict\";\n\nexports.__esModule = true;\nexports.SessionStorage = void 0;\nvar STATE_KEY_PREFIX = \"@@scroll|\";\nvar GATSBY_ROUTER_SCROLL_STATE = \"___GATSBY_REACT_ROUTER_SCROLL\";\n\nvar SessionStorage = /*#__PURE__*/function () {\n function SessionStorage() {}\n\n var _proto = SessionStorage.prototype;\n\n _proto.read = function read(location, key) {\n var stateKey = this.getStateKey(location, key);\n\n try {\n var value = window.sessionStorage.getItem(stateKey);\n return value ? JSON.parse(value) : 0;\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to access sessionStorage; sessionStorage is not available.\");\n }\n\n if (window && window[GATSBY_ROUTER_SCROLL_STATE] && window[GATSBY_ROUTER_SCROLL_STATE][stateKey]) {\n return window[GATSBY_ROUTER_SCROLL_STATE][stateKey];\n }\n\n return 0;\n }\n };\n\n _proto.save = function save(location, key, value) {\n var stateKey = this.getStateKey(location, key);\n var storedValue = JSON.stringify(value);\n\n try {\n window.sessionStorage.setItem(stateKey, storedValue);\n } catch (e) {\n if (window && window[GATSBY_ROUTER_SCROLL_STATE]) {\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n } else {\n window[GATSBY_ROUTER_SCROLL_STATE] = {};\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to save state in sessionStorage; sessionStorage is not available.\");\n }\n }\n };\n\n _proto.getStateKey = function getStateKey(location, key) {\n var stateKeyBase = \"\" + STATE_KEY_PREFIX + location.pathname;\n return key === null || typeof key === \"undefined\" ? stateKeyBase : stateKeyBase + \"|\" + key;\n };\n\n return SessionStorage;\n}();\n\nexports.SessionStorage = SessionStorage;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n var cache = _getRequireWildcardCache(nodeInterop);\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj[\"default\"] = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nmodule.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default path => {\n if (path === undefined) {\n return path\n }\n if (path === `/`) {\n return `/`\n }\n if (path.charAt(path.length - 1) === `/`) {\n return path.slice(0, -1)\n }\n return path\n}\n","import { pick } from \"@reach/router/lib/utils\"\nimport stripPrefix from \"./strip-prefix\"\nimport normalizePagePath from \"./normalize-page-path\"\n\nconst pathCache = new Map()\nlet matchPaths = []\n\nconst trimPathname = rawPathname => {\n const pathname = decodeURIComponent(rawPathname)\n // Remove the pathPrefix from the pathname.\n const trimmedPathname = stripPrefix(pathname, __BASE_PATH__)\n // Remove any hashfragment\n .split(`#`)[0]\n // Remove search query\n .split(`?`)[0]\n\n return trimmedPathname\n}\n\nfunction absolutify(path) {\n // If it's already absolute, return as-is\n if (\n path.startsWith(`/`) ||\n path.startsWith(`https://`) ||\n path.startsWith(`http://`)\n ) {\n return path\n }\n // Calculate path relative to current location, adding a trailing slash to\n // match behavior of @reach/router\n return new URL(\n path,\n window.location.href + (window.location.href.endsWith(`/`) ? `` : `/`)\n ).pathname\n}\n\n/**\n * Set list of matchPaths\n *\n * @param {Array<{path: string, matchPath: string}>} value collection of matchPaths\n */\nexport const setMatchPaths = value => {\n matchPaths = value\n}\n\n/**\n * Return a matchpath url\n * if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n * `/foo?bar=far` => `/page1`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string|null}\n */\nexport const findMatchPath = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return normalizePagePath(path.route.originalPath)\n }\n\n return null\n}\n\n/**\n * Return a matchpath params from reach/router rules\n * if `match-paths.json` contains `{ \":bar/*foo\" }`, and the path is /baz/zaz/zoo\n * then it returns\n * { bar: baz, foo: zaz/zoo }\n *\n * @param {string} rawPathname A raw pathname\n * @return {object}\n */\nexport const grabMatchParams = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return path.params\n }\n\n return {}\n}\n\n// Given a raw URL path, returns the cleaned version of it (trim off\n// `#` and query params), or if it matches an entry in\n// `match-paths.json`, its matched path is returned\n//\n// E.g. `/foo?bar=far` => `/foo`\n//\n// Or if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n// `/foo?bar=far` => `/page1`\nexport const findPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n if (pathCache.has(trimmedPathname)) {\n return pathCache.get(trimmedPathname)\n }\n\n let foundPath = findMatchPath(trimmedPathname)\n\n if (!foundPath) {\n foundPath = cleanPath(rawPathname)\n }\n\n pathCache.set(trimmedPathname, foundPath)\n\n return foundPath\n}\n\n/**\n * Clean a url and converts /index.html => /\n * E.g. `/foo?bar=far` => `/foo`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string}\n */\nexport const cleanPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n\n let foundPath = trimmedPathname\n if (foundPath === `/index.html`) {\n foundPath = `/`\n }\n\n foundPath = normalizePagePath(foundPath)\n\n return foundPath\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = useScrollRestoration;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _react = require(\"react\");\n\nvar _router = require(\"@reach/router\");\n\nfunction useScrollRestoration(identifier) {\n var location = (0, _router.useLocation)();\n var state = (0, _react.useContext)(_scrollHandler.ScrollContext);\n var ref = (0, _react.useRef)();\n (0, _react.useLayoutEffect)(function () {\n if (ref.current) {\n var position = state.read(location, identifier);\n ref.current.scrollTo(0, position || 0);\n }\n }, []);\n return {\n ref: ref,\n onScroll: function onScroll() {\n if (ref.current) {\n state.save(location, identifier, ref.current.scrollTop);\n }\n }\n };\n}","import mitt from \"mitt\"\n\nconst emitter = mitt()\nexport default emitter\n","// \n// An event handler can take an optional event argument\n// and should not return a value\n \n \n\n// An array of all currently registered event handlers for a type\n \n \n// A map of event types and their corresponding event handlers.\n \n \n \n \n\n/** Mitt: Tiny (~200b) functional event emitter / pubsub.\n * @name mitt\n * @returns {Mitt}\n */\nfunction mitt(all ) {\n\tall = all || Object.create(null);\n\n\treturn {\n\t\t/**\n\t\t * Register an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to listen for, or `\"*\"` for all events\n\t\t * @param {Function} handler Function to call in response to given event\n\t\t * @memberOf mitt\n\t\t */\n\t\ton: function on(type , handler ) {\n\t\t\t(all[type] || (all[type] = [])).push(handler);\n\t\t},\n\n\t\t/**\n\t\t * Remove an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to unregister `handler` from, or `\"*\"`\n\t\t * @param {Function} handler Handler function to remove\n\t\t * @memberOf mitt\n\t\t */\n\t\toff: function off(type , handler ) {\n\t\t\tif (all[type]) {\n\t\t\t\tall[type].splice(all[type].indexOf(handler) >>> 0, 1);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Invoke all handlers for the given type.\n\t\t * If present, `\"*\"` handlers are invoked after type-matched handlers.\n\t\t *\n\t\t * @param {String} type The event type to invoke\n\t\t * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler\n\t\t * @memberOf mitt\n\t\t */\n\t\temit: function emit(type , evt ) {\n\t\t\t(all[type] || []).slice().map(function (handler) { handler(evt); });\n\t\t\t(all['*'] || []).slice().map(function (handler) { handler(type, evt); });\n\t\t}\n\t};\n}\n\nexport default mitt;\n//# sourceMappingURL=mitt.es.js.map\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = exports.ScrollContainer = exports.ScrollContext = void 0;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nexports.ScrollContext = _scrollHandler.ScrollHandler;\n\nvar _scrollContainer = require(\"./scroll-container\");\n\nexports.ScrollContainer = _scrollContainer.ScrollContainer;\n\nvar _useScrollRestoration = require(\"./use-scroll-restoration\");\n\nexports.useScrollRestoration = _useScrollRestoration.useScrollRestoration;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","exports.polyfill = Component => Component\n","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n\n\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\n\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n var resolveTransition = function resolveTransition() {};\n\n return {\n get location() {\n return location;\n },\n\n get transitioning() {\n return transitioning;\n },\n\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({ location: location, action: \"POP\" });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, { key: Date.now() + \"\" });\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({ location: location, action: \"PUSH\" });\n });\n return transition;\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n\n return {\n get location() {\n return stack[index];\n },\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n\n index++;\n stack.push({ pathname: pathname, search: search.length ? \"?\" + search : search });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n\n stack[index] = { pathname: pathname, search: search };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n\n index = newIndex;\n }\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\n\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate;\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport { globalHistory, navigate, createHistory, createMemorySource };","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @return string\n */\nvar _default = function _default(pathname, localizedManifests) {\n var defaultFilename = \"manifest.webmanifest\";\n\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n\n var localizedManifest = localizedManifests.find(function (app) {\n return pathname.startsWith(app.start_url);\n });\n\n if (!localizedManifest) {\n return defaultFilename;\n }\n\n return \"manifest_\" + localizedManifest.lang + \".webmanifest\";\n};\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollHandler = exports.ScrollContext = void 0;\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _sessionStorage = require(\"./session-storage\");\n\nvar ScrollContext = /*#__PURE__*/React.createContext(new _sessionStorage.SessionStorage());\nexports.ScrollContext = ScrollContext;\nScrollContext.displayName = \"GatsbyScrollContext\";\n\nvar ScrollHandler = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollHandler, _React$Component);\n\n function ScrollHandler() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this._stateStorage = new _sessionStorage.SessionStorage();\n\n _this.scrollListener = function () {\n var key = _this.props.location.key;\n\n if (key) {\n _this._stateStorage.save(_this.props.location, key, window.scrollY);\n }\n };\n\n _this.windowScroll = function (position, prevProps) {\n if (_this.shouldUpdateScroll(prevProps, _this.props)) {\n window.scrollTo(0, position);\n }\n };\n\n _this.scrollToHash = function (hash, prevProps) {\n var node = document.getElementById(hash.substring(1));\n\n if (node && _this.shouldUpdateScroll(prevProps, _this.props)) {\n node.scrollIntoView();\n }\n };\n\n _this.shouldUpdateScroll = function (prevRouterProps, routerProps) {\n var shouldUpdateScroll = _this.props.shouldUpdateScroll;\n\n if (!shouldUpdateScroll) {\n return true;\n } // Hack to allow accessing this._stateStorage.\n\n\n return shouldUpdateScroll.call((0, _assertThisInitialized2.default)(_this), prevRouterProps, routerProps);\n };\n\n return _this;\n }\n\n var _proto = ScrollHandler.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n window.addEventListener(\"scroll\", this.scrollListener);\n var scrollPosition;\n var _this$props$location = this.props.location,\n key = _this$props$location.key,\n hash = _this$props$location.hash;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n\n if (scrollPosition) {\n this.windowScroll(scrollPosition, undefined);\n } else if (hash) {\n this.scrollToHash(decodeURI(hash), undefined);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.scrollListener);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props$location2 = this.props.location,\n hash = _this$props$location2.hash,\n key = _this$props$location2.key;\n var scrollPosition;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n /** There are two pieces of state: the browser url and\n * history state which keeps track of scroll position\n * Native behaviour prescribes that we ought to restore scroll position\n * when a user navigates back in their browser (this is the `POP` action)\n * Currently, reach router has a bug that prevents this at https://github.com/reach/router/issues/228\n * So we _always_ stick to the url as a source of truth — if the url\n * contains a hash, we scroll to it\n */\n\n\n if (hash) {\n this.scrollToHash(decodeURI(hash), prevProps);\n } else {\n this.windowScroll(scrollPosition, prevProps);\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(ScrollContext.Provider, {\n value: this._stateStorage\n }, this.props.children);\n };\n\n return ScrollHandler;\n}(React.Component);\n\nexports.ScrollHandler = ScrollHandler;\nScrollHandler.propTypes = {\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired,\n location: _propTypes.default.object.isRequired\n};","import React, { createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { publicLoader } from \"./loader\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\n\n// Renders page\nclass PageRenderer extends React.Component {\n render() {\n const props = {\n ...this.props,\n params: {\n ...grabMatchParams(this.props.location.pathname),\n ...this.props.pageResources.json.pageContext.__params,\n },\n pathContext: this.props.pageContext,\n }\n\n const [replacementElement] = apiRunner(`replaceComponentRenderer`, {\n props: this.props,\n loader: publicLoader,\n })\n\n const pageElement =\n replacementElement ||\n createElement(this.props.pageResources.component, {\n ...props,\n key: this.props.path || this.props.pageResources.page.path,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n { element: pageElement, props },\n pageElement,\n ({ result }) => {\n return { element: result, props }\n }\n ).pop()\n\n return wrappedPage\n }\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import invariant from \"invariant\";\n\n////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n var dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : invariant(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\nvar match = function match(path, uri) {\n return pick([{ path: path }], uri);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\n};\n\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar paramRe = /^:(.+)/;\n\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\n\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\n\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return { route: route, score: score, index: index };\n};\n\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\n\nvar segmentize = function segmentize(uri) {\n return uri\n // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\n\nvar addQuery = function addQuery(pathname) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\n};\n\nvar reservedNames = [\"uri\", \"path\"];\n\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n};\n\n////////////////////////////////////////////////////////////////////////////////\nexport { startsWith, pick, match, resolve, insertParams, validateRedirect, shallowCompare };","module.exports = [{\n plugin: require('../node_modules/gatsby-remark-images/gatsby-browser.js'),\n options: {\"plugins\":[],\"maxWidth\":590,\"linkImagesToOriginal\":true,\"showCaptions\":false,\"markdownCaptions\":false,\"sizeByPixelDensity\":false,\"backgroundColor\":\"white\",\"quality\":50,\"withWebp\":false,\"tracedSVG\":false,\"loading\":\"lazy\",\"disableBgImageOnAlpha\":false,\"disableBgImage\":false},\n },{\n plugin: require('../node_modules/gatsby-plugin-google-analytics/gatsby-browser.js'),\n options: {\"plugins\":[],\"head\":false,\"anonymize\":false,\"respectDNT\":false,\"exclude\":[],\"pageTransitionDelay\":0},\n },{\n plugin: require('../node_modules/gatsby-plugin-manifest/gatsby-browser.js'),\n options: {\"plugins\":[],\"name\":\"SmartBlock\",\"short_name\":\"SmartBlock\",\"start_url\":\"/\",\"background_color\":\"#ffffff\",\"theme_color\":\"#663399\",\"display\":\"minimal-ui\",\"icon\":\"static/favicon.png\",\"legacy\":true,\"theme_color_in_head\":true,\"cache_busting_mode\":\"query\",\"crossOrigin\":\"anonymous\",\"include_favicon\":true,\"cacheDigest\":\"084321a740e799687cc736487af34310\"},\n },{\n plugin: require('../gatsby-browser.js'),\n options: {\"plugins\":[]},\n }]\n","/*!\n * domready (c) Dustin Diaz 2014 - License MIT\n * ie10 fix - Mikael Kristiansson 2019\n */\n!(function(name, definition) {\n if (typeof module != \"undefined\") module.exports = definition();\n else if (typeof define == \"function\" && typeof define.amd == \"object\")\n define(definition);\n else this[name] = definition();\n})(\"domready\", function() {\n var ie10 = false;\n if (navigator.appVersion.indexOf(\"MSIE 10\") !== -1) {\n ie10 = true;\n }\n\n var fns = [],\n listener,\n doc = typeof document === \"object\" && document,\n hack = ie10\n ? doc.documentElement.doScroll(\"left\")\n : doc.documentElement.doScroll,\n domContentLoaded = \"DOMContentLoaded\",\n loaded =\n doc && (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);\n\n if (!loaded && doc)\n doc.addEventListener(\n domContentLoaded,\n (listener = function() {\n doc.removeEventListener(domContentLoaded, listener);\n loaded = 1;\n while ((listener = fns.shift())) listener();\n })\n );\n\n return function(fn) {\n loaded ? setTimeout(fn, 0) : fns.push(fn);\n };\n});\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","// prefer default export if available\nconst preferDefault = m => (m && m.default) || m\n\nexports.components = {\n \"component---src-pages-404-js\": () => import(\"./../../../src/pages/404.js\" /* webpackChunkName: \"component---src-pages-404-js\" */),\n \"component---src-pages-index-js\": () => import(\"./../../../src/pages/index.js\" /* webpackChunkName: \"component---src-pages-index-js\" */),\n \"component---src-templates-blog-post-js\": () => import(\"./../../../src/templates/blog-post.js\" /* webpackChunkName: \"component---src-templates-blog-post-js\" */)\n}\n\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport redirects from \"./redirects.json\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport { navigate as reachNavigate } from \"@reach/router\"\nimport { globalHistory } from \"@reach/router/lib/history\"\nimport { parsePath } from \"gatsby-link\"\n\n// Convert to a map for faster lookup in maybeRedirect()\n\nconst redirectMap = new Map()\nconst redirectIgnoreCaseMap = new Map()\n\nredirects.forEach(redirect => {\n if (redirect.ignoreCase) {\n redirectIgnoreCaseMap.set(redirect.fromPath, redirect)\n } else {\n redirectMap.set(redirect.fromPath, redirect)\n }\n})\n\nfunction maybeRedirect(pathname) {\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n\n if (redirect != null) {\n if (process.env.NODE_ENV !== `production`) {\n if (!loader.isPageNotFound(pathname)) {\n console.error(\n `The route \"${pathname}\" matches both a page and a redirect; this is probably not intentional.`\n )\n }\n }\n\n window.___replace(redirect.toPath)\n return true\n } else {\n return false\n }\n}\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_EXPERIMENTAL_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n let { pathname } = parsePath(to)\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath\n pathname = parsePath(to).pathname\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n\n // Check for initial page-load redirect\n maybeRedirect(window.location.pathname)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
        \n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onPreRouteUpdate(this.props.location, prevProps.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n \n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources: pageResources || loader.loadPageSync(location.pathname),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(location.pathname)\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (process.env.NODE_ENV !== `production` && !this.state.pageResources) {\n throw new Error(\n `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n )\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { Router, navigate, Location, BaseContext } from \"@reach/router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport domReady from \"@mikaelkristiansson/domready\"\nimport { StaticQueryContext } from \"gatsby\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n \n \n \n )\n\n const DataContext = React.createContext({})\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n \n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n return (\n \n \n {children}\n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n \n {({ pageResources, location }) => (\n \n \n \n \n
        \n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). But\n // only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !== browserLoc.pathname &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath === `/404.html` ||\n pagePath.match(/^\\/404\\/?$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(__BASE_PATH__ + pagePath + browserLoc.search + browserLoc.hash, {\n replace: true,\n })\n }\n\n publicLoader.loadPage(browserLoc.pathname).then(page => {\n if (!page || page.status === PageResourceStatus.Error) {\n throw new Error(\n `page resources for ${browserLoc.pathname} not found. Not rendering React`\n )\n }\n\n window.___webpackCompilationHash = page.page.webpackCompilationHash\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element: },\n ,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = () => {SiteRoot}\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n ReactDOM.hydrate\n )[0]\n\n domReady(() => {\n renderer(\n ,\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : void 0,\n () => {\n apiRunner(`onInitialClientRender`)\n }\n )\n })\n })\n})\n","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Link, {\n withPrefix,\n withAssetPrefix,\n navigate,\n push,\n replace,\n navigateTo,\n parsePath,\n} from \"gatsby-link\"\nimport { useScrollRestoration } from \"gatsby-react-router-scroll\"\nimport PageRenderer from \"./public-page-renderer\"\nimport loader from \"./loader\"\n\nconst prefetchPathname = loader.enqueue\n\nconst StaticQueryContext = React.createContext({})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n \n {finalData && render(finalData)}\n {!finalData &&
        Loading (StaticQuery)
        }\n
        \n )\n}\n\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n return (\n \n {staticQueryData => (\n \n )}\n \n )\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nfunction graphql() {\n throw new Error(\n `It appears like Gatsby is misconfigured. Gatsby related \\`graphql\\` calls ` +\n `are supposed to only be evaluated at compile time, and then compiled away. ` +\n `Unfortunately, something went wrong and the query was left in the compiled code.\\n\\n` +\n `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`\n )\n}\n\nexport {\n Link,\n withAssetPrefix,\n withPrefix,\n graphql,\n parsePath,\n navigate,\n push, // TODO replace for v3\n replace, // TODO remove replace for v3\n navigateTo, // TODO: remove navigateTo for v3\n useScrollRestoration,\n StaticQueryContext,\n StaticQuery,\n PageRenderer,\n useStaticQuery,\n prefetchPathname,\n}\n","\"use strict\";\n\nmodule.exports = Object.assign;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint-disable jsx-a11y/anchor-has-content */\nimport React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport createContext from \"create-react-context\";\nimport { polyfill } from \"react-lifecycles-compat\";\nimport { startsWith, pick, resolve, match, insertParams, validateRedirect, shallowCompare } from \"./lib/utils\";\nimport { globalHistory, navigate, createHistory, createMemorySource } from \"./lib/history\";\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar createNamedContext = function createNamedContext(name, defaultValue) {\n var Ctx = createContext(defaultValue);\n Ctx.displayName = name;\n return Ctx;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Location Context/Provider\nvar LocationContext = createNamedContext(\"Location\");\n\n// sets up a listener if there isn't one already so apps don't need to be\n// wrapped in some top level provider\nvar Location = function Location(_ref) {\n var children = _ref.children;\n return React.createElement(\n LocationContext.Consumer,\n null,\n function (context) {\n return context ? children(context) : React.createElement(\n LocationProvider,\n null,\n children\n );\n }\n );\n};\n\nvar LocationProvider = function (_React$Component) {\n _inherits(LocationProvider, _React$Component);\n\n function LocationProvider() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, LocationProvider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n context: _this.getContext(),\n refs: { unlisten: null }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n LocationProvider.prototype.getContext = function getContext() {\n var _props$history = this.props.history,\n navigate = _props$history.navigate,\n location = _props$history.location;\n\n return { navigate: navigate, location: location };\n };\n\n LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {\n if (isRedirect(error)) {\n var _navigate = this.props.history.navigate;\n\n _navigate(error.uri, { replace: true });\n } else {\n throw error;\n }\n };\n\n LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevState.context.location !== this.state.context.location) {\n this.props.history._onTransitionComplete();\n }\n };\n\n LocationProvider.prototype.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n var refs = this.state.refs,\n history = this.props.history;\n\n history._onTransitionComplete();\n refs.unlisten = history.listen(function () {\n Promise.resolve().then(function () {\n // TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306\n requestAnimationFrame(function () {\n if (!_this2.unmounted) {\n _this2.setState(function () {\n return { context: _this2.getContext() };\n });\n }\n });\n });\n });\n };\n\n LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n var refs = this.state.refs;\n\n this.unmounted = true;\n refs.unlisten();\n };\n\n LocationProvider.prototype.render = function render() {\n var context = this.state.context,\n children = this.props.children;\n\n return React.createElement(\n LocationContext.Provider,\n { value: context },\n typeof children === \"function\" ? children(context) : children || null\n );\n };\n\n return LocationProvider;\n}(React.Component);\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nLocationProvider.defaultProps = {\n history: globalHistory\n};\nprocess.env.NODE_ENV !== \"production\" ? LocationProvider.propTypes = {\n history: PropTypes.object.isRequired\n} : void 0;\nvar ServerLocation = function ServerLocation(_ref2) {\n var url = _ref2.url,\n children = _ref2.children;\n\n var searchIndex = url.indexOf(\"?\");\n var searchExists = searchIndex > -1;\n var pathname = void 0;\n var search = \"\";\n var hash = \"\";\n\n if (searchExists) {\n pathname = url.substring(0, searchIndex);\n search = url.substring(searchIndex);\n } else {\n pathname = url;\n }\n\n return React.createElement(\n LocationContext.Provider,\n {\n value: {\n location: {\n pathname: pathname,\n search: search,\n hash: hash\n },\n navigate: function navigate() {\n throw new Error(\"You can't call navigate on the server.\");\n }\n }\n },\n children\n );\n};\n////////////////////////////////////////////////////////////////////////////////\n// Sets baseuri and basepath for nested routers and links\nvar BaseContext = createNamedContext(\"Base\", { baseuri: \"/\", basepath: \"/\" });\n\n////////////////////////////////////////////////////////////////////////////////\n// The main event, welcome to the show everybody.\nvar Router = function Router(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (baseContext) {\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RouterImpl, _extends({}, baseContext, locationContext, props));\n }\n );\n }\n );\n};\n\nvar RouterImpl = function (_React$PureComponent) {\n _inherits(RouterImpl, _React$PureComponent);\n\n function RouterImpl() {\n _classCallCheck(this, RouterImpl);\n\n return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));\n }\n\n RouterImpl.prototype.render = function render() {\n var _props = this.props,\n location = _props.location,\n _navigate2 = _props.navigate,\n basepath = _props.basepath,\n primary = _props.primary,\n children = _props.children,\n baseuri = _props.baseuri,\n _props$component = _props.component,\n component = _props$component === undefined ? \"div\" : _props$component,\n domProps = _objectWithoutProperties(_props, [\"location\", \"navigate\", \"basepath\", \"primary\", \"children\", \"baseuri\", \"component\"]);\n\n var routes = React.Children.toArray(children).reduce(function (array, child) {\n var routes = createRoute(basepath)(child);\n return array.concat(routes);\n }, []);\n var pathname = location.pathname;\n\n\n var match = pick(routes, pathname);\n\n if (match) {\n var params = match.params,\n uri = match.uri,\n route = match.route,\n element = match.route.value;\n\n // remove the /* from the end for child routes relative paths\n\n basepath = route.default ? basepath : route.path.replace(/\\*$/, \"\");\n\n var props = _extends({}, params, {\n uri: uri,\n location: location,\n navigate: function navigate(to, options) {\n return _navigate2(resolve(to, uri), options);\n }\n });\n\n var clone = React.cloneElement(element, props, element.props.children ? React.createElement(\n Router,\n { location: location, primary: primary },\n element.props.children\n ) : undefined);\n\n // using 'div' for < 16.3 support\n var FocusWrapper = primary ? FocusHandler : component;\n // don't pass any props to 'div'\n var wrapperProps = primary ? _extends({ uri: uri, location: location, component: component }, domProps) : domProps;\n\n return React.createElement(\n BaseContext.Provider,\n { value: { baseuri: uri, basepath: basepath } },\n React.createElement(\n FocusWrapper,\n wrapperProps,\n clone\n )\n );\n } else {\n // Not sure if we want this, would require index routes at every level\n // warning(\n // false,\n // `\\n\\nNothing matched:\\n\\t${\n // location.pathname\n // }\\n\\nPaths checked: \\n\\t${routes\n // .map(route => route.path)\n // .join(\n // \"\\n\\t\"\n // )}\\n\\nTo get rid of this warning, add a default NotFound component as child of Router:\n // \\n\\tlet NotFound = () =>
        Not Found!
        \n // \\n\\t\\n\\t \\n\\t {/* ... */}\\n\\t`\n // );\n return null;\n }\n };\n\n return RouterImpl;\n}(React.PureComponent);\n\nRouterImpl.defaultProps = {\n primary: true\n};\n\n\nvar FocusContext = createNamedContext(\"Focus\");\n\nvar FocusHandler = function FocusHandler(_ref3) {\n var uri = _ref3.uri,\n location = _ref3.location,\n component = _ref3.component,\n domProps = _objectWithoutProperties(_ref3, [\"uri\", \"location\", \"component\"]);\n\n return React.createElement(\n FocusContext.Consumer,\n null,\n function (requestFocus) {\n return React.createElement(FocusHandlerImpl, _extends({}, domProps, {\n component: component,\n requestFocus: requestFocus,\n uri: uri,\n location: location\n }));\n }\n );\n};\n\n// don't focus on initial render\nvar initialRender = true;\nvar focusHandlerCount = 0;\n\nvar FocusHandlerImpl = function (_React$Component2) {\n _inherits(FocusHandlerImpl, _React$Component2);\n\n function FocusHandlerImpl() {\n var _temp2, _this4, _ret2;\n\n _classCallCheck(this, FocusHandlerImpl);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this4 = _possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {\n if (!_this4.state.shouldFocus && node) {\n node.focus();\n }\n }, _temp2), _possibleConstructorReturn(_this4, _ret2);\n }\n\n FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var initial = prevState.uri == null;\n if (initial) {\n return _extends({\n shouldFocus: true\n }, nextProps);\n } else {\n var myURIChanged = nextProps.uri !== prevState.uri;\n var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;\n return _extends({\n shouldFocus: myURIChanged || navigatedUpToMe\n }, nextProps);\n }\n };\n\n FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {\n focusHandlerCount++;\n this.focus();\n };\n\n FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {\n focusHandlerCount--;\n if (focusHandlerCount === 0) {\n initialRender = true;\n }\n };\n\n FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevProps.location !== this.props.location && this.state.shouldFocus) {\n this.focus();\n }\n };\n\n FocusHandlerImpl.prototype.focus = function focus() {\n if (process.env.NODE_ENV === \"test\") {\n // getting cannot read property focus of null in the tests\n // and that bit of global `initialRender` state causes problems\n // should probably figure it out!\n return;\n }\n\n var requestFocus = this.props.requestFocus;\n\n\n if (requestFocus) {\n requestFocus(this.node);\n } else {\n if (initialRender) {\n initialRender = false;\n } else if (this.node) {\n // React polyfills [autofocus] and it fires earlier than cDM,\n // so we were stealing focus away, this line prevents that.\n if (!this.node.contains(document.activeElement)) {\n this.node.focus();\n }\n }\n }\n };\n\n FocusHandlerImpl.prototype.render = function render() {\n var _this5 = this;\n\n var _props2 = this.props,\n children = _props2.children,\n style = _props2.style,\n requestFocus = _props2.requestFocus,\n _props2$component = _props2.component,\n Comp = _props2$component === undefined ? \"div\" : _props2$component,\n uri = _props2.uri,\n location = _props2.location,\n domProps = _objectWithoutProperties(_props2, [\"children\", \"style\", \"requestFocus\", \"component\", \"uri\", \"location\"]);\n\n return React.createElement(\n Comp,\n _extends({\n style: _extends({ outline: \"none\" }, style),\n tabIndex: \"-1\",\n ref: function ref(n) {\n return _this5.node = n;\n }\n }, domProps),\n React.createElement(\n FocusContext.Provider,\n { value: this.requestFocus },\n this.props.children\n )\n );\n };\n\n return FocusHandlerImpl;\n}(React.Component);\n\npolyfill(FocusHandlerImpl);\n\nvar k = function k() {};\n\n////////////////////////////////////////////////////////////////////////////////\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = function forwardRef(C) {\n return C;\n };\n}\n\nvar Link = forwardRef(function (_ref4, ref) {\n var innerRef = _ref4.innerRef,\n props = _objectWithoutProperties(_ref4, [\"innerRef\"]);\n\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref5) {\n var basepath = _ref5.basepath,\n baseuri = _ref5.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref6) {\n var location = _ref6.location,\n navigate = _ref6.navigate;\n\n var to = props.to,\n state = props.state,\n replace = props.replace,\n _props$getProps = props.getProps,\n getProps = _props$getProps === undefined ? k : _props$getProps,\n anchorProps = _objectWithoutProperties(props, [\"to\", \"state\", \"replace\", \"getProps\"]);\n\n var href = resolve(to, baseuri);\n var encodedHref = encodeURI(href);\n var isCurrent = location.pathname === encodedHref;\n var isPartiallyCurrent = startsWith(location.pathname, encodedHref);\n\n return React.createElement(\"a\", _extends({\n ref: ref || innerRef,\n \"aria-current\": isCurrent ? \"page\" : undefined\n }, anchorProps, getProps({ isCurrent: isCurrent, isPartiallyCurrent: isPartiallyCurrent, href: href, location: location }), {\n href: href,\n onClick: function onClick(event) {\n if (anchorProps.onClick) anchorProps.onClick(event);\n if (shouldNavigate(event)) {\n event.preventDefault();\n var shouldReplace = replace;\n if (typeof replace !== \"boolean\" && isCurrent) {\n var _location$state = _extends({}, location.state),\n key = _location$state.key,\n restState = _objectWithoutProperties(_location$state, [\"key\"]);\n\n shouldReplace = shallowCompare(_extends({}, state), restState);\n }\n navigate(href, {\n state: state,\n replace: shouldReplace\n });\n }\n }\n }));\n }\n );\n }\n );\n});\n\nLink.displayName = \"Link\";\n\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nfunction RedirectRequest(uri) {\n this.uri = uri;\n}\n\nvar isRedirect = function isRedirect(o) {\n return o instanceof RedirectRequest;\n};\n\nvar redirectTo = function redirectTo(to) {\n throw new RedirectRequest(to);\n};\n\nvar RedirectImpl = function (_React$Component3) {\n _inherits(RedirectImpl, _React$Component3);\n\n function RedirectImpl() {\n _classCallCheck(this, RedirectImpl);\n\n return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));\n }\n\n // Support React < 16 with this hook\n RedirectImpl.prototype.componentDidMount = function componentDidMount() {\n var _props3 = this.props,\n navigate = _props3.navigate,\n to = _props3.to,\n from = _props3.from,\n _props3$replace = _props3.replace,\n replace = _props3$replace === undefined ? true : _props3$replace,\n state = _props3.state,\n noThrow = _props3.noThrow,\n baseuri = _props3.baseuri,\n props = _objectWithoutProperties(_props3, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n Promise.resolve().then(function () {\n var resolvedTo = resolve(to, baseuri);\n navigate(insertParams(resolvedTo, props), { replace: replace, state: state });\n });\n };\n\n RedirectImpl.prototype.render = function render() {\n var _props4 = this.props,\n navigate = _props4.navigate,\n to = _props4.to,\n from = _props4.from,\n replace = _props4.replace,\n state = _props4.state,\n noThrow = _props4.noThrow,\n baseuri = _props4.baseuri,\n props = _objectWithoutProperties(_props4, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n var resolvedTo = resolve(to, baseuri);\n if (!noThrow) redirectTo(insertParams(resolvedTo, props));\n return null;\n };\n\n return RedirectImpl;\n}(React.Component);\n\nvar Redirect = function Redirect(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref7) {\n var baseuri = _ref7.baseuri;\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RedirectImpl, _extends({}, locationContext, { baseuri: baseuri }, props));\n }\n );\n }\n );\n};\n\nprocess.env.NODE_ENV !== \"production\" ? Redirect.propTypes = {\n from: PropTypes.string,\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nvar Match = function Match(_ref8) {\n var path = _ref8.path,\n children = _ref8.children;\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref9) {\n var baseuri = _ref9.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref10) {\n var navigate = _ref10.navigate,\n location = _ref10.location;\n\n var resolvedPath = resolve(path, baseuri);\n var result = match(resolvedPath, location.pathname);\n return children({\n navigate: navigate,\n location: location,\n match: result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null\n });\n }\n );\n }\n );\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Hooks\n\nvar useLocation = function useLocation() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.location;\n};\n\nvar useNavigate = function useNavigate() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useNavigate hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.navigate;\n};\n\nvar useParams = function useParams() {\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var results = match(context.basepath, location.pathname);\n\n return results ? results.params : null;\n};\n\nvar useMatch = function useMatch(path) {\n if (!path) {\n throw new Error(\"useMatch(path: string) requires an argument of a string to match against\");\n }\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var resolvedPath = resolve(path, context.baseuri);\n var result = match(resolvedPath, location.pathname);\n return result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar stripSlashes = function stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n};\n\nvar createRoute = function createRoute(basepath) {\n return function (element) {\n if (!element) {\n return null;\n }\n\n if (element.type === React.Fragment && element.props.children) {\n return React.Children.map(element.props.children, createRoute(basepath));\n }\n !(element.props.path || element.props.default || element.type === Redirect) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \": Children of must have a `path` or `default` prop, or be a ``. None found on element type `\" + element.type + \"`\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && (!element.props.from || !element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" requires both \\\"from\\\" and \\\"to\\\" props when inside a .\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && !validateRedirect(element.props.from, element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.\") : invariant(false) : void 0;\n\n if (element.props.default) {\n return { value: element, default: true };\n }\n\n var elementPath = element.type === Redirect ? element.props.from : element.props.path;\n\n var path = elementPath === \"/\" ? basepath : stripSlashes(basepath) + \"/\" + stripSlashes(elementPath);\n\n return {\n value: element,\n default: element.props.default,\n path: element.props.children ? stripSlashes(path) + \"/*\" : path\n };\n };\n};\n\nvar shouldNavigate = function shouldNavigate(event) {\n return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n////////////////////////////////////////////////////////////////////////\nexport { Link, Location, LocationProvider, Match, Redirect, Router, ServerLocation, createHistory, createMemorySource, isRedirect, navigate, redirectTo, globalHistory, match as matchPath, useLocation, useNavigate, useParams, useMatch , BaseContext };","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.parsePath = parsePath;\n\nfunction parsePath(path) {\n var pathname = path || \"/\";\n var search = \"\";\n var hash = \"\";\n var hashIndex = pathname.indexOf(\"#\");\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf(\"?\");\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === \"?\" ? \"\" : search,\n hash: hash === \"#\" ? \"\" : hash\n };\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const support = function (feature) {\n if (typeof document === `undefined`) {\n return false\n }\n const fakeLink = document.createElement(`link`)\n try {\n if (fakeLink.relList && typeof fakeLink.relList.supports === `function`) {\n return fakeLink.relList.supports(feature)\n }\n } catch (err) {\n return false\n }\n return false\n}\n\nconst linkPrefetchStrategy = function (url, options) {\n return new Promise((resolve, reject) => {\n if (typeof document === `undefined`) {\n reject()\n return\n }\n\n const link = document.createElement(`link`)\n link.setAttribute(`rel`, `prefetch`)\n link.setAttribute(`href`, url)\n\n Object.keys(options).forEach(key => {\n link.setAttribute(key, options[key])\n })\n\n link.onload = resolve\n link.onerror = reject\n\n const parentElement =\n document.getElementsByTagName(`head`)[0] ||\n document.getElementsByName(`script`)[0].parentNode\n parentElement.appendChild(link)\n })\n}\n\nconst xhrPrefetchStrategy = function (url) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(`GET`, url, true)\n\n req.onload = () => {\n if (req.status === 200) {\n resolve()\n } else {\n reject()\n }\n }\n\n req.send(null)\n })\n}\n\nconst supportedPrefetchStrategy = support(`prefetch`)\n ? linkPrefetchStrategy\n : xhrPrefetchStrategy\n\nconst preFetched = {}\n\nconst prefetch = function (url, options) {\n return new Promise(resolve => {\n if (preFetched[url]) {\n resolve()\n return\n }\n\n supportedPrefetchStrategy(url, options)\n .then(() => {\n resolve()\n preFetched[url] = true\n })\n .catch(() => {}) // 404s are logged to the console anyway\n })\n}\n\nexport default prefetch\n","import prefetchHelper from \"./prefetch\"\nimport emitter from \"./emitter\"\nimport { setMatchPaths, findPath, findMatchPath } from \"./find-path\"\n\n/**\n * Available resource loading statuses\n */\nexport const PageResourceStatus = {\n /**\n * At least one of critical resources failed to load\n */\n Error: `error`,\n /**\n * Resources loaded successfully\n */\n Success: `success`,\n}\n\nconst preferDefault = m => (m && m.default) || m\n\nconst stripSurroundingSlashes = s => {\n s = s[0] === `/` ? s.slice(1) : s\n s = s.endsWith(`/`) ? s.slice(0, -1) : s\n return s\n}\n\nconst createPageDataUrl = path => {\n const fixedPath = path === `/` ? `index` : stripSurroundingSlashes(path)\n return `${__PATH_PREFIX__}/page-data/${fixedPath}/page-data.json`\n}\n\nfunction doFetch(url, method = `GET`) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(method, url, true)\n req.onreadystatechange = () => {\n if (req.readyState == 4) {\n resolve(req)\n }\n }\n req.send(null)\n })\n}\n\nconst doesConnectionSupportPrefetch = () => {\n if (\n `connection` in navigator &&\n typeof navigator.connection !== `undefined`\n ) {\n if ((navigator.connection.effectiveType || ``).includes(`2g`)) {\n return false\n }\n if (navigator.connection.saveData) {\n return false\n }\n }\n return true\n}\n\nconst toPageResources = (pageData, component = null) => {\n const page = {\n componentChunkName: pageData.componentChunkName,\n path: pageData.path,\n webpackCompilationHash: pageData.webpackCompilationHash,\n matchPath: pageData.matchPath,\n staticQueryHashes: pageData.staticQueryHashes,\n }\n\n return {\n component,\n json: pageData.result,\n page,\n }\n}\n\nexport class BaseLoader {\n constructor(loadComponent, matchPaths) {\n // Map of pagePath -> Page. Where Page is an object with: {\n // status: PageResourceStatus.Success || PageResourceStatus.Error,\n // payload: PageResources, // undefined if PageResourceStatus.Error\n // }\n // PageResources is {\n // component,\n // json: pageData.result,\n // page: {\n // componentChunkName,\n // path,\n // webpackCompilationHash,\n // staticQueryHashes\n // },\n // staticQueryResults\n // }\n this.pageDb = new Map()\n this.inFlightDb = new Map()\n this.staticQueryDb = {}\n this.pageDataDb = new Map()\n this.prefetchTriggered = new Set()\n this.prefetchCompleted = new Set()\n this.loadComponent = loadComponent\n setMatchPaths(matchPaths)\n }\n\n inFlightNetworkRequests = new Map()\n\n memoizedGet(url) {\n let inFlightPromise = this.inFlightNetworkRequests.get(url)\n\n if (!inFlightPromise) {\n inFlightPromise = doFetch(url, `GET`)\n this.inFlightNetworkRequests.set(url, inFlightPromise)\n }\n\n // Prefer duplication with then + catch over .finally to prevent problems in ie11 + firefox\n return inFlightPromise\n .then(response => {\n this.inFlightNetworkRequests.delete(url)\n return response\n })\n .catch(err => {\n this.inFlightNetworkRequests.delete(url)\n throw err\n })\n }\n\n setApiRunner(apiRunner) {\n this.apiRunner = apiRunner\n this.prefetchDisabled = apiRunner(`disableCorePrefetching`).some(a => a)\n }\n\n fetchPageDataJson(loadObj) {\n const { pagePath, retries = 0 } = loadObj\n const url = createPageDataUrl(pagePath)\n return this.memoizedGet(url).then(req => {\n const { status, responseText } = req\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.path === undefined) {\n throw new Error(`not a valid pageData response`)\n }\n\n return Object.assign(loadObj, {\n status: PageResourceStatus.Success,\n payload: jsonPayload,\n })\n } catch (err) {\n // continue regardless of error\n }\n }\n\n // Handle 404\n if (status === 404 || status === 200) {\n // If the request was for a 404 page and it doesn't exist, we're done\n if (pagePath === `/404.html`) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Need some code here to cache the 404 request. In case\n // multiple loadPageDataJsons result in 404s\n return this.fetchPageDataJson(\n Object.assign(loadObj, { pagePath: `/404.html`, notFound: true })\n )\n }\n\n // handle 500 response (Unrecoverable)\n if (status === 500) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Handle everything else, including status === 0, and 503s. Should retry\n if (retries < 3) {\n return this.fetchPageDataJson(\n Object.assign(loadObj, { retries: retries + 1 })\n )\n }\n\n // Retried 3 times already, result is an error.\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n })\n }\n\n loadPageDataJson(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDataDb.has(pagePath)) {\n const pageData = this.pageDataDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !pageData.stale) {\n return Promise.resolve(pageData)\n }\n }\n\n return this.fetchPageDataJson({ pagePath }).then(pageData => {\n this.pageDataDb.set(pagePath, pageData)\n\n return pageData\n })\n }\n\n findMatchPath(rawPath) {\n return findMatchPath(rawPath)\n }\n\n // TODO check all uses of this and whether they use undefined for page resources not exist\n loadPage(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const page = this.pageDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !page.payload.stale) {\n return Promise.resolve(page.payload)\n }\n }\n\n if (this.inFlightDb.has(pagePath)) {\n return this.inFlightDb.get(pagePath)\n }\n\n const inFlightPromise = Promise.all([\n this.loadAppData(),\n this.loadPageDataJson(pagePath),\n ]).then(allData => {\n const result = allData[1]\n if (result.status === PageResourceStatus.Error) {\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n let pageData = result.payload\n const { componentChunkName, staticQueryHashes = [] } = pageData\n\n const finalResult = {}\n\n const componentChunkPromise = this.loadComponent(componentChunkName).then(\n component => {\n finalResult.createdAt = new Date()\n let pageResources\n if (!component) {\n finalResult.status = PageResourceStatus.Error\n } else {\n finalResult.status = PageResourceStatus.Success\n if (result.notFound === true) {\n finalResult.notFound = true\n }\n pageData = Object.assign(pageData, {\n webpackCompilationHash: allData[0]\n ? allData[0].webpackCompilationHash\n : ``,\n })\n pageResources = toPageResources(pageData, component)\n }\n // undefined if final result is an error\n return pageResources\n }\n )\n\n const staticQueryBatchPromise = Promise.all(\n staticQueryHashes.map(staticQueryHash => {\n // Check for cache in case this static query result has already been loaded\n if (this.staticQueryDb[staticQueryHash]) {\n const jsonPayload = this.staticQueryDb[staticQueryHash]\n return { staticQueryHash, jsonPayload }\n }\n\n return this.memoizedGet(\n `${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json`\n ).then(req => {\n const jsonPayload = JSON.parse(req.responseText)\n return { staticQueryHash, jsonPayload }\n })\n })\n ).then(staticQueryResults => {\n const staticQueryResultsMap = {}\n\n staticQueryResults.forEach(({ staticQueryHash, jsonPayload }) => {\n staticQueryResultsMap[staticQueryHash] = jsonPayload\n this.staticQueryDb[staticQueryHash] = jsonPayload\n })\n\n return staticQueryResultsMap\n })\n\n return Promise.all([componentChunkPromise, staticQueryBatchPromise]).then(\n ([pageResources, staticQueryResults]) => {\n let payload\n if (pageResources) {\n payload = { ...pageResources, staticQueryResults }\n finalResult.payload = payload\n emitter.emit(`onPostLoadPageResources`, {\n page: payload,\n pageResources: payload,\n })\n }\n\n this.pageDb.set(pagePath, finalResult)\n\n return payload\n }\n )\n })\n\n inFlightPromise\n .then(response => {\n this.inFlightDb.delete(pagePath)\n })\n .catch(error => {\n this.inFlightDb.delete(pagePath)\n throw error\n })\n\n this.inFlightDb.set(pagePath, inFlightPromise)\n\n return inFlightPromise\n }\n\n // returns undefined if loading page ran into errors\n loadPageSync(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const pageData = this.pageDb.get(pagePath).payload\n return pageData\n }\n return undefined\n }\n\n shouldPrefetch(pagePath) {\n // Skip prefetching if we know user is on slow or constrained connection\n if (!doesConnectionSupportPrefetch()) {\n return false\n }\n\n // Check if the page exists.\n if (this.pageDb.has(pagePath)) {\n return false\n }\n\n return true\n }\n\n prefetch(pagePath) {\n if (!this.shouldPrefetch(pagePath)) {\n return false\n }\n\n // Tell plugins with custom prefetching logic that they should start\n // prefetching this path.\n if (!this.prefetchTriggered.has(pagePath)) {\n this.apiRunner(`onPrefetchPathname`, { pathname: pagePath })\n this.prefetchTriggered.add(pagePath)\n }\n\n // If a plugin has disabled core prefetching, stop now.\n if (this.prefetchDisabled) {\n return false\n }\n\n const realPath = findPath(pagePath)\n // Todo make doPrefetch logic cacheable\n // eslint-disable-next-line consistent-return\n this.doPrefetch(realPath).then(() => {\n if (!this.prefetchCompleted.has(pagePath)) {\n this.apiRunner(`onPostPrefetchPathname`, { pathname: pagePath })\n this.prefetchCompleted.add(pagePath)\n }\n })\n\n return true\n }\n\n doPrefetch(pagePath) {\n const pageDataUrl = createPageDataUrl(pagePath)\n return prefetchHelper(pageDataUrl, {\n crossOrigin: `anonymous`,\n as: `fetch`,\n }).then(() =>\n // This was just prefetched, so will return a response from\n // the cache instead of making another request to the server\n this.loadPageDataJson(pagePath)\n )\n }\n\n hovering(rawPath) {\n this.loadPage(rawPath)\n }\n\n getResourceURLsForPathname(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDataDb.get(pagePath)\n if (page) {\n const pageResources = toPageResources(page.payload)\n\n return [\n ...createComponentUrls(pageResources.page.componentChunkName),\n createPageDataUrl(pagePath),\n ]\n } else {\n return null\n }\n }\n\n isPageNotFound(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDb.get(pagePath)\n return !page || page.notFound\n }\n\n loadAppData(retries = 0) {\n return this.memoizedGet(`${__PATH_PREFIX__}/page-data/app-data.json`).then(\n req => {\n const { status, responseText } = req\n\n let appData\n\n if (status !== 200 && retries < 3) {\n // Retry 3 times incase of non-200 responses\n return this.loadAppData(retries + 1)\n }\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.webpackCompilationHash === undefined) {\n throw new Error(`not a valid app-data response`)\n }\n\n appData = jsonPayload\n } catch (err) {\n // continue regardless of error\n }\n }\n\n return appData\n }\n )\n }\n}\n\nconst createComponentUrls = componentChunkName =>\n (window.___chunkMapping[componentChunkName] || []).map(\n chunk => __PATH_PREFIX__ + chunk\n )\n\nexport class ProdLoader extends BaseLoader {\n constructor(asyncRequires, matchPaths) {\n const loadComponent = chunkName =>\n asyncRequires.components[chunkName]\n ? asyncRequires.components[chunkName]()\n .then(preferDefault)\n // loader will handle the case when component is null\n .catch(() => null)\n : Promise.resolve()\n\n super(loadComponent, matchPaths)\n }\n\n doPrefetch(pagePath) {\n return super.doPrefetch(pagePath).then(result => {\n if (result.status !== PageResourceStatus.Success) {\n return Promise.resolve()\n }\n const pageData = result.payload\n const chunkName = pageData.componentChunkName\n const componentUrls = createComponentUrls(chunkName)\n return Promise.all(componentUrls.map(prefetchHelper)).then(() => pageData)\n })\n }\n\n loadPageDataJson(rawPath) {\n return super.loadPageDataJson(rawPath).then(data => {\n if (data.notFound) {\n // check if html file exist using HEAD request:\n // if it does we should navigate to it instead of showing 404\n return doFetch(rawPath, `HEAD`).then(req => {\n if (req.status === 200) {\n // page (.html file) actually exist (or we asked for 404 )\n // returning page resources status as errored to trigger\n // regular browser navigation to given page\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n // if HEAD request wasn't 200, return notFound result\n // and show 404 page\n return data\n })\n }\n return data\n })\n }\n}\n\nlet instance\n\nexport const setLoader = _loader => {\n instance = _loader\n}\n\nexport const publicLoader = {\n // Deprecated methods. As far as we're aware, these are only used by\n // core gatsby and the offline plugin, however there's a very small\n // chance they're called by others.\n getResourcesForPathname: rawPath => {\n console.warn(\n `Warning: getResourcesForPathname is deprecated. Use loadPage instead`\n )\n return instance.i.loadPage(rawPath)\n },\n getResourcesForPathnameSync: rawPath => {\n console.warn(\n `Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead`\n )\n return instance.i.loadPageSync(rawPath)\n },\n enqueue: rawPath => instance.prefetch(rawPath),\n\n // Real methods\n getResourceURLsForPathname: rawPath =>\n instance.getResourceURLsForPathname(rawPath),\n loadPage: rawPath => instance.loadPage(rawPath),\n loadPageSync: rawPath => instance.loadPageSync(rawPath),\n prefetch: rawPath => instance.prefetch(rawPath),\n isPageNotFound: rawPath => instance.isPageNotFound(rawPath),\n hovering: rawPath => instance.hovering(rawPath),\n loadAppData: () => instance.loadAppData(),\n}\n\nexport default publicLoader\n\nexport function getStaticQueryResults() {\n if (instance) {\n return instance.staticQueryDb\n } else {\n return {}\n }\n}\n","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollContainer = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _router = require(\"@reach/router\");\n\n// TODO: In Gatsby v3, this file should be removed.\n// We are deprecating this in V2 in favor of useScrollRestoration\nvar propTypes = {\n scrollKey: _propTypes.default.string.isRequired,\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired\n};\nvar hasNotWarnedDeprecation = true;\n\nvar ScrollContainerImplementation = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollContainerImplementation, _React$Component);\n\n function ScrollContainerImplementation(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n\n if (process.env.NODE_ENV !== \"production\" && hasNotWarnedDeprecation) {\n hasNotWarnedDeprecation = false;\n console.log(\"Deprecation Warning:\\n\\n Gatsby is deprecated in Gatsby v2 and will be removed in Gatsby v3.\\n Update to the React hook alternative useScrollRestoration, like this:.\\n \\n ```\\n import React from 'react';\\n import { useScrollRestoration } from 'gatsby-react-router-scroll';\\n\\n function Component() {\\n const scrollRestoration = useScrollRestoration('\" + _this.props.scrollKey + \"');\\n\\n return
          ;\\n }\\n ```\\n \");\n }\n\n return _this;\n }\n\n var _proto = ScrollContainerImplementation.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n // eslint-disable-next-line react/no-find-dom-node\n var node = _reactDom.default.findDOMNode(this);\n\n var _this$props = this.props,\n location = _this$props.location,\n scrollKey = _this$props.scrollKey;\n if (!node) return;\n node.addEventListener(\"scroll\", function () {\n _this2.props.context.save(location, scrollKey, node.scrollTop);\n });\n var position = this.props.context.read(location, scrollKey);\n node.scrollTo(0, position || 0);\n };\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return ScrollContainerImplementation;\n}(React.Component);\n\nvar ScrollContainer = function ScrollContainer(props) {\n return /*#__PURE__*/React.createElement(_router.Location, null, function (_ref) {\n var location = _ref.location;\n return /*#__PURE__*/React.createElement(_scrollHandler.ScrollContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(ScrollContainerImplementation, (0, _extends2.default)({}, props, {\n context: context,\n location: location\n }));\n });\n });\n};\n\nexports.ScrollContainer = ScrollContainer;\nScrollContainer.propTypes = propTypes;","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _gatsby = require(\"gatsby\");\n\nvar _getManifestPathname = _interopRequireDefault(require(\"./get-manifest-pathname\"));\n\n/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\n// when we don't have localisation in our manifest, we tree shake everything away\nif (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n exports.onRouteUpdate = function (_ref, pluginOptions) {\n var location = _ref.location;\n var localize = pluginOptions.localize;\n var manifestFilename = (0, _getManifestPathname.default)(location.pathname, localize);\n var manifestEl = document.head.querySelector(\"link[rel=\\\"manifest\\\"]\");\n\n if (manifestEl) {\n manifestEl.setAttribute(\"href\", (0, _gatsby.withPrefix)(manifestFilename));\n }\n };\n}","/*\n Why commonjs and not ES imports/exports?\n\n This module is used to alias `create-react-context` package, but drop the the actual implementation part\n because Gatsby requires version of react that has implementatoin baked in.\n \n Package source is using ES modules:\n - https://github.com/jamiebuilds/create-react-context/blob/v0.3.0/src/index.js\n \n But to build this package `babel-plugin-add-module-exports` is used ( https://www.npmjs.com/package/babel-plugin-add-module-exports).\n Which result in both `module.exports` and `exports.default` being set to same thing.\n\n We don't use that babel plugin so we only have `exports.default`.\n\n This cause problems in various 3rd party react components that rely on `module.exports` being set.\n See https://github.com/gatsbyjs/gatsby/issues/23645 for example of it.\n \n Instead of adding same babel plugin we mimic output here. Adding babel plugin just for this would:\n a) unnecesairly slow down compilation for all other files (if we just apply it everywhere)\n b) or complicate babel-loader configuration with overwrite specifically for this file\n*/\n\nconst { createContext } = require(`react`)\n\nmodule.exports = createContext\nmodule.exports.default = createContext\n","\"use strict\";\n\nexports.DEFAULT_OPTIONS = {\n maxWidth: 650,\n wrapperStyle: \"\",\n backgroundColor: \"white\",\n linkImagesToOriginal: true,\n showCaptions: false,\n markdownCaptions: false,\n withWebp: false,\n withAvif: false,\n tracedSVG: false,\n loading: \"lazy\",\n disableBgImageOnAlpha: false,\n disableBgImage: false\n};\nexports.EMPTY_ALT = \"GATSBY_EMPTY_ALT\";\nexports.imageClass = \"gatsby-resp-image-image\";\nexports.imageWrapperClass = \"gatsby-resp-image-wrapper\";\nexports.imageBackgroundClass = \"gatsby-resp-image-background-image\";","function _extends() {\n module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _extends.apply(this, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nexports.__esModule = true;\nexports.onRouteUpdate = void 0;\n\nvar onRouteUpdate = function onRouteUpdate(_ref, pluginOptions) {\n var location = _ref.location;\n\n if (pluginOptions === void 0) {\n pluginOptions = {};\n }\n\n if (process.env.NODE_ENV !== \"production\" || typeof ga !== \"function\") {\n return null;\n }\n\n var pathIsExcluded = location && typeof window.excludeGAPaths !== \"undefined\" && window.excludeGAPaths.some(function (rx) {\n return rx.test(location.pathname);\n });\n if (pathIsExcluded) return null; // wrap inside a timeout to make sure react-helmet is done with it's changes (https://github.com/gatsbyjs/gatsby/issues/9139)\n // reactHelmet is using requestAnimationFrame: https://github.com/nfl/react-helmet/blob/5.2.0/src/HelmetUtils.js#L296-L299\n\n var sendPageView = function sendPageView() {\n var pagePath = location ? location.pathname + location.search + location.hash : undefined;\n window.ga(\"set\", \"page\", pagePath);\n window.ga(\"send\", \"pageview\");\n }; // Minimum delay for reactHelmet's requestAnimationFrame\n\n\n var delay = Math.max(32, pluginOptions.pageTransitionDelay || 0);\n setTimeout(sendPageView, delay);\n return null;\n};\n\nexports.onRouteUpdate = onRouteUpdate;","\"use strict\";\n\nvar _require = require(\"./constants\"),\n DEFAULT_OPTIONS = _require.DEFAULT_OPTIONS,\n imageClass = _require.imageClass,\n imageBackgroundClass = _require.imageBackgroundClass,\n imageWrapperClass = _require.imageWrapperClass;\n\nexports.onRouteUpdate = function (apiCallbackContext, pluginOptions) {\n var options = Object.assign({}, DEFAULT_OPTIONS, pluginOptions);\n var imageWrappers = document.querySelectorAll(\".\" + imageWrapperClass); // https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/\n // for cross-browser looping through NodeList without polyfills\n\n var _loop = function _loop(i) {\n var imageWrapper = imageWrappers[i];\n var backgroundElement = imageWrapper.querySelector(\".\" + imageBackgroundClass);\n var imageElement = imageWrapper.querySelector(\".\" + imageClass);\n\n var onImageLoad = function onImageLoad() {\n backgroundElement.style.transition = \"opacity 0.5s 0.5s\";\n imageElement.style.transition = \"opacity 0.5s\";\n onImageComplete();\n };\n\n var onImageComplete = function onImageComplete() {\n backgroundElement.style.opacity = 0;\n imageElement.style.opacity = 1;\n imageElement.style.color = \"inherit\";\n imageElement.style.boxShadow = \"inset 0px 0px 0px 400px \" + options.backgroundColor;\n imageElement.removeEventListener(\"load\", onImageLoad);\n imageElement.removeEventListener(\"error\", onImageComplete);\n };\n\n imageElement.style.opacity = 0;\n imageElement.addEventListener(\"load\", onImageLoad);\n imageElement.addEventListener(\"error\", onImageComplete);\n\n if (imageElement.complete) {\n onImageComplete();\n }\n };\n\n for (var i = 0; i < imageWrappers.length; i++) {\n _loop(i);\n }\n};","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","const plugins = require(`./api-runner-browser-plugins`)\nconst {\n getResourcesForPathname,\n getResourcesForPathnameSync,\n getResourceURLsForPathname,\n loadPage,\n loadPageSync,\n} = require(`./loader`).publicLoader\n\nexports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {\n // Hooks for gatsby-cypress's API handler\n if (process.env.CYPRESS_SUPPORT) {\n if (window.___apiHandler) {\n window.___apiHandler(api)\n } else if (window.___resolvedAPIs) {\n window.___resolvedAPIs.push(api)\n } else {\n window.___resolvedAPIs = [api]\n }\n }\n\n let results = plugins.map(plugin => {\n if (!plugin.plugin[api]) {\n return undefined\n }\n\n // Deprecated April 2019. Use `loadPageSync` instead\n args.getResourcesForPathnameSync = getResourcesForPathnameSync\n // Deprecated April 2019. Use `loadPage` instead\n args.getResourcesForPathname = getResourcesForPathname\n args.getResourceURLsForPathname = getResourceURLsForPathname\n args.loadPage = loadPage\n args.loadPageSync = loadPageSync\n\n const result = plugin.plugin[api](args, plugin.options)\n if (result && argTransform) {\n args = argTransform({ args, result, plugin })\n }\n return result\n })\n\n // Filter out undefined results.\n results = results.filter(result => typeof result !== `undefined`)\n\n if (results.length > 0) {\n return results\n } else if (defaultReturn) {\n return [defaultReturn]\n } else {\n return []\n }\n}\n\nexports.apiRunnerAsync = (api, args, defaultReturn) =>\n plugins.reduce(\n (previous, next) =>\n next.plugin[api]\n ? previous.then(() => next.plugin[api](args, next.options))\n : previous,\n Promise.resolve()\n )\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./node_modules/gatsby-link/index.js","webpack:///./node_modules/gatsby-react-router-scroll/session-storage.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireWildcard.js","webpack:///./.cache/normalize-page-path.js","webpack:///./.cache/find-path.js","webpack:///./node_modules/gatsby-react-router-scroll/use-scroll-restoration.js","webpack:///./.cache/emitter.js","webpack:///./node_modules/mitt/dist/mitt.es.js","webpack:///./node_modules/gatsby-react-router-scroll/index.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./.cache/react-lifecycles-compat.js","webpack:///./node_modules/@reach/router/es/lib/history.js","webpack:///./node_modules/gatsby-plugin-manifest/get-manifest-pathname.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-handler.js","webpack:///./.cache/page-renderer.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/@reach/router/es/lib/utils.js","webpack:///./.cache/api-runner-browser-plugins.js","webpack:///./node_modules/@mikaelkristiansson/domready/ready.js","webpack:///./.cache/register-service-worker.js","webpack:///./.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js","webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./.cache/route-announcer-props.js","webpack:///./.cache/navigation.js","webpack:///./node_modules/shallow-compare/es/index.js","webpack:///./.cache/ensure-resources.js","webpack:///./.cache/production-app.js","webpack:///./node_modules/@babel/runtime/helpers/inheritsLoose.js","webpack:///./.cache/gatsby-browser-entry.js","webpack:///./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js","webpack:///./node_modules/@reach/router/es/index.js","webpack:///./node_modules/@babel/runtime/helpers/typeof.js","webpack:///./.cache/strip-prefix.js","webpack:///./node_modules/gatsby-link/parse-path.js","webpack:///./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///./.cache/prefetch.js","webpack:///./.cache/loader.js","webpack:///./node_modules/gatsby-react-router-scroll/scroll-container.js","webpack:///./.cache/public-page-renderer.js","webpack:///./node_modules/gatsby-plugin-manifest/gatsby-browser.js","webpack:///./.cache/create-react-context.js","webpack:///./node_modules/gatsby-remark-images/constants.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/gatsby-plugin-google-analytics/gatsby-browser.js","webpack:///./node_modules/gatsby-remark-images/gatsby-browser.js","webpack:///./.cache/public-page-renderer-prod.js","webpack:///./.cache/api-runner-browser.js"],"names":["_interopRequireDefault","exports","__esModule","withPrefix","withAssetPrefix","path","getGlobalPathPrefix","navigateTo","replace","push","navigate","default","_objectWithoutPropertiesLoose2","_assertThisInitialized2","_inheritsLoose2","_extends2","_propTypes","_react","_router","_utils","_parsePath","parsePath","isAbsolutePath","startsWith","prefix","_ref","_prefix","getGlobalBasePrefix","isLocalLink","base","endsWith","slice","rewriteLinkPath","relativeTo","current","resolve","absolutify","NavLinkPropTypes","activeClassName","string","activeStyle","object","partiallyActive","bool","GatsbyLinkLocationWrapper","props","createElement","Location","_ref2","location","GatsbyLink","_location","_React$Component","_this","call","this","defaultGetProps","_ref3","isPartiallyCurrent","isCurrent","className","filter","Boolean","join","style","IOSupported","window","IntersectionObserver","state","handleRef","bind","_proto","prototype","_prefetch","currentPath","pathname","rewrittenPath","to","newPathName","___loader","enqueue","componentDidUpdate","prevProps","prevState","componentDidMount","componentWillUnmount","io","_this$io","instance","el","unobserve","disconnect","ref","cb","_this2","innerRef","hasOwnProperty","entries","forEach","entry","target","isIntersecting","intersectionRatio","observe","render","_this3","_this$props","_this$props$getProps","getProps","_onClick","onClick","_onMouseEnter","onMouseEnter","rest","prefixedTo","Link","e","hovering","button","defaultPrevented","metaKey","altKey","ctrlKey","shiftKey","preventDefault","shouldReplace","encodeURI","___navigate","href","Component","propTypes","func","isRequired","showDeprecationWarning","functionName","altFunctionName","version","console","warn","_default","forwardRef","options","___push","___replace","SessionStorage","read","key","stateKey","getStateKey","value","sessionStorage","getItem","JSON","parse","save","storedValue","stringify","setItem","stateKeyBase","_typeof","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","module","obj","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","desc","set","undefined","charAt","length","pathCache","Map","matchPaths","trimPathname","rawPathname","decodeURIComponent","stripPrefix","__BASE_PATH__","split","URL","setMatchPaths","findMatchPath","trimmedPathname","cleanPath","pickPaths","map","matchPath","originalPath","pick","normalizePagePath","route","grabMatchParams","params","findPath","foundPath","useScrollRestoration","identifier","useLocation","useContext","_scrollHandler","ScrollContext","useRef","useLayoutEffect","position","scrollTo","onScroll","scrollTop","emitter","all","create","on","type","handler","off","splice","indexOf","emit","evt","mitt","ScrollContainer","ScrollHandler","_scrollContainer","_useScrollRestoration","source","excluded","i","sourceKeys","keys","polyfill","_extends","assign","arguments","getLocation","_source$location","search","hash","origin","protocol","host","hostname","port","canUseDOM","decodeURI","history","createHistory","listeners","transitioning","resolveTransition","_onTransitionComplete","listen","listener","popstateListener","action","addEventListener","removeEventListener","fn","_ref$replace","go","Date","now","replaceState","pushState","transition","Promise","res","createMemorySource","initialPath","searchIndex","initialLocation","substr","index","stack","states","name","_","uri","_uri$split","_uri$split$","_uri$split2","_uri$split2$","newIndex","document","globalHistory","localizedManifests","Array","isArray","localizedManifest","find","app","start_url","lang","_interopRequireWildcard","React","_sessionStorage","createContext","displayName","_len","args","_key","apply","concat","_stateStorage","scrollListener","scrollY","windowScroll","shouldUpdateScroll","scrollToHash","node","getElementById","substring","scrollIntoView","prevRouterProps","routerProps","scrollPosition","_this$props$location","_this$props$location2","Provider","children","element","PageRenderer","_inheritsLoose","pageResources","json","pageContext","__params","pathContext","replacementElement","apiRunner","loader","publicLoader","pageElement","component","page","result","pop","_arrayLikeToArray","arr","len","arr2","_toConsumableArray","iter","Symbol","iterator","from","o","minLen","n","toString","constructor","test","TypeError","routes","match","default_","uriPathname","uriSegments","segmentize","isRootUri","ranked","rankRoutes","l","missed","routeSegments","max","Math","routeSegment","uriSegment","isSplat","dynamicMatch","paramRe","exec","reservedNames","_to$split","toPathname","toQuery","basePathname","toSegments","baseSegments","addQuery","allSegments","segments","segment","insertParams","_path$split","pathBase","_path$split$","query","constructedPath","_params$location","_params$location$sear","searchSplit","validateRedirect","isDynamic","sort","rankRoute","score","reduce","isRootSegment","SEGMENT_POINTS","a","b","q","shallowCompare","obj1","obj2","obj1Keys","every","plugin","require","ie10","navigator","appVersion","fns","doc","hack","documentElement","doScroll","loaded","readyState","shift","setTimeout","definition","error","serviceWorker","register","then","reg","installingWorker","installing","log","controller","___swUpdated","___failedResources","reload","catch","components","component---src-pages-404-js","component---src-pages-index-js","component---src-templates-blog-post-js","self","ReferenceError","condition","format","c","d","f","Error","argIndex","framesToPop","_setPrototypeOf","p","setPrototypeOf","__proto__","RouteAnnouncerProps","id","top","width","height","padding","overflow","clip","whiteSpace","border","redirectMap","redirectIgnoreCaseMap","maybeRedirect","redirect","toLowerCase","toPath","redirects","ignoreCase","fromPath","onPreRouteUpdate","prevLocation","onRouteUpdate","timeoutId","loadPage","status","PageResourceStatus","clearTimeout","webpackCompilationHash","___webpackCompilationHash","postMessage","gatsbyApi","reachNavigate","results","getSavedScrollPosition","oldPathname","RouteAnnouncer","announcementRef","createRef","nextProps","requestAnimationFrame","pageName","title","pageHeadings","querySelectorAll","textContent","newAnnouncement","innerText","compareLocationProps","nextLocation","_prevLocation$state","_nextLocation$state","RouteUpdates","_React$Component2","_proto2","shouldComponentUpdate","Fragment","shallowDiffers","_i","EnsureResources","loadPageSync","getDerivedStateFromProps","loadResources","rawPath","setState","nextState","ProdLoader","asyncRequires","setLoader","setApiRunner","___emitter","apiRunnerAsync","RouteHandler","BaseContext","baseuri","basepath","DataContext","GatsbyRoot","staticQueryResults","getStaticQueryResults","StaticQueryContext","LocationHandler","Consumer","Router","pagePath","browserLoc","SiteRoot","_ref4","App","renderer","ReactDOM","hydrate","domReady","subClass","superClass","prefetchPathname","StaticQueryDataRenderer","staticQueryData","data","finalData","StaticQuery","useStaticQuery","_context$query","context","isNaN","Number","graphql","_objectWithoutProperties","_classCallCheck","Constructor","_possibleConstructorReturn","_inherits","enumerable","writable","configurable","createNamedContext","defaultValue","Ctx","LocationContext","LocationProvider","_temp","getContext","refs","unlisten","_props$history","componentDidCatch","info","isRedirect","_navigate","unmounted","defaultProps","ServerLocation","url","baseContext","locationContext","RouterImpl","_React$PureComponent","_props","_navigate2","primary","_props$component","domProps","Children","toArray","array","child","createRoute","clone","cloneElement","FocusWrapper","FocusHandler","wrapperProps","PureComponent","FocusContext","requestFocus","FocusHandlerImpl","initialRender","focusHandlerCount","_temp2","_this4","_len2","_key2","shouldFocus","focus","myURIChanged","navigatedUpToMe","contains","activeElement","_this5","_props2","_props2$component","Comp","outline","tabIndex","k","C","_ref5","_ref6","_props$getProps","anchorProps","encodedHref","event","shouldNavigate","_location$state","restState","RedirectRequest","redirectTo","RedirectImpl","_React$Component3","_props3","_props3$replace","noThrow","resolvedTo","_props4","Redirect","_ref7","Match","_ref8","_ref9","_ref10","resolvedPath","useNavigate","useParams","useMatch","stripSlashes","str","elementPath","hashIndex","supportedPrefetchStrategy","feature","fakeLink","relList","supports","err","support","reject","link","setAttribute","onload","onerror","getElementsByTagName","getElementsByName","parentNode","appendChild","req","XMLHttpRequest","open","send","preFetched","prefetch","Success","preferDefault","m","createPageDataUrl","s","doFetch","method","onreadystatechange","toPageResources","pageData","componentChunkName","staticQueryHashes","BaseLoader","loadComponent","inFlightNetworkRequests","pageDb","inFlightDb","staticQueryDb","pageDataDb","prefetchTriggered","Set","prefetchCompleted","memoizedGet","inFlightPromise","response","delete","prefetchDisabled","some","fetchPageDataJson","loadObj","retries","responseText","jsonPayload","payload","notFound","loadPageDataJson","loadAppData","allData","finalResult","componentChunkPromise","createdAt","staticQueryBatchPromise","staticQueryHash","staticQueryResultsMap","shouldPrefetch","doesConnectionSupportPrefetch","connection","effectiveType","includes","saveData","add","realPath","doPrefetch","pageDataUrl","prefetchHelper","crossOrigin","as","getResourceURLsForPathname","createComponentUrls","isPageNotFound","appData","___chunkMapping","chunk","__PATH_PREFIX__","_BaseLoader","chunkName","componentUrls","_loader","getResourcesForPathname","getResourcesForPathnameSync","_reactDom","scrollKey","ScrollContainerImplementation","findDOMNode","DEFAULT_OPTIONS","maxWidth","wrapperStyle","backgroundColor","linkImagesToOriginal","showCaptions","markdownCaptions","withWebp","withAvif","tracedSVG","loading","disableBgImageOnAlpha","disableBgImage","EMPTY_ALT","imageClass","imageWrapperClass","imageBackgroundClass","pluginOptions","ga","excludeGAPaths","rx","delay","pageTransitionDelay","_require","apiCallbackContext","imageWrappers","_loop","imageWrapper","backgroundElement","querySelector","imageElement","onImageLoad","onImageComplete","opacity","color","boxShadow","complete","ProdPageRenderer","InternalPageRenderer","plugins","api","defaultReturn","argTransform","previous","next"],"mappings":";6FAEA,IAAIA,EAAyB,EAAQ,QAErCC,EAAQC,YAAa,EACrBD,EAAQE,WAAaA,EACrBF,EAAQG,gBA4DR,SAAyBC,GACvB,OAAOF,EAAWE,EAAMC,MA5D1BL,EAAQM,WAAaN,EAAQO,QAAUP,EAAQQ,KAAOR,EAAQS,SAAWT,EAAQU,aAAU,EAE3F,IAAIC,EAAiCZ,EAAuB,EAAQ,SAEhEa,EAA0Bb,EAAuB,EAAQ,SAEzDc,EAAkBd,EAAuB,EAAQ,SAEjDe,EAAYf,EAAuB,EAAQ,SAE3CgB,EAAahB,EAAuB,EAAQ,SAE5CiB,EAASjB,EAAuB,EAAQ,SAExCkB,EAAU,EAAQ,QAElBC,EAAS,EAAQ,QAEjBC,EAAa,EAAQ,QAEzBnB,EAAQoB,UAAYD,EAAWC,UAE/B,IAAIC,EAAiB,SAAwBjB,GAC3C,OAAOA,aAAmC,EAASA,EAAKkB,WAAW,MAGrE,SAASpB,EAAWE,EAAMmB,GACxB,IAAIC,EAAMC,EAMV,QAJe,IAAXF,IACFA,EAASG,MAGNC,EAAYvB,GACf,OAAOA,EAGT,GAAIA,EAAKkB,WAAW,OAASlB,EAAKkB,WAAW,OAC3C,OAAOlB,EAGT,IAAIwB,EAAwG,Q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"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.withPrefix = withPrefix;\nexports.withAssetPrefix = withAssetPrefix;\nexports.navigateTo = exports.replace = exports.push = exports.navigate = exports.default = void 0;\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _router = require(\"@reach/router\");\n\nvar _utils = require(\"@reach/router/lib/utils\");\n\nvar _parsePath = require(\"./parse-path\");\n\nexports.parsePath = _parsePath.parsePath;\n\nvar isAbsolutePath = function isAbsolutePath(path) {\n return path === null || path === void 0 ? void 0 : path.startsWith(\"/\");\n};\n\nfunction withPrefix(path, prefix) {\n var _ref, _prefix;\n\n if (prefix === void 0) {\n prefix = getGlobalBasePrefix();\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n if (path.startsWith(\"./\") || path.startsWith(\"../\")) {\n return path;\n }\n\n var base = (_ref = (_prefix = prefix) !== null && _prefix !== void 0 ? _prefix : getGlobalPathPrefix()) !== null && _ref !== void 0 ? _ref : \"/\";\n return \"\" + ((base === null || base === void 0 ? void 0 : base.endsWith(\"/\")) ? base.slice(0, -1) : base) + (path.startsWith(\"/\") ? path : \"/\" + path);\n} // These global values are wrapped in typeof clauses to ensure the values exist.\n// This is especially problematic in unit testing of this component.\n\n\nvar getGlobalPathPrefix = function getGlobalPathPrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __PATH_PREFIX__ !== \"undefined\" ? __PATH_PREFIX__ : undefined : __PATH_PREFIX__;\n};\n\nvar getGlobalBasePrefix = function getGlobalBasePrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __BASE_PATH__ !== \"undefined\" ? __BASE_PATH__ : undefined : __BASE_PATH__;\n};\n\nvar isLocalLink = function isLocalLink(path) {\n return path && !path.startsWith(\"http://\") && !path.startsWith(\"https://\") && !path.startsWith(\"//\");\n};\n\nfunction withAssetPrefix(path) {\n return withPrefix(path, getGlobalPathPrefix());\n}\n\nfunction absolutify(path, current) {\n // If it's already absolute, return as-is\n if (isAbsolutePath(path)) {\n return path;\n }\n\n return (0, _utils.resolve)(path, current);\n}\n\nvar rewriteLinkPath = function rewriteLinkPath(path, relativeTo) {\n if (typeof path === \"number\") {\n return path;\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n return isAbsolutePath(path) ? withPrefix(path) : absolutify(path, relativeTo);\n};\n\nvar NavLinkPropTypes = {\n activeClassName: _propTypes.default.string,\n activeStyle: _propTypes.default.object,\n partiallyActive: _propTypes.default.bool\n}; // Set up IntersectionObserver\n\nvar createIntersectionObserver = function createIntersectionObserver(el, cb) {\n var io = new window.IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n if (el === entry.target) {\n // Check if element is within viewport, remove listener, destroy observer, and run link callback.\n // MSEdge doesn't currently support isIntersecting, so also test for an intersectionRatio > 0\n if (entry.isIntersecting || entry.intersectionRatio > 0) {\n io.unobserve(el);\n io.disconnect();\n cb();\n }\n }\n });\n }); // Add element to the observer\n\n io.observe(el);\n return {\n instance: io,\n el: el\n };\n};\n\nfunction GatsbyLinkLocationWrapper(props) {\n return /*#__PURE__*/_react.default.createElement(_router.Location, null, function (_ref2) {\n var location = _ref2.location;\n return /*#__PURE__*/_react.default.createElement(GatsbyLink, (0, _extends2.default)({}, props, {\n _location: location\n }));\n });\n}\n\nvar GatsbyLink = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(GatsbyLink, _React$Component);\n\n function GatsbyLink(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // Default to no support for IntersectionObserver\n\n _this.defaultGetProps = function (_ref3) {\n var isPartiallyCurrent = _ref3.isPartiallyCurrent,\n isCurrent = _ref3.isCurrent;\n\n if (_this.props.partiallyActive ? isPartiallyCurrent : isCurrent) {\n return {\n className: [_this.props.className, _this.props.activeClassName].filter(Boolean).join(\" \"),\n style: (0, _extends2.default)({}, _this.props.style, _this.props.activeStyle)\n };\n }\n\n return null;\n };\n\n var IOSupported = false;\n\n if (typeof window !== \"undefined\" && window.IntersectionObserver) {\n IOSupported = true;\n }\n\n _this.state = {\n IOSupported: IOSupported\n };\n _this.handleRef = _this.handleRef.bind((0, _assertThisInitialized2.default)(_this));\n return _this;\n }\n\n var _proto = GatsbyLink.prototype;\n\n _proto._prefetch = function _prefetch() {\n var currentPath = window.location.pathname; // reach router should have the correct state\n\n if (this.props._location && this.props._location.pathname) {\n currentPath = this.props._location.pathname;\n }\n\n var rewrittenPath = rewriteLinkPath(this.props.to, currentPath);\n var newPathName = (0, _parsePath.parsePath)(rewrittenPath).pathname; // Prefech is used to speed up next navigations. When you use it on the current navigation,\n // there could be a race-condition where Chrome uses the stale data instead of waiting for the network to complete\n\n if (currentPath !== newPathName) {\n ___loader.enqueue(newPathName);\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Preserve non IO functionality if no support\n if (this.props.to !== prevProps.to && !this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n // Preserve non IO functionality if no support\n if (!this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (!this.io) {\n return;\n }\n\n var _this$io = this.io,\n instance = _this$io.instance,\n el = _this$io.el;\n instance.unobserve(el);\n instance.disconnect();\n };\n\n _proto.handleRef = function handleRef(ref) {\n var _this2 = this;\n\n if (this.props.innerRef && this.props.innerRef.hasOwnProperty(\"current\")) {\n this.props.innerRef.current = ref;\n } else if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n if (this.state.IOSupported && ref) {\n // If IO supported and element reference found, setup Observer functionality\n this.io = createIntersectionObserver(ref, function () {\n _this2._prefetch();\n });\n }\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var _this$props = this.props,\n to = _this$props.to,\n _this$props$getProps = _this$props.getProps,\n getProps = _this$props$getProps === void 0 ? this.defaultGetProps : _this$props$getProps,\n _onClick = _this$props.onClick,\n _onMouseEnter = _this$props.onMouseEnter,\n $activeClassName = _this$props.activeClassName,\n $activeStyle = _this$props.activeStyle,\n $innerRef = _this$props.innerRef,\n partiallyActive = _this$props.partiallyActive,\n state = _this$props.state,\n replace = _this$props.replace,\n _location = _this$props._location,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"to\", \"getProps\", \"onClick\", \"onMouseEnter\", \"activeClassName\", \"activeStyle\", \"innerRef\", \"partiallyActive\", \"state\", \"replace\", \"_location\"]);\n\n if (process.env.NODE_ENV !== \"production\" && !isLocalLink(to)) {\n console.warn(\"External link \" + to + \" was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links\");\n }\n\n var prefixedTo = rewriteLinkPath(to, _location.pathname);\n\n if (!isLocalLink(prefixedTo)) {\n return /*#__PURE__*/_react.default.createElement(\"a\", (0, _extends2.default)({\n href: prefixedTo\n }, rest));\n }\n\n return /*#__PURE__*/_react.default.createElement(_router.Link, (0, _extends2.default)({\n to: prefixedTo,\n state: state,\n getProps: getProps,\n innerRef: this.handleRef,\n onMouseEnter: function onMouseEnter(e) {\n if (_onMouseEnter) {\n _onMouseEnter(e);\n }\n\n ___loader.hovering((0, _parsePath.parsePath)(prefixedTo).pathname);\n },\n onClick: function onClick(e) {\n if (_onClick) {\n _onClick(e);\n }\n\n if (e.button === 0 && // ignore right clicks\n !_this3.props.target && // let browser handle \"target=_blank\"\n !e.defaultPrevented && // onClick prevented default\n !e.metaKey && // ignore clicks with modifier keys...\n !e.altKey && !e.ctrlKey && !e.shiftKey) {\n e.preventDefault();\n var shouldReplace = replace;\n\n var isCurrent = encodeURI(prefixedTo) === _location.pathname;\n\n if (typeof replace !== \"boolean\" && isCurrent) {\n shouldReplace = true;\n } // Make sure the necessary scripts and data are\n // loaded before continuing.\n\n\n window.___navigate(prefixedTo, {\n state: state,\n replace: shouldReplace\n });\n }\n\n return true;\n }\n }, rest));\n };\n\n return GatsbyLink;\n}(_react.default.Component);\n\nGatsbyLink.propTypes = (0, _extends2.default)({}, NavLinkPropTypes, {\n onClick: _propTypes.default.func,\n to: _propTypes.default.string.isRequired,\n replace: _propTypes.default.bool,\n state: _propTypes.default.object\n});\n\nvar showDeprecationWarning = function showDeprecationWarning(functionName, altFunctionName, version) {\n return console.warn(\"The \\\"\" + functionName + \"\\\" method is now deprecated and will be removed in Gatsby v\" + version + \". Please use \\\"\" + altFunctionName + \"\\\" instead.\");\n};\n\nvar _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n return /*#__PURE__*/_react.default.createElement(GatsbyLinkLocationWrapper, (0, _extends2.default)({\n innerRef: ref\n }, props));\n});\n\nexports.default = _default;\n\nvar navigate = function navigate(to, options) {\n window.___navigate(rewriteLinkPath(to, window.location.pathname), options);\n};\n\nexports.navigate = navigate;\n\nvar push = function push(to) {\n showDeprecationWarning(\"push\", \"navigate\", 3);\n\n window.___push(rewriteLinkPath(to, window.location.pathname));\n};\n\nexports.push = push;\n\nvar replace = function replace(to) {\n showDeprecationWarning(\"replace\", \"navigate\", 3);\n\n window.___replace(rewriteLinkPath(to, window.location.pathname));\n}; // TODO: Remove navigateTo for Gatsby v3\n\n\nexports.replace = replace;\n\nvar navigateTo = function navigateTo(to) {\n showDeprecationWarning(\"navigateTo\", \"navigate\", 3);\n return push(to);\n};\n\nexports.navigateTo = navigateTo;","\"use strict\";\n\nexports.__esModule = true;\nexports.SessionStorage = void 0;\nvar STATE_KEY_PREFIX = \"@@scroll|\";\nvar GATSBY_ROUTER_SCROLL_STATE = \"___GATSBY_REACT_ROUTER_SCROLL\";\n\nvar SessionStorage = /*#__PURE__*/function () {\n function SessionStorage() {}\n\n var _proto = SessionStorage.prototype;\n\n _proto.read = function read(location, key) {\n var stateKey = this.getStateKey(location, key);\n\n try {\n var value = window.sessionStorage.getItem(stateKey);\n return value ? JSON.parse(value) : 0;\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to access sessionStorage; sessionStorage is not available.\");\n }\n\n if (window && window[GATSBY_ROUTER_SCROLL_STATE] && window[GATSBY_ROUTER_SCROLL_STATE][stateKey]) {\n return window[GATSBY_ROUTER_SCROLL_STATE][stateKey];\n }\n\n return 0;\n }\n };\n\n _proto.save = function save(location, key, value) {\n var stateKey = this.getStateKey(location, key);\n var storedValue = JSON.stringify(value);\n\n try {\n window.sessionStorage.setItem(stateKey, storedValue);\n } catch (e) {\n if (window && window[GATSBY_ROUTER_SCROLL_STATE]) {\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n } else {\n window[GATSBY_ROUTER_SCROLL_STATE] = {};\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to save state in sessionStorage; sessionStorage is not available.\");\n }\n }\n };\n\n _proto.getStateKey = function getStateKey(location, key) {\n var stateKeyBase = \"\" + STATE_KEY_PREFIX + location.pathname;\n return key === null || typeof key === \"undefined\" ? stateKeyBase : stateKeyBase + \"|\" + key;\n };\n\n return SessionStorage;\n}();\n\nexports.SessionStorage = SessionStorage;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n var cache = _getRequireWildcardCache(nodeInterop);\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj[\"default\"] = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nmodule.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default path => {\n if (path === undefined) {\n return path\n }\n if (path === `/`) {\n return `/`\n }\n if (path.charAt(path.length - 1) === `/`) {\n return path.slice(0, -1)\n }\n return path\n}\n","import { pick } from \"@reach/router/lib/utils\"\nimport stripPrefix from \"./strip-prefix\"\nimport normalizePagePath from \"./normalize-page-path\"\n\nconst pathCache = new Map()\nlet matchPaths = []\n\nconst trimPathname = rawPathname => {\n const pathname = decodeURIComponent(rawPathname)\n // Remove the pathPrefix from the pathname.\n const trimmedPathname = stripPrefix(pathname, __BASE_PATH__)\n // Remove any hashfragment\n .split(`#`)[0]\n // Remove search query\n .split(`?`)[0]\n\n return trimmedPathname\n}\n\nfunction absolutify(path) {\n // If it's already absolute, return as-is\n if (\n path.startsWith(`/`) ||\n path.startsWith(`https://`) ||\n path.startsWith(`http://`)\n ) {\n return path\n }\n // Calculate path relative to current location, adding a trailing slash to\n // match behavior of @reach/router\n return new URL(\n path,\n window.location.href + (window.location.href.endsWith(`/`) ? `` : `/`)\n ).pathname\n}\n\n/**\n * Set list of matchPaths\n *\n * @param {Array<{path: string, matchPath: string}>} value collection of matchPaths\n */\nexport const setMatchPaths = value => {\n matchPaths = value\n}\n\n/**\n * Return a matchpath url\n * if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n * `/foo?bar=far` => `/page1`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string|null}\n */\nexport const findMatchPath = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return normalizePagePath(path.route.originalPath)\n }\n\n return null\n}\n\n/**\n * Return a matchpath params from reach/router rules\n * if `match-paths.json` contains `{ \":bar/*foo\" }`, and the path is /baz/zaz/zoo\n * then it returns\n * { bar: baz, foo: zaz/zoo }\n *\n * @param {string} rawPathname A raw pathname\n * @return {object}\n */\nexport const grabMatchParams = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return path.params\n }\n\n return {}\n}\n\n// Given a raw URL path, returns the cleaned version of it (trim off\n// `#` and query params), or if it matches an entry in\n// `match-paths.json`, its matched path is returned\n//\n// E.g. `/foo?bar=far` => `/foo`\n//\n// Or if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n// `/foo?bar=far` => `/page1`\nexport const findPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n if (pathCache.has(trimmedPathname)) {\n return pathCache.get(trimmedPathname)\n }\n\n let foundPath = findMatchPath(trimmedPathname)\n\n if (!foundPath) {\n foundPath = cleanPath(rawPathname)\n }\n\n pathCache.set(trimmedPathname, foundPath)\n\n return foundPath\n}\n\n/**\n * Clean a url and converts /index.html => /\n * E.g. `/foo?bar=far` => `/foo`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string}\n */\nexport const cleanPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n\n let foundPath = trimmedPathname\n if (foundPath === `/index.html`) {\n foundPath = `/`\n }\n\n foundPath = normalizePagePath(foundPath)\n\n return foundPath\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = useScrollRestoration;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _react = require(\"react\");\n\nvar _router = require(\"@reach/router\");\n\nfunction useScrollRestoration(identifier) {\n var location = (0, _router.useLocation)();\n var state = (0, _react.useContext)(_scrollHandler.ScrollContext);\n var ref = (0, _react.useRef)();\n (0, _react.useLayoutEffect)(function () {\n if (ref.current) {\n var position = state.read(location, identifier);\n ref.current.scrollTo(0, position || 0);\n }\n }, []);\n return {\n ref: ref,\n onScroll: function onScroll() {\n if (ref.current) {\n state.save(location, identifier, ref.current.scrollTop);\n }\n }\n };\n}","import mitt from \"mitt\"\n\nconst emitter = mitt()\nexport default emitter\n","// \n// An event handler can take an optional event argument\n// and should not return a value\n \n \n\n// An array of all currently registered event handlers for a type\n \n \n// A map of event types and their corresponding event handlers.\n \n \n \n \n\n/** Mitt: Tiny (~200b) functional event emitter / pubsub.\n * @name mitt\n * @returns {Mitt}\n */\nfunction mitt(all ) {\n\tall = all || Object.create(null);\n\n\treturn {\n\t\t/**\n\t\t * Register an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to listen for, or `\"*\"` for all events\n\t\t * @param {Function} handler Function to call in response to given event\n\t\t * @memberOf mitt\n\t\t */\n\t\ton: function on(type , handler ) {\n\t\t\t(all[type] || (all[type] = [])).push(handler);\n\t\t},\n\n\t\t/**\n\t\t * Remove an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to unregister `handler` from, or `\"*\"`\n\t\t * @param {Function} handler Handler function to remove\n\t\t * @memberOf mitt\n\t\t */\n\t\toff: function off(type , handler ) {\n\t\t\tif (all[type]) {\n\t\t\t\tall[type].splice(all[type].indexOf(handler) >>> 0, 1);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Invoke all handlers for the given type.\n\t\t * If present, `\"*\"` handlers are invoked after type-matched handlers.\n\t\t *\n\t\t * @param {String} type The event type to invoke\n\t\t * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler\n\t\t * @memberOf mitt\n\t\t */\n\t\temit: function emit(type , evt ) {\n\t\t\t(all[type] || []).slice().map(function (handler) { handler(evt); });\n\t\t\t(all['*'] || []).slice().map(function (handler) { handler(type, evt); });\n\t\t}\n\t};\n}\n\nexport default mitt;\n//# sourceMappingURL=mitt.es.js.map\n","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = exports.ScrollContainer = exports.ScrollContext = void 0;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nexports.ScrollContext = _scrollHandler.ScrollHandler;\n\nvar _scrollContainer = require(\"./scroll-container\");\n\nexports.ScrollContainer = _scrollContainer.ScrollContainer;\n\nvar _useScrollRestoration = require(\"./use-scroll-restoration\");\n\nexports.useScrollRestoration = _useScrollRestoration.useScrollRestoration;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","exports.polyfill = Component => Component\n","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n\n\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\n\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n var resolveTransition = function resolveTransition() {};\n\n return {\n get location() {\n return location;\n },\n\n get transitioning() {\n return transitioning;\n },\n\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({ location: location, action: \"POP\" });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, { key: Date.now() + \"\" });\n // try...catch iOS Safari limits to 100 pushState calls\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({ location: location, action: \"PUSH\" });\n });\n return transition;\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n\n return {\n get location() {\n return stack[index];\n },\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n\n history: {\n get entries() {\n return stack;\n },\n get index() {\n return index;\n },\n get state() {\n return states[index];\n },\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n\n index++;\n stack.push({ pathname: pathname, search: search.length ? \"?\" + search : search });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n\n stack[index] = { pathname: pathname, search: search };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n\n index = newIndex;\n }\n }\n };\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\n\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate;\n\n////////////////////////////////////////////////////////////////////////////////\n\nexport { globalHistory, navigate, createHistory, createMemorySource };","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @return string\n */\nvar _default = function _default(pathname, localizedManifests) {\n var defaultFilename = \"manifest.webmanifest\";\n\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n\n var localizedManifest = localizedManifests.find(function (app) {\n return pathname.startsWith(app.start_url);\n });\n\n if (!localizedManifest) {\n return defaultFilename;\n }\n\n return \"manifest_\" + localizedManifest.lang + \".webmanifest\";\n};\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollHandler = exports.ScrollContext = void 0;\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _sessionStorage = require(\"./session-storage\");\n\nvar ScrollContext = /*#__PURE__*/React.createContext(new _sessionStorage.SessionStorage());\nexports.ScrollContext = ScrollContext;\nScrollContext.displayName = \"GatsbyScrollContext\";\n\nvar ScrollHandler = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollHandler, _React$Component);\n\n function ScrollHandler() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this._stateStorage = new _sessionStorage.SessionStorage();\n\n _this.scrollListener = function () {\n var key = _this.props.location.key;\n\n if (key) {\n _this._stateStorage.save(_this.props.location, key, window.scrollY);\n }\n };\n\n _this.windowScroll = function (position, prevProps) {\n if (_this.shouldUpdateScroll(prevProps, _this.props)) {\n window.scrollTo(0, position);\n }\n };\n\n _this.scrollToHash = function (hash, prevProps) {\n var node = document.getElementById(hash.substring(1));\n\n if (node && _this.shouldUpdateScroll(prevProps, _this.props)) {\n node.scrollIntoView();\n }\n };\n\n _this.shouldUpdateScroll = function (prevRouterProps, routerProps) {\n var shouldUpdateScroll = _this.props.shouldUpdateScroll;\n\n if (!shouldUpdateScroll) {\n return true;\n } // Hack to allow accessing this._stateStorage.\n\n\n return shouldUpdateScroll.call((0, _assertThisInitialized2.default)(_this), prevRouterProps, routerProps);\n };\n\n return _this;\n }\n\n var _proto = ScrollHandler.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n window.addEventListener(\"scroll\", this.scrollListener);\n var scrollPosition;\n var _this$props$location = this.props.location,\n key = _this$props$location.key,\n hash = _this$props$location.hash;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n\n if (scrollPosition) {\n this.windowScroll(scrollPosition, undefined);\n } else if (hash) {\n this.scrollToHash(decodeURI(hash), undefined);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.scrollListener);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props$location2 = this.props.location,\n hash = _this$props$location2.hash,\n key = _this$props$location2.key;\n var scrollPosition;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n /** There are two pieces of state: the browser url and\n * history state which keeps track of scroll position\n * Native behaviour prescribes that we ought to restore scroll position\n * when a user navigates back in their browser (this is the `POP` action)\n * Currently, reach router has a bug that prevents this at https://github.com/reach/router/issues/228\n * So we _always_ stick to the url as a source of truth — if the url\n * contains a hash, we scroll to it\n */\n\n\n if (hash) {\n this.scrollToHash(decodeURI(hash), prevProps);\n } else {\n this.windowScroll(scrollPosition, prevProps);\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(ScrollContext.Provider, {\n value: this._stateStorage\n }, this.props.children);\n };\n\n return ScrollHandler;\n}(React.Component);\n\nexports.ScrollHandler = ScrollHandler;\nScrollHandler.propTypes = {\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired,\n location: _propTypes.default.object.isRequired\n};","import React, { createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { publicLoader } from \"./loader\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\n\n// Renders page\nclass PageRenderer extends React.Component {\n render() {\n const props = {\n ...this.props,\n params: {\n ...grabMatchParams(this.props.location.pathname),\n ...this.props.pageResources.json.pageContext.__params,\n },\n pathContext: this.props.pageContext,\n }\n\n const [replacementElement] = apiRunner(`replaceComponentRenderer`, {\n props: this.props,\n loader: publicLoader,\n })\n\n const pageElement =\n replacementElement ||\n createElement(this.props.pageResources.component, {\n ...props,\n key: this.props.path || this.props.pageResources.page.path,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n { element: pageElement, props },\n pageElement,\n ({ result }) => {\n return { element: result, props }\n }\n ).pop()\n\n return wrappedPage\n }\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import invariant from \"invariant\";\n\n////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n var dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : invariant(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\nvar match = function match(path, uri) {\n return pick([{ path: path }], uri);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname);\n\n // ?a=b, /users?b=c => /users?a=b\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n }\n\n // profile, /users/789 => /users/789/profile\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n }\n\n // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\n};\n\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar paramRe = /^:(.+)/;\n\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\n\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\n\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return { route: route, score: score, index: index };\n};\n\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\n\nvar segmentize = function segmentize(uri) {\n return uri\n // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\n\nvar addQuery = function addQuery(pathname) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\n};\n\nvar reservedNames = [\"uri\", \"path\"];\n\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n};\n\n////////////////////////////////////////////////////////////////////////////////\nexport { startsWith, pick, match, resolve, insertParams, validateRedirect, shallowCompare };","module.exports = [{\n plugin: require('../node_modules/gatsby-remark-images/gatsby-browser.js'),\n options: {\"plugins\":[],\"maxWidth\":590,\"linkImagesToOriginal\":true,\"showCaptions\":false,\"markdownCaptions\":false,\"sizeByPixelDensity\":false,\"backgroundColor\":\"white\",\"quality\":50,\"withWebp\":false,\"tracedSVG\":false,\"loading\":\"lazy\",\"disableBgImageOnAlpha\":false,\"disableBgImage\":false},\n },{\n plugin: require('../node_modules/gatsby-plugin-google-analytics/gatsby-browser.js'),\n options: {\"plugins\":[],\"head\":false,\"anonymize\":false,\"respectDNT\":false,\"exclude\":[],\"pageTransitionDelay\":0},\n },{\n plugin: require('../node_modules/gatsby-plugin-manifest/gatsby-browser.js'),\n options: {\"plugins\":[],\"name\":\"SmartBlock\",\"short_name\":\"SmartBlock\",\"start_url\":\"/\",\"background_color\":\"#ffffff\",\"theme_color\":\"#663399\",\"display\":\"minimal-ui\",\"icon\":\"static/favicon.png\",\"legacy\":true,\"theme_color_in_head\":true,\"cache_busting_mode\":\"query\",\"crossOrigin\":\"anonymous\",\"include_favicon\":true,\"cacheDigest\":\"084321a740e799687cc736487af34310\"},\n },{\n plugin: require('../gatsby-browser.js'),\n options: {\"plugins\":[]},\n }]\n","/*!\n * domready (c) Dustin Diaz 2014 - License MIT\n * ie10 fix - Mikael Kristiansson 2019\n */\n!(function(name, definition) {\n if (typeof module != \"undefined\") module.exports = definition();\n else if (typeof define == \"function\" && typeof define.amd == \"object\")\n define(definition);\n else this[name] = definition();\n})(\"domready\", function() {\n var ie10 = false;\n if (navigator.appVersion.indexOf(\"MSIE 10\") !== -1) {\n ie10 = true;\n }\n\n var fns = [],\n listener,\n doc = typeof document === \"object\" && document,\n hack = ie10\n ? doc.documentElement.doScroll(\"left\")\n : doc.documentElement.doScroll,\n domContentLoaded = \"DOMContentLoaded\",\n loaded =\n doc && (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);\n\n if (!loaded && doc)\n doc.addEventListener(\n domContentLoaded,\n (listener = function() {\n doc.removeEventListener(domContentLoaded, listener);\n loaded = 1;\n while ((listener = fns.shift())) listener();\n })\n );\n\n return function(fn) {\n loaded ? setTimeout(fn, 0) : fns.push(fn);\n };\n});\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","// prefer default export if available\nconst preferDefault = m => (m && m.default) || m\n\nexports.components = {\n \"component---src-pages-404-js\": () => import(\"./../../../src/pages/404.js\" /* webpackChunkName: \"component---src-pages-404-js\" */),\n \"component---src-pages-index-js\": () => import(\"./../../../src/pages/index.js\" /* webpackChunkName: \"component---src-pages-index-js\" */),\n \"component---src-templates-blog-post-js\": () => import(\"./../../../src/templates/blog-post.js\" /* webpackChunkName: \"component---src-templates-blog-post-js\" */)\n}\n\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport redirects from \"./redirects.json\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport { navigate as reachNavigate } from \"@reach/router\"\nimport { globalHistory } from \"@reach/router/lib/history\"\nimport { parsePath } from \"gatsby-link\"\n\n// Convert to a map for faster lookup in maybeRedirect()\n\nconst redirectMap = new Map()\nconst redirectIgnoreCaseMap = new Map()\n\nredirects.forEach(redirect => {\n if (redirect.ignoreCase) {\n redirectIgnoreCaseMap.set(redirect.fromPath, redirect)\n } else {\n redirectMap.set(redirect.fromPath, redirect)\n }\n})\n\nfunction maybeRedirect(pathname) {\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n\n if (redirect != null) {\n if (process.env.NODE_ENV !== `production`) {\n if (!loader.isPageNotFound(pathname)) {\n console.error(\n `The route \"${pathname}\" matches both a page and a redirect; this is probably not intentional.`\n )\n }\n }\n\n window.___replace(redirect.toPath)\n return true\n } else {\n return false\n }\n}\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_EXPERIMENTAL_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n let { pathname } = parsePath(to)\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath\n pathname = parsePath(to).pathname\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n\n // Check for initial page-load redirect\n maybeRedirect(window.location.pathname)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
          \n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onPreRouteUpdate(this.props.location, prevProps.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n \n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources: pageResources || loader.loadPageSync(location.pathname),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(location.pathname)\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (process.env.NODE_ENV !== `production` && !this.state.pageResources) {\n throw new Error(\n `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n )\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { Router, navigate, Location, BaseContext } from \"@reach/router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport domReady from \"@mikaelkristiansson/domready\"\nimport { StaticQueryContext } from \"gatsby\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n \n \n \n )\n\n const DataContext = React.createContext({})\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n \n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n return (\n \n \n {children}\n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n \n {({ pageResources, location }) => (\n \n \n \n \n
          \n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). But\n // only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !== browserLoc.pathname &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath === `/404.html` ||\n pagePath.match(/^\\/404\\/?$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(__BASE_PATH__ + pagePath + browserLoc.search + browserLoc.hash, {\n replace: true,\n })\n }\n\n publicLoader.loadPage(browserLoc.pathname).then(page => {\n if (!page || page.status === PageResourceStatus.Error) {\n throw new Error(\n `page resources for ${browserLoc.pathname} not found. Not rendering React`\n )\n }\n\n window.___webpackCompilationHash = page.page.webpackCompilationHash\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element: },\n ,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = () => {SiteRoot}\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n ReactDOM.hydrate\n )[0]\n\n domReady(() => {\n renderer(\n ,\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : void 0,\n () => {\n apiRunner(`onInitialClientRender`)\n }\n )\n })\n })\n})\n","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Link, {\n withPrefix,\n withAssetPrefix,\n navigate,\n push,\n replace,\n navigateTo,\n parsePath,\n} from \"gatsby-link\"\nimport { useScrollRestoration } from \"gatsby-react-router-scroll\"\nimport PageRenderer from \"./public-page-renderer\"\nimport loader from \"./loader\"\n\nconst prefetchPathname = loader.enqueue\n\nconst StaticQueryContext = React.createContext({})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n \n {finalData && render(finalData)}\n {!finalData &&
          Loading (StaticQuery)
          }\n
          \n )\n}\n\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n return (\n \n {staticQueryData => (\n \n )}\n \n )\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nfunction graphql() {\n throw new Error(\n `It appears like Gatsby is misconfigured. Gatsby related \\`graphql\\` calls ` +\n `are supposed to only be evaluated at compile time, and then compiled away. ` +\n `Unfortunately, something went wrong and the query was left in the compiled code.\\n\\n` +\n `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`\n )\n}\n\nexport {\n Link,\n withAssetPrefix,\n withPrefix,\n graphql,\n parsePath,\n navigate,\n push, // TODO replace for v3\n replace, // TODO remove replace for v3\n navigateTo, // TODO: remove navigateTo for v3\n useScrollRestoration,\n StaticQueryContext,\n StaticQuery,\n PageRenderer,\n useStaticQuery,\n prefetchPathname,\n}\n","\"use strict\";\n\nmodule.exports = Object.assign;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint-disable jsx-a11y/anchor-has-content */\nimport React, { useContext } from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport createContext from \"create-react-context\";\nimport { polyfill } from \"react-lifecycles-compat\";\nimport { startsWith, pick, resolve, match, insertParams, validateRedirect, shallowCompare } from \"./lib/utils\";\nimport { globalHistory, navigate, createHistory, createMemorySource } from \"./lib/history\";\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar createNamedContext = function createNamedContext(name, defaultValue) {\n var Ctx = createContext(defaultValue);\n Ctx.displayName = name;\n return Ctx;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Location Context/Provider\nvar LocationContext = createNamedContext(\"Location\");\n\n// sets up a listener if there isn't one already so apps don't need to be\n// wrapped in some top level provider\nvar Location = function Location(_ref) {\n var children = _ref.children;\n return React.createElement(\n LocationContext.Consumer,\n null,\n function (context) {\n return context ? children(context) : React.createElement(\n LocationProvider,\n null,\n children\n );\n }\n );\n};\n\nvar LocationProvider = function (_React$Component) {\n _inherits(LocationProvider, _React$Component);\n\n function LocationProvider() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, LocationProvider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n context: _this.getContext(),\n refs: { unlisten: null }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n LocationProvider.prototype.getContext = function getContext() {\n var _props$history = this.props.history,\n navigate = _props$history.navigate,\n location = _props$history.location;\n\n return { navigate: navigate, location: location };\n };\n\n LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {\n if (isRedirect(error)) {\n var _navigate = this.props.history.navigate;\n\n _navigate(error.uri, { replace: true });\n } else {\n throw error;\n }\n };\n\n LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevState.context.location !== this.state.context.location) {\n this.props.history._onTransitionComplete();\n }\n };\n\n LocationProvider.prototype.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n var refs = this.state.refs,\n history = this.props.history;\n\n history._onTransitionComplete();\n refs.unlisten = history.listen(function () {\n Promise.resolve().then(function () {\n // TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306\n requestAnimationFrame(function () {\n if (!_this2.unmounted) {\n _this2.setState(function () {\n return { context: _this2.getContext() };\n });\n }\n });\n });\n });\n };\n\n LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n var refs = this.state.refs;\n\n this.unmounted = true;\n refs.unlisten();\n };\n\n LocationProvider.prototype.render = function render() {\n var context = this.state.context,\n children = this.props.children;\n\n return React.createElement(\n LocationContext.Provider,\n { value: context },\n typeof children === \"function\" ? children(context) : children || null\n );\n };\n\n return LocationProvider;\n}(React.Component);\n\n////////////////////////////////////////////////////////////////////////////////\n\n\nLocationProvider.defaultProps = {\n history: globalHistory\n};\nprocess.env.NODE_ENV !== \"production\" ? LocationProvider.propTypes = {\n history: PropTypes.object.isRequired\n} : void 0;\nvar ServerLocation = function ServerLocation(_ref2) {\n var url = _ref2.url,\n children = _ref2.children;\n\n var searchIndex = url.indexOf(\"?\");\n var searchExists = searchIndex > -1;\n var pathname = void 0;\n var search = \"\";\n var hash = \"\";\n\n if (searchExists) {\n pathname = url.substring(0, searchIndex);\n search = url.substring(searchIndex);\n } else {\n pathname = url;\n }\n\n return React.createElement(\n LocationContext.Provider,\n {\n value: {\n location: {\n pathname: pathname,\n search: search,\n hash: hash\n },\n navigate: function navigate() {\n throw new Error(\"You can't call navigate on the server.\");\n }\n }\n },\n children\n );\n};\n////////////////////////////////////////////////////////////////////////////////\n// Sets baseuri and basepath for nested routers and links\nvar BaseContext = createNamedContext(\"Base\", { baseuri: \"/\", basepath: \"/\" });\n\n////////////////////////////////////////////////////////////////////////////////\n// The main event, welcome to the show everybody.\nvar Router = function Router(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (baseContext) {\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RouterImpl, _extends({}, baseContext, locationContext, props));\n }\n );\n }\n );\n};\n\nvar RouterImpl = function (_React$PureComponent) {\n _inherits(RouterImpl, _React$PureComponent);\n\n function RouterImpl() {\n _classCallCheck(this, RouterImpl);\n\n return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));\n }\n\n RouterImpl.prototype.render = function render() {\n var _props = this.props,\n location = _props.location,\n _navigate2 = _props.navigate,\n basepath = _props.basepath,\n primary = _props.primary,\n children = _props.children,\n baseuri = _props.baseuri,\n _props$component = _props.component,\n component = _props$component === undefined ? \"div\" : _props$component,\n domProps = _objectWithoutProperties(_props, [\"location\", \"navigate\", \"basepath\", \"primary\", \"children\", \"baseuri\", \"component\"]);\n\n var routes = React.Children.toArray(children).reduce(function (array, child) {\n var routes = createRoute(basepath)(child);\n return array.concat(routes);\n }, []);\n var pathname = location.pathname;\n\n\n var match = pick(routes, pathname);\n\n if (match) {\n var params = match.params,\n uri = match.uri,\n route = match.route,\n element = match.route.value;\n\n // remove the /* from the end for child routes relative paths\n\n basepath = route.default ? basepath : route.path.replace(/\\*$/, \"\");\n\n var props = _extends({}, params, {\n uri: uri,\n location: location,\n navigate: function navigate(to, options) {\n return _navigate2(resolve(to, uri), options);\n }\n });\n\n var clone = React.cloneElement(element, props, element.props.children ? React.createElement(\n Router,\n { location: location, primary: primary },\n element.props.children\n ) : undefined);\n\n // using 'div' for < 16.3 support\n var FocusWrapper = primary ? FocusHandler : component;\n // don't pass any props to 'div'\n var wrapperProps = primary ? _extends({ uri: uri, location: location, component: component }, domProps) : domProps;\n\n return React.createElement(\n BaseContext.Provider,\n { value: { baseuri: uri, basepath: basepath } },\n React.createElement(\n FocusWrapper,\n wrapperProps,\n clone\n )\n );\n } else {\n // Not sure if we want this, would require index routes at every level\n // warning(\n // false,\n // `\\n\\nNothing matched:\\n\\t${\n // location.pathname\n // }\\n\\nPaths checked: \\n\\t${routes\n // .map(route => route.path)\n // .join(\n // \"\\n\\t\"\n // )}\\n\\nTo get rid of this warning, add a default NotFound component as child of Router:\n // \\n\\tlet NotFound = () =>
          Not Found!
          \n // \\n\\t\\n\\t \\n\\t {/* ... */}\\n\\t`\n // );\n return null;\n }\n };\n\n return RouterImpl;\n}(React.PureComponent);\n\nRouterImpl.defaultProps = {\n primary: true\n};\n\n\nvar FocusContext = createNamedContext(\"Focus\");\n\nvar FocusHandler = function FocusHandler(_ref3) {\n var uri = _ref3.uri,\n location = _ref3.location,\n component = _ref3.component,\n domProps = _objectWithoutProperties(_ref3, [\"uri\", \"location\", \"component\"]);\n\n return React.createElement(\n FocusContext.Consumer,\n null,\n function (requestFocus) {\n return React.createElement(FocusHandlerImpl, _extends({}, domProps, {\n component: component,\n requestFocus: requestFocus,\n uri: uri,\n location: location\n }));\n }\n );\n};\n\n// don't focus on initial render\nvar initialRender = true;\nvar focusHandlerCount = 0;\n\nvar FocusHandlerImpl = function (_React$Component2) {\n _inherits(FocusHandlerImpl, _React$Component2);\n\n function FocusHandlerImpl() {\n var _temp2, _this4, _ret2;\n\n _classCallCheck(this, FocusHandlerImpl);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this4 = _possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {\n if (!_this4.state.shouldFocus && node) {\n node.focus();\n }\n }, _temp2), _possibleConstructorReturn(_this4, _ret2);\n }\n\n FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var initial = prevState.uri == null;\n if (initial) {\n return _extends({\n shouldFocus: true\n }, nextProps);\n } else {\n var myURIChanged = nextProps.uri !== prevState.uri;\n var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;\n return _extends({\n shouldFocus: myURIChanged || navigatedUpToMe\n }, nextProps);\n }\n };\n\n FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {\n focusHandlerCount++;\n this.focus();\n };\n\n FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {\n focusHandlerCount--;\n if (focusHandlerCount === 0) {\n initialRender = true;\n }\n };\n\n FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevProps.location !== this.props.location && this.state.shouldFocus) {\n this.focus();\n }\n };\n\n FocusHandlerImpl.prototype.focus = function focus() {\n if (process.env.NODE_ENV === \"test\") {\n // getting cannot read property focus of null in the tests\n // and that bit of global `initialRender` state causes problems\n // should probably figure it out!\n return;\n }\n\n var requestFocus = this.props.requestFocus;\n\n\n if (requestFocus) {\n requestFocus(this.node);\n } else {\n if (initialRender) {\n initialRender = false;\n } else if (this.node) {\n // React polyfills [autofocus] and it fires earlier than cDM,\n // so we were stealing focus away, this line prevents that.\n if (!this.node.contains(document.activeElement)) {\n this.node.focus();\n }\n }\n }\n };\n\n FocusHandlerImpl.prototype.render = function render() {\n var _this5 = this;\n\n var _props2 = this.props,\n children = _props2.children,\n style = _props2.style,\n requestFocus = _props2.requestFocus,\n _props2$component = _props2.component,\n Comp = _props2$component === undefined ? \"div\" : _props2$component,\n uri = _props2.uri,\n location = _props2.location,\n domProps = _objectWithoutProperties(_props2, [\"children\", \"style\", \"requestFocus\", \"component\", \"uri\", \"location\"]);\n\n return React.createElement(\n Comp,\n _extends({\n style: _extends({ outline: \"none\" }, style),\n tabIndex: \"-1\",\n ref: function ref(n) {\n return _this5.node = n;\n }\n }, domProps),\n React.createElement(\n FocusContext.Provider,\n { value: this.requestFocus },\n this.props.children\n )\n );\n };\n\n return FocusHandlerImpl;\n}(React.Component);\n\npolyfill(FocusHandlerImpl);\n\nvar k = function k() {};\n\n////////////////////////////////////////////////////////////////////////////////\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = function forwardRef(C) {\n return C;\n };\n}\n\nvar Link = forwardRef(function (_ref4, ref) {\n var innerRef = _ref4.innerRef,\n props = _objectWithoutProperties(_ref4, [\"innerRef\"]);\n\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref5) {\n var basepath = _ref5.basepath,\n baseuri = _ref5.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref6) {\n var location = _ref6.location,\n navigate = _ref6.navigate;\n\n var to = props.to,\n state = props.state,\n replace = props.replace,\n _props$getProps = props.getProps,\n getProps = _props$getProps === undefined ? k : _props$getProps,\n anchorProps = _objectWithoutProperties(props, [\"to\", \"state\", \"replace\", \"getProps\"]);\n\n var href = resolve(to, baseuri);\n var encodedHref = encodeURI(href);\n var isCurrent = location.pathname === encodedHref;\n var isPartiallyCurrent = startsWith(location.pathname, encodedHref);\n\n return React.createElement(\"a\", _extends({\n ref: ref || innerRef,\n \"aria-current\": isCurrent ? \"page\" : undefined\n }, anchorProps, getProps({ isCurrent: isCurrent, isPartiallyCurrent: isPartiallyCurrent, href: href, location: location }), {\n href: href,\n onClick: function onClick(event) {\n if (anchorProps.onClick) anchorProps.onClick(event);\n if (shouldNavigate(event)) {\n event.preventDefault();\n var shouldReplace = replace;\n if (typeof replace !== \"boolean\" && isCurrent) {\n var _location$state = _extends({}, location.state),\n key = _location$state.key,\n restState = _objectWithoutProperties(_location$state, [\"key\"]);\n\n shouldReplace = shallowCompare(_extends({}, state), restState);\n }\n navigate(href, {\n state: state,\n replace: shouldReplace\n });\n }\n }\n }));\n }\n );\n }\n );\n});\n\nLink.displayName = \"Link\";\n\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nfunction RedirectRequest(uri) {\n this.uri = uri;\n}\n\nvar isRedirect = function isRedirect(o) {\n return o instanceof RedirectRequest;\n};\n\nvar redirectTo = function redirectTo(to) {\n throw new RedirectRequest(to);\n};\n\nvar RedirectImpl = function (_React$Component3) {\n _inherits(RedirectImpl, _React$Component3);\n\n function RedirectImpl() {\n _classCallCheck(this, RedirectImpl);\n\n return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));\n }\n\n // Support React < 16 with this hook\n RedirectImpl.prototype.componentDidMount = function componentDidMount() {\n var _props3 = this.props,\n navigate = _props3.navigate,\n to = _props3.to,\n from = _props3.from,\n _props3$replace = _props3.replace,\n replace = _props3$replace === undefined ? true : _props3$replace,\n state = _props3.state,\n noThrow = _props3.noThrow,\n baseuri = _props3.baseuri,\n props = _objectWithoutProperties(_props3, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n Promise.resolve().then(function () {\n var resolvedTo = resolve(to, baseuri);\n navigate(insertParams(resolvedTo, props), { replace: replace, state: state });\n });\n };\n\n RedirectImpl.prototype.render = function render() {\n var _props4 = this.props,\n navigate = _props4.navigate,\n to = _props4.to,\n from = _props4.from,\n replace = _props4.replace,\n state = _props4.state,\n noThrow = _props4.noThrow,\n baseuri = _props4.baseuri,\n props = _objectWithoutProperties(_props4, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n var resolvedTo = resolve(to, baseuri);\n if (!noThrow) redirectTo(insertParams(resolvedTo, props));\n return null;\n };\n\n return RedirectImpl;\n}(React.Component);\n\nvar Redirect = function Redirect(props) {\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref7) {\n var baseuri = _ref7.baseuri;\n return React.createElement(\n Location,\n null,\n function (locationContext) {\n return React.createElement(RedirectImpl, _extends({}, locationContext, { baseuri: baseuri }, props));\n }\n );\n }\n );\n};\n\nprocess.env.NODE_ENV !== \"production\" ? Redirect.propTypes = {\n from: PropTypes.string,\n to: PropTypes.string.isRequired\n} : void 0;\n\n////////////////////////////////////////////////////////////////////////////////\nvar Match = function Match(_ref8) {\n var path = _ref8.path,\n children = _ref8.children;\n return React.createElement(\n BaseContext.Consumer,\n null,\n function (_ref9) {\n var baseuri = _ref9.baseuri;\n return React.createElement(\n Location,\n null,\n function (_ref10) {\n var navigate = _ref10.navigate,\n location = _ref10.location;\n\n var resolvedPath = resolve(path, baseuri);\n var result = match(resolvedPath, location.pathname);\n return children({\n navigate: navigate,\n location: location,\n match: result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null\n });\n }\n );\n }\n );\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Hooks\n\nvar useLocation = function useLocation() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.location;\n};\n\nvar useNavigate = function useNavigate() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useNavigate hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.navigate;\n};\n\nvar useParams = function useParams() {\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var results = match(context.basepath, location.pathname);\n\n return results ? results.params : null;\n};\n\nvar useMatch = function useMatch(path) {\n if (!path) {\n throw new Error(\"useMatch(path: string) requires an argument of a string to match against\");\n }\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n\n var resolvedPath = resolve(path, context.baseuri);\n var result = match(resolvedPath, location.pathname);\n return result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Junk\nvar stripSlashes = function stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n};\n\nvar createRoute = function createRoute(basepath) {\n return function (element) {\n if (!element) {\n return null;\n }\n\n if (element.type === React.Fragment && element.props.children) {\n return React.Children.map(element.props.children, createRoute(basepath));\n }\n !(element.props.path || element.props.default || element.type === Redirect) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \": Children of must have a `path` or `default` prop, or be a ``. None found on element type `\" + element.type + \"`\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && (!element.props.from || !element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" requires both \\\"from\\\" and \\\"to\\\" props when inside a .\") : invariant(false) : void 0;\n\n !!(element.type === Redirect && !validateRedirect(element.props.from, element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.\") : invariant(false) : void 0;\n\n if (element.props.default) {\n return { value: element, default: true };\n }\n\n var elementPath = element.type === Redirect ? element.props.from : element.props.path;\n\n var path = elementPath === \"/\" ? basepath : stripSlashes(basepath) + \"/\" + stripSlashes(elementPath);\n\n return {\n value: element,\n default: element.props.default,\n path: element.props.children ? stripSlashes(path) + \"/*\" : path\n };\n };\n};\n\nvar shouldNavigate = function shouldNavigate(event) {\n return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n////////////////////////////////////////////////////////////////////////\nexport { Link, Location, LocationProvider, Match, Redirect, Router, ServerLocation, createHistory, createMemorySource, isRedirect, navigate, redirectTo, globalHistory, match as matchPath, useLocation, useNavigate, useParams, useMatch , BaseContext };","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","\"use strict\";\n\nexports.__esModule = true;\nexports.parsePath = parsePath;\n\nfunction parsePath(path) {\n var pathname = path || \"/\";\n var search = \"\";\n var hash = \"\";\n var hashIndex = pathname.indexOf(\"#\");\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf(\"?\");\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === \"?\" ? \"\" : search,\n hash: hash === \"#\" ? \"\" : hash\n };\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const support = function (feature) {\n if (typeof document === `undefined`) {\n return false\n }\n const fakeLink = document.createElement(`link`)\n try {\n if (fakeLink.relList && typeof fakeLink.relList.supports === `function`) {\n return fakeLink.relList.supports(feature)\n }\n } catch (err) {\n return false\n }\n return false\n}\n\nconst linkPrefetchStrategy = function (url, options) {\n return new Promise((resolve, reject) => {\n if (typeof document === `undefined`) {\n reject()\n return\n }\n\n const link = document.createElement(`link`)\n link.setAttribute(`rel`, `prefetch`)\n link.setAttribute(`href`, url)\n\n Object.keys(options).forEach(key => {\n link.setAttribute(key, options[key])\n })\n\n link.onload = resolve\n link.onerror = reject\n\n const parentElement =\n document.getElementsByTagName(`head`)[0] ||\n document.getElementsByName(`script`)[0].parentNode\n parentElement.appendChild(link)\n })\n}\n\nconst xhrPrefetchStrategy = function (url) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(`GET`, url, true)\n\n req.onload = () => {\n if (req.status === 200) {\n resolve()\n } else {\n reject()\n }\n }\n\n req.send(null)\n })\n}\n\nconst supportedPrefetchStrategy = support(`prefetch`)\n ? linkPrefetchStrategy\n : xhrPrefetchStrategy\n\nconst preFetched = {}\n\nconst prefetch = function (url, options) {\n return new Promise(resolve => {\n if (preFetched[url]) {\n resolve()\n return\n }\n\n supportedPrefetchStrategy(url, options)\n .then(() => {\n resolve()\n preFetched[url] = true\n })\n .catch(() => {}) // 404s are logged to the console anyway\n })\n}\n\nexport default prefetch\n","import prefetchHelper from \"./prefetch\"\nimport emitter from \"./emitter\"\nimport { setMatchPaths, findPath, findMatchPath } from \"./find-path\"\n\n/**\n * Available resource loading statuses\n */\nexport const PageResourceStatus = {\n /**\n * At least one of critical resources failed to load\n */\n Error: `error`,\n /**\n * Resources loaded successfully\n */\n Success: `success`,\n}\n\nconst preferDefault = m => (m && m.default) || m\n\nconst stripSurroundingSlashes = s => {\n s = s[0] === `/` ? s.slice(1) : s\n s = s.endsWith(`/`) ? s.slice(0, -1) : s\n return s\n}\n\nconst createPageDataUrl = path => {\n const fixedPath = path === `/` ? `index` : stripSurroundingSlashes(path)\n return `${__PATH_PREFIX__}/page-data/${fixedPath}/page-data.json`\n}\n\nfunction doFetch(url, method = `GET`) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(method, url, true)\n req.onreadystatechange = () => {\n if (req.readyState == 4) {\n resolve(req)\n }\n }\n req.send(null)\n })\n}\n\nconst doesConnectionSupportPrefetch = () => {\n if (\n `connection` in navigator &&\n typeof navigator.connection !== `undefined`\n ) {\n if ((navigator.connection.effectiveType || ``).includes(`2g`)) {\n return false\n }\n if (navigator.connection.saveData) {\n return false\n }\n }\n return true\n}\n\nconst toPageResources = (pageData, component = null) => {\n const page = {\n componentChunkName: pageData.componentChunkName,\n path: pageData.path,\n webpackCompilationHash: pageData.webpackCompilationHash,\n matchPath: pageData.matchPath,\n staticQueryHashes: pageData.staticQueryHashes,\n }\n\n return {\n component,\n json: pageData.result,\n page,\n }\n}\n\nexport class BaseLoader {\n constructor(loadComponent, matchPaths) {\n // Map of pagePath -> Page. Where Page is an object with: {\n // status: PageResourceStatus.Success || PageResourceStatus.Error,\n // payload: PageResources, // undefined if PageResourceStatus.Error\n // }\n // PageResources is {\n // component,\n // json: pageData.result,\n // page: {\n // componentChunkName,\n // path,\n // webpackCompilationHash,\n // staticQueryHashes\n // },\n // staticQueryResults\n // }\n this.pageDb = new Map()\n this.inFlightDb = new Map()\n this.staticQueryDb = {}\n this.pageDataDb = new Map()\n this.prefetchTriggered = new Set()\n this.prefetchCompleted = new Set()\n this.loadComponent = loadComponent\n setMatchPaths(matchPaths)\n }\n\n inFlightNetworkRequests = new Map()\n\n memoizedGet(url) {\n let inFlightPromise = this.inFlightNetworkRequests.get(url)\n\n if (!inFlightPromise) {\n inFlightPromise = doFetch(url, `GET`)\n this.inFlightNetworkRequests.set(url, inFlightPromise)\n }\n\n // Prefer duplication with then + catch over .finally to prevent problems in ie11 + firefox\n return inFlightPromise\n .then(response => {\n this.inFlightNetworkRequests.delete(url)\n return response\n })\n .catch(err => {\n this.inFlightNetworkRequests.delete(url)\n throw err\n })\n }\n\n setApiRunner(apiRunner) {\n this.apiRunner = apiRunner\n this.prefetchDisabled = apiRunner(`disableCorePrefetching`).some(a => a)\n }\n\n fetchPageDataJson(loadObj) {\n const { pagePath, retries = 0 } = loadObj\n const url = createPageDataUrl(pagePath)\n return this.memoizedGet(url).then(req => {\n const { status, responseText } = req\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.path === undefined) {\n throw new Error(`not a valid pageData response`)\n }\n\n return Object.assign(loadObj, {\n status: PageResourceStatus.Success,\n payload: jsonPayload,\n })\n } catch (err) {\n // continue regardless of error\n }\n }\n\n // Handle 404\n if (status === 404 || status === 200) {\n // If the request was for a 404 page and it doesn't exist, we're done\n if (pagePath === `/404.html`) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Need some code here to cache the 404 request. In case\n // multiple loadPageDataJsons result in 404s\n return this.fetchPageDataJson(\n Object.assign(loadObj, { pagePath: `/404.html`, notFound: true })\n )\n }\n\n // handle 500 response (Unrecoverable)\n if (status === 500) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Handle everything else, including status === 0, and 503s. Should retry\n if (retries < 3) {\n return this.fetchPageDataJson(\n Object.assign(loadObj, { retries: retries + 1 })\n )\n }\n\n // Retried 3 times already, result is an error.\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n })\n }\n\n loadPageDataJson(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDataDb.has(pagePath)) {\n const pageData = this.pageDataDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !pageData.stale) {\n return Promise.resolve(pageData)\n }\n }\n\n return this.fetchPageDataJson({ pagePath }).then(pageData => {\n this.pageDataDb.set(pagePath, pageData)\n\n return pageData\n })\n }\n\n findMatchPath(rawPath) {\n return findMatchPath(rawPath)\n }\n\n // TODO check all uses of this and whether they use undefined for page resources not exist\n loadPage(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const page = this.pageDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !page.payload.stale) {\n return Promise.resolve(page.payload)\n }\n }\n\n if (this.inFlightDb.has(pagePath)) {\n return this.inFlightDb.get(pagePath)\n }\n\n const inFlightPromise = Promise.all([\n this.loadAppData(),\n this.loadPageDataJson(pagePath),\n ]).then(allData => {\n const result = allData[1]\n if (result.status === PageResourceStatus.Error) {\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n let pageData = result.payload\n const { componentChunkName, staticQueryHashes = [] } = pageData\n\n const finalResult = {}\n\n const componentChunkPromise = this.loadComponent(componentChunkName).then(\n component => {\n finalResult.createdAt = new Date()\n let pageResources\n if (!component) {\n finalResult.status = PageResourceStatus.Error\n } else {\n finalResult.status = PageResourceStatus.Success\n if (result.notFound === true) {\n finalResult.notFound = true\n }\n pageData = Object.assign(pageData, {\n webpackCompilationHash: allData[0]\n ? allData[0].webpackCompilationHash\n : ``,\n })\n pageResources = toPageResources(pageData, component)\n }\n // undefined if final result is an error\n return pageResources\n }\n )\n\n const staticQueryBatchPromise = Promise.all(\n staticQueryHashes.map(staticQueryHash => {\n // Check for cache in case this static query result has already been loaded\n if (this.staticQueryDb[staticQueryHash]) {\n const jsonPayload = this.staticQueryDb[staticQueryHash]\n return { staticQueryHash, jsonPayload }\n }\n\n return this.memoizedGet(\n `${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json`\n ).then(req => {\n const jsonPayload = JSON.parse(req.responseText)\n return { staticQueryHash, jsonPayload }\n })\n })\n ).then(staticQueryResults => {\n const staticQueryResultsMap = {}\n\n staticQueryResults.forEach(({ staticQueryHash, jsonPayload }) => {\n staticQueryResultsMap[staticQueryHash] = jsonPayload\n this.staticQueryDb[staticQueryHash] = jsonPayload\n })\n\n return staticQueryResultsMap\n })\n\n return Promise.all([componentChunkPromise, staticQueryBatchPromise]).then(\n ([pageResources, staticQueryResults]) => {\n let payload\n if (pageResources) {\n payload = { ...pageResources, staticQueryResults }\n finalResult.payload = payload\n emitter.emit(`onPostLoadPageResources`, {\n page: payload,\n pageResources: payload,\n })\n }\n\n this.pageDb.set(pagePath, finalResult)\n\n return payload\n }\n )\n })\n\n inFlightPromise\n .then(response => {\n this.inFlightDb.delete(pagePath)\n })\n .catch(error => {\n this.inFlightDb.delete(pagePath)\n throw error\n })\n\n this.inFlightDb.set(pagePath, inFlightPromise)\n\n return inFlightPromise\n }\n\n // returns undefined if loading page ran into errors\n loadPageSync(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const pageData = this.pageDb.get(pagePath).payload\n return pageData\n }\n return undefined\n }\n\n shouldPrefetch(pagePath) {\n // Skip prefetching if we know user is on slow or constrained connection\n if (!doesConnectionSupportPrefetch()) {\n return false\n }\n\n // Check if the page exists.\n if (this.pageDb.has(pagePath)) {\n return false\n }\n\n return true\n }\n\n prefetch(pagePath) {\n if (!this.shouldPrefetch(pagePath)) {\n return false\n }\n\n // Tell plugins with custom prefetching logic that they should start\n // prefetching this path.\n if (!this.prefetchTriggered.has(pagePath)) {\n this.apiRunner(`onPrefetchPathname`, { pathname: pagePath })\n this.prefetchTriggered.add(pagePath)\n }\n\n // If a plugin has disabled core prefetching, stop now.\n if (this.prefetchDisabled) {\n return false\n }\n\n const realPath = findPath(pagePath)\n // Todo make doPrefetch logic cacheable\n // eslint-disable-next-line consistent-return\n this.doPrefetch(realPath).then(() => {\n if (!this.prefetchCompleted.has(pagePath)) {\n this.apiRunner(`onPostPrefetchPathname`, { pathname: pagePath })\n this.prefetchCompleted.add(pagePath)\n }\n })\n\n return true\n }\n\n doPrefetch(pagePath) {\n const pageDataUrl = createPageDataUrl(pagePath)\n return prefetchHelper(pageDataUrl, {\n crossOrigin: `anonymous`,\n as: `fetch`,\n }).then(() =>\n // This was just prefetched, so will return a response from\n // the cache instead of making another request to the server\n this.loadPageDataJson(pagePath)\n )\n }\n\n hovering(rawPath) {\n this.loadPage(rawPath)\n }\n\n getResourceURLsForPathname(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDataDb.get(pagePath)\n if (page) {\n const pageResources = toPageResources(page.payload)\n\n return [\n ...createComponentUrls(pageResources.page.componentChunkName),\n createPageDataUrl(pagePath),\n ]\n } else {\n return null\n }\n }\n\n isPageNotFound(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDb.get(pagePath)\n return !page || page.notFound\n }\n\n loadAppData(retries = 0) {\n return this.memoizedGet(`${__PATH_PREFIX__}/page-data/app-data.json`).then(\n req => {\n const { status, responseText } = req\n\n let appData\n\n if (status !== 200 && retries < 3) {\n // Retry 3 times incase of non-200 responses\n return this.loadAppData(retries + 1)\n }\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.webpackCompilationHash === undefined) {\n throw new Error(`not a valid app-data response`)\n }\n\n appData = jsonPayload\n } catch (err) {\n // continue regardless of error\n }\n }\n\n return appData\n }\n )\n }\n}\n\nconst createComponentUrls = componentChunkName =>\n (window.___chunkMapping[componentChunkName] || []).map(\n chunk => __PATH_PREFIX__ + chunk\n )\n\nexport class ProdLoader extends BaseLoader {\n constructor(asyncRequires, matchPaths) {\n const loadComponent = chunkName =>\n asyncRequires.components[chunkName]\n ? asyncRequires.components[chunkName]()\n .then(preferDefault)\n // loader will handle the case when component is null\n .catch(() => null)\n : Promise.resolve()\n\n super(loadComponent, matchPaths)\n }\n\n doPrefetch(pagePath) {\n return super.doPrefetch(pagePath).then(result => {\n if (result.status !== PageResourceStatus.Success) {\n return Promise.resolve()\n }\n const pageData = result.payload\n const chunkName = pageData.componentChunkName\n const componentUrls = createComponentUrls(chunkName)\n return Promise.all(componentUrls.map(prefetchHelper)).then(() => pageData)\n })\n }\n\n loadPageDataJson(rawPath) {\n return super.loadPageDataJson(rawPath).then(data => {\n if (data.notFound) {\n // check if html file exist using HEAD request:\n // if it does we should navigate to it instead of showing 404\n return doFetch(rawPath, `HEAD`).then(req => {\n if (req.status === 200) {\n // page (.html file) actually exist (or we asked for 404 )\n // returning page resources status as errored to trigger\n // regular browser navigation to given page\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n // if HEAD request wasn't 200, return notFound result\n // and show 404 page\n return data\n })\n }\n return data\n })\n }\n}\n\nlet instance\n\nexport const setLoader = _loader => {\n instance = _loader\n}\n\nexport const publicLoader = {\n // Deprecated methods. As far as we're aware, these are only used by\n // core gatsby and the offline plugin, however there's a very small\n // chance they're called by others.\n getResourcesForPathname: rawPath => {\n console.warn(\n `Warning: getResourcesForPathname is deprecated. Use loadPage instead`\n )\n return instance.i.loadPage(rawPath)\n },\n getResourcesForPathnameSync: rawPath => {\n console.warn(\n `Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead`\n )\n return instance.i.loadPageSync(rawPath)\n },\n enqueue: rawPath => instance.prefetch(rawPath),\n\n // Real methods\n getResourceURLsForPathname: rawPath =>\n instance.getResourceURLsForPathname(rawPath),\n loadPage: rawPath => instance.loadPage(rawPath),\n loadPageSync: rawPath => instance.loadPageSync(rawPath),\n prefetch: rawPath => instance.prefetch(rawPath),\n isPageNotFound: rawPath => instance.isPageNotFound(rawPath),\n hovering: rawPath => instance.hovering(rawPath),\n loadAppData: () => instance.loadAppData(),\n}\n\nexport default publicLoader\n\nexport function getStaticQueryResults() {\n if (instance) {\n return instance.staticQueryDb\n } else {\n return {}\n }\n}\n","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollContainer = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _router = require(\"@reach/router\");\n\n// TODO: In Gatsby v3, this file should be removed.\n// We are deprecating this in V2 in favor of useScrollRestoration\nvar propTypes = {\n scrollKey: _propTypes.default.string.isRequired,\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired\n};\nvar hasNotWarnedDeprecation = true;\n\nvar ScrollContainerImplementation = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollContainerImplementation, _React$Component);\n\n function ScrollContainerImplementation(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n\n if (process.env.NODE_ENV !== \"production\" && hasNotWarnedDeprecation) {\n hasNotWarnedDeprecation = false;\n console.log(\"Deprecation Warning:\\n\\n Gatsby is deprecated in Gatsby v2 and will be removed in Gatsby v3.\\n Update to the React hook alternative useScrollRestoration, like this:.\\n \\n ```\\n import React from 'react';\\n import { useScrollRestoration } from 'gatsby-react-router-scroll';\\n\\n function Component() {\\n const scrollRestoration = useScrollRestoration('\" + _this.props.scrollKey + \"');\\n\\n return
            ;\\n }\\n ```\\n \");\n }\n\n return _this;\n }\n\n var _proto = ScrollContainerImplementation.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n // eslint-disable-next-line react/no-find-dom-node\n var node = _reactDom.default.findDOMNode(this);\n\n var _this$props = this.props,\n location = _this$props.location,\n scrollKey = _this$props.scrollKey;\n if (!node) return;\n node.addEventListener(\"scroll\", function () {\n _this2.props.context.save(location, scrollKey, node.scrollTop);\n });\n var position = this.props.context.read(location, scrollKey);\n node.scrollTo(0, position || 0);\n };\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return ScrollContainerImplementation;\n}(React.Component);\n\nvar ScrollContainer = function ScrollContainer(props) {\n return /*#__PURE__*/React.createElement(_router.Location, null, function (_ref) {\n var location = _ref.location;\n return /*#__PURE__*/React.createElement(_scrollHandler.ScrollContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(ScrollContainerImplementation, (0, _extends2.default)({}, props, {\n context: context,\n location: location\n }));\n });\n });\n};\n\nexports.ScrollContainer = ScrollContainer;\nScrollContainer.propTypes = propTypes;","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _gatsby = require(\"gatsby\");\n\nvar _getManifestPathname = _interopRequireDefault(require(\"./get-manifest-pathname\"));\n\n/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\n// when we don't have localisation in our manifest, we tree shake everything away\nif (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n exports.onRouteUpdate = function (_ref, pluginOptions) {\n var location = _ref.location;\n var localize = pluginOptions.localize;\n var manifestFilename = (0, _getManifestPathname.default)(location.pathname, localize);\n var manifestEl = document.head.querySelector(\"link[rel=\\\"manifest\\\"]\");\n\n if (manifestEl) {\n manifestEl.setAttribute(\"href\", (0, _gatsby.withPrefix)(manifestFilename));\n }\n };\n}","/*\n Why commonjs and not ES imports/exports?\n\n This module is used to alias `create-react-context` package, but drop the the actual implementation part\n because Gatsby requires version of react that has implementatoin baked in.\n \n Package source is using ES modules:\n - https://github.com/jamiebuilds/create-react-context/blob/v0.3.0/src/index.js\n \n But to build this package `babel-plugin-add-module-exports` is used ( https://www.npmjs.com/package/babel-plugin-add-module-exports).\n Which result in both `module.exports` and `exports.default` being set to same thing.\n\n We don't use that babel plugin so we only have `exports.default`.\n\n This cause problems in various 3rd party react components that rely on `module.exports` being set.\n See https://github.com/gatsbyjs/gatsby/issues/23645 for example of it.\n \n Instead of adding same babel plugin we mimic output here. Adding babel plugin just for this would:\n a) unnecesairly slow down compilation for all other files (if we just apply it everywhere)\n b) or complicate babel-loader configuration with overwrite specifically for this file\n*/\n\nconst { createContext } = require(`react`)\n\nmodule.exports = createContext\nmodule.exports.default = createContext\n","\"use strict\";\n\nexports.DEFAULT_OPTIONS = {\n maxWidth: 650,\n wrapperStyle: \"\",\n backgroundColor: \"white\",\n linkImagesToOriginal: true,\n showCaptions: false,\n markdownCaptions: false,\n withWebp: false,\n withAvif: false,\n tracedSVG: false,\n loading: \"lazy\",\n disableBgImageOnAlpha: false,\n disableBgImage: false\n};\nexports.EMPTY_ALT = \"GATSBY_EMPTY_ALT\";\nexports.imageClass = \"gatsby-resp-image-image\";\nexports.imageWrapperClass = \"gatsby-resp-image-wrapper\";\nexports.imageBackgroundClass = \"gatsby-resp-image-background-image\";","function _extends() {\n module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _extends.apply(this, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n\nexports.__esModule = true;\nexports.onRouteUpdate = void 0;\n\nvar onRouteUpdate = function onRouteUpdate(_ref, pluginOptions) {\n var location = _ref.location;\n\n if (pluginOptions === void 0) {\n pluginOptions = {};\n }\n\n if (process.env.NODE_ENV !== \"production\" || typeof ga !== \"function\") {\n return null;\n }\n\n var pathIsExcluded = location && typeof window.excludeGAPaths !== \"undefined\" && window.excludeGAPaths.some(function (rx) {\n return rx.test(location.pathname);\n });\n if (pathIsExcluded) return null; // wrap inside a timeout to make sure react-helmet is done with it's changes (https://github.com/gatsbyjs/gatsby/issues/9139)\n // reactHelmet is using requestAnimationFrame: https://github.com/nfl/react-helmet/blob/5.2.0/src/HelmetUtils.js#L296-L299\n\n var sendPageView = function sendPageView() {\n var pagePath = location ? location.pathname + location.search + location.hash : undefined;\n window.ga(\"set\", \"page\", pagePath);\n window.ga(\"send\", \"pageview\");\n }; // Minimum delay for reactHelmet's requestAnimationFrame\n\n\n var delay = Math.max(32, pluginOptions.pageTransitionDelay || 0);\n setTimeout(sendPageView, delay);\n return null;\n};\n\nexports.onRouteUpdate = onRouteUpdate;","\"use strict\";\n\nvar _require = require(\"./constants\"),\n DEFAULT_OPTIONS = _require.DEFAULT_OPTIONS,\n imageClass = _require.imageClass,\n imageBackgroundClass = _require.imageBackgroundClass,\n imageWrapperClass = _require.imageWrapperClass;\n\nexports.onRouteUpdate = function (apiCallbackContext, pluginOptions) {\n var options = Object.assign({}, DEFAULT_OPTIONS, pluginOptions);\n var imageWrappers = document.querySelectorAll(\".\" + imageWrapperClass); // https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/\n // for cross-browser looping through NodeList without polyfills\n\n var _loop = function _loop(i) {\n var imageWrapper = imageWrappers[i];\n var backgroundElement = imageWrapper.querySelector(\".\" + imageBackgroundClass);\n var imageElement = imageWrapper.querySelector(\".\" + imageClass);\n\n var onImageLoad = function onImageLoad() {\n backgroundElement.style.transition = \"opacity 0.5s 0.5s\";\n imageElement.style.transition = \"opacity 0.5s\";\n onImageComplete();\n };\n\n var onImageComplete = function onImageComplete() {\n backgroundElement.style.opacity = 0;\n imageElement.style.opacity = 1;\n imageElement.style.color = \"inherit\";\n imageElement.style.boxShadow = \"inset 0px 0px 0px 400px \" + options.backgroundColor;\n imageElement.removeEventListener(\"load\", onImageLoad);\n imageElement.removeEventListener(\"error\", onImageComplete);\n };\n\n imageElement.style.opacity = 0;\n imageElement.addEventListener(\"load\", onImageLoad);\n imageElement.addEventListener(\"error\", onImageComplete);\n\n if (imageElement.complete) {\n onImageComplete();\n }\n };\n\n for (var i = 0; i < imageWrappers.length; i++) {\n _loop(i);\n }\n};","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","const plugins = require(`./api-runner-browser-plugins`)\nconst {\n getResourcesForPathname,\n getResourcesForPathnameSync,\n getResourceURLsForPathname,\n loadPage,\n loadPageSync,\n} = require(`./loader`).publicLoader\n\nexports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {\n // Hooks for gatsby-cypress's API handler\n if (process.env.CYPRESS_SUPPORT) {\n if (window.___apiHandler) {\n window.___apiHandler(api)\n } else if (window.___resolvedAPIs) {\n window.___resolvedAPIs.push(api)\n } else {\n window.___resolvedAPIs = [api]\n }\n }\n\n let results = plugins.map(plugin => {\n if (!plugin.plugin[api]) {\n return undefined\n }\n\n // Deprecated April 2019. Use `loadPageSync` instead\n args.getResourcesForPathnameSync = getResourcesForPathnameSync\n // Deprecated April 2019. Use `loadPage` instead\n args.getResourcesForPathname = getResourcesForPathname\n args.getResourceURLsForPathname = getResourceURLsForPathname\n args.loadPage = loadPage\n args.loadPageSync = loadPageSync\n\n const result = plugin.plugin[api](args, plugin.options)\n if (result && argTransform) {\n args = argTransform({ args, result, plugin })\n }\n return result\n })\n\n // Filter out undefined results.\n results = results.filter(result => typeof result !== `undefined`)\n\n if (results.length > 0) {\n return results\n } else if (defaultReturn) {\n return [defaultReturn]\n } else {\n return []\n }\n}\n\nexports.apiRunnerAsync = (api, args, defaultReturn) =>\n plugins.reduce(\n (previous, next) =>\n next.plugin[api]\n ? previous.then(() => next.plugin[api](args, next.options))\n : previous,\n Promise.resolve()\n )\n"],"sourceRoot":""} \ No newline at end of file diff --git a/app-bf2df6aaa6a77caf090e.js b/app-bf2df6aaa6a77caf090e.js deleted file mode 100644 index 29b1070..0000000 --- a/app-bf2df6aaa6a77caf090e.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see app-bf2df6aaa6a77caf090e.js.LICENSE.txt */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+ZDr":function(t,e,n){"use strict";var r=n("TqRt");e.__esModule=!0,e.withPrefix=h,e.withAssetPrefix=function(t){return h(t,m())},e.navigateTo=e.replace=e.push=e.navigate=e.default=void 0;var o=r(n("8OQS")),a=r(n("PJYZ")),i=r(n("VbXa")),s=r(n("pVnL")),c=r(n("17x9")),u=r(n("q1tI")),l=n("YwZP"),p=n("LYrO"),d=n("cu4x");e.parsePath=d.parsePath;var f=function(t){return null==t?void 0:t.startsWith("/")};function h(t,e){var n,r;if(void 0===e&&(e=v()),!g(t))return t;if(t.startsWith("./")||t.startsWith("../"))return t;var o=null!==(n=null!==(r=e)&&void 0!==r?r:m())&&void 0!==n?n:"/";return""+((null==o?void 0:o.endsWith("/"))?o.slice(0,-1):o)+(t.startsWith("/")?t:"/"+t)}var m=function(){return""},v=function(){return""},g=function(t){return t&&!t.startsWith("http://")&&!t.startsWith("https://")&&!t.startsWith("//")};var y=function(t,e){return"number"==typeof t?t:g(t)?f(t)?h(t):function(t,e){return f(t)?t:(0,p.resolve)(t,e)}(t,e):t},w={activeClassName:c.default.string,activeStyle:c.default.object,partiallyActive:c.default.bool};function b(t){return u.default.createElement(l.Location,null,(function(e){var n=e.location;return u.default.createElement(P,(0,s.default)({},t,{_location:n}))}))}var P=function(t){function e(e){var n;(n=t.call(this,e)||this).defaultGetProps=function(t){var e=t.isPartiallyCurrent,r=t.isCurrent;return(n.props.partiallyActive?e:r)?{className:[n.props.className,n.props.activeClassName].filter(Boolean).join(" "),style:(0,s.default)({},n.props.style,n.props.activeStyle)}:null};var r=!1;return"undefined"!=typeof window&&window.IntersectionObserver&&(r=!0),n.state={IOSupported:r},n.handleRef=n.handleRef.bind((0,a.default)(n)),n}(0,i.default)(e,t);var n=e.prototype;return n._prefetch=function(){var t=window.location.pathname;this.props._location&&this.props._location.pathname&&(t=this.props._location.pathname);var e=y(this.props.to,t),n=(0,d.parsePath)(e).pathname;t!==n&&___loader.enqueue(n)},n.componentDidUpdate=function(t,e){this.props.to===t.to||this.state.IOSupported||this._prefetch()},n.componentDidMount=function(){this.state.IOSupported||this._prefetch()},n.componentWillUnmount=function(){if(this.io){var t=this.io,e=t.instance,n=t.el;e.unobserve(n),e.disconnect()}},n.handleRef=function(t){var e,n,r,o=this;this.props.innerRef&&this.props.innerRef.hasOwnProperty("current")?this.props.innerRef.current=t:this.props.innerRef&&this.props.innerRef(t),this.state.IOSupported&&t&&(this.io=(e=t,n=function(){o._prefetch()},(r=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(r.unobserve(e),r.disconnect(),n())}))}))).observe(e),{instance:r,el:e}))},n.render=function(){var t=this,e=this.props,n=e.to,r=e.getProps,a=void 0===r?this.defaultGetProps:r,i=e.onClick,c=e.onMouseEnter,p=(e.activeClassName,e.activeStyle,e.innerRef,e.partiallyActive,e.state),f=e.replace,h=e._location,m=(0,o.default)(e,["to","getProps","onClick","onMouseEnter","activeClassName","activeStyle","innerRef","partiallyActive","state","replace","_location"]);var v=y(n,h.pathname);return g(v)?u.default.createElement(l.Link,(0,s.default)({to:v,state:p,getProps:a,innerRef:this.handleRef,onMouseEnter:function(t){c&&c(t),___loader.hovering((0,d.parsePath)(v).pathname)},onClick:function(e){if(i&&i(e),!(0!==e.button||t.props.target||e.defaultPrevented||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault();var n=f,r=encodeURI(v)===h.pathname;"boolean"!=typeof f&&r&&(n=!0),window.___navigate(v,{state:p,replace:n})}return!0}},m)):u.default.createElement("a",(0,s.default)({href:v},m))},e}(u.default.Component);P.propTypes=(0,s.default)({},w,{onClick:c.default.func,to:c.default.string.isRequired,replace:c.default.bool,state:c.default.object});var R=function(t,e,n){return console.warn('The "'+t+'" method is now deprecated and will be removed in Gatsby v'+n+'. Please use "'+e+'" instead.')},_=u.default.forwardRef((function(t,e){return u.default.createElement(b,(0,s.default)({innerRef:e},t))}));e.default=_;e.navigate=function(t,e){window.___navigate(y(t,window.location.pathname),e)};var O=function(t){R("push","navigate",3),window.___push(y(t,window.location.pathname))};e.push=O;e.replace=function(t){R("replace","navigate",3),window.___replace(y(t,window.location.pathname))};e.navigateTo=function(t){return R("navigateTo","navigate",3),O(t)}},"/hTd":function(t,e,n){"use strict";e.__esModule=!0,e.SessionStorage=void 0;var r=function(){function t(){}var e=t.prototype;return e.read=function(t,e){var n=this.getStateKey(t,e);try{var r=window.sessionStorage.getItem(n);return r?JSON.parse(r):0}catch(o){return window&&window.___GATSBY_REACT_ROUTER_SCROLL&&window.___GATSBY_REACT_ROUTER_SCROLL[n]?window.___GATSBY_REACT_ROUTER_SCROLL[n]:0}},e.save=function(t,e,n){var r=this.getStateKey(t,e),o=JSON.stringify(n);try{window.sessionStorage.setItem(r,o)}catch(a){window&&window.___GATSBY_REACT_ROUTER_SCROLL||(window.___GATSBY_REACT_ROUTER_SCROLL={}),window.___GATSBY_REACT_ROUTER_SCROLL[r]=JSON.parse(o)}},e.getStateKey=function(t,e){var n="@@scroll|"+t.pathname;return null==e?n:n+"|"+e},t}();e.SessionStorage=r},"284h":function(t,e,n){var r=n("cDf5").default;function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(o=function(t){return t?n:e})(t)}t.exports=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!=typeof t)return{default:t};var n=o(e);if(n&&n.has(t))return n.get(t);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var c=i?Object.getOwnPropertyDescriptor(t,s):null;c&&(c.get||c.set)?Object.defineProperty(a,s,c):a[s]=t[s]}return a.default=t,n&&n.set(t,a),a},t.exports.__esModule=!0,t.exports.default=t.exports},"30RF":function(t,e,n){"use strict";n.d(e,"d",(function(){return l})),n.d(e,"a",(function(){return p})),n.d(e,"c",(function(){return d})),n.d(e,"b",(function(){return f}));var r=n("LYrO"),o=n("cSJ8"),a=t=>void 0===t?t:"/"===t?"/":"/"===t.charAt(t.length-1)?t.slice(0,-1):t;const i=new Map;let s=[];const c=t=>{const e=decodeURIComponent(t);return Object(o.a)(e,"").split("#")[0].split("?")[0]};function u(t){return t.startsWith("/")||t.startsWith("https://")||t.startsWith("http://")?t:new URL(t,window.location.href+(window.location.href.endsWith("/")?"":"/")).pathname}const l=t=>{s=t},p=t=>{const e=h(t),n=s.map(t=>{let{path:e,matchPath:n}=t;return{path:n,originalPath:e}}),o=Object(r.pick)(n,e);return o?a(o.route.originalPath):null},d=t=>{const e=h(t),n=s.map(t=>{let{path:e,matchPath:n}=t;return{path:n,originalPath:e}}),o=Object(r.pick)(n,e);return o?o.params:{}},f=t=>{const e=c(u(t));if(i.has(e))return i.get(e);let n=p(e);return n||(n=h(t)),i.set(e,n),n},h=t=>{let e=c(u(t));return"/index.html"===e&&(e="/"),e=a(e),e}},"3uz+":function(t,e,n){"use strict";e.__esModule=!0,e.useScrollRestoration=function(t){var e=(0,a.useLocation)(),n=(0,o.useContext)(r.ScrollContext),i=(0,o.useRef)();return(0,o.useLayoutEffect)((function(){if(i.current){var r=n.read(e,t);i.current.scrollTo(0,r||0)}}),[]),{ref:i,onScroll:function(){i.current&&n.save(e,t,i.current.scrollTop)}}};var r=n("Enzk"),o=n("q1tI"),a=n("YwZP")},"5yr3":function(t,e,n){"use strict";const r=function(t){return t=t||Object.create(null),{on:function(e,n){(t[e]||(t[e]=[])).push(n)},off:function(e,n){t[e]&&t[e].splice(t[e].indexOf(n)>>>0,1)},emit:function(e,n){(t[e]||[]).slice().map((function(t){t(n)})),(t["*"]||[]).slice().map((function(t){t(e,n)}))}}}();e.a=r},"7hJ6":function(t,e,n){"use strict";e.__esModule=!0,e.useScrollRestoration=e.ScrollContainer=e.ScrollContext=void 0;var r=n("Enzk");e.ScrollContext=r.ScrollHandler;var o=n("hd9s");e.ScrollContainer=o.ScrollContainer;var a=n("3uz+");e.useScrollRestoration=a.useScrollRestoration},"8OQS":function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r=0||(o[n]=t[n]);return o},t.exports.__esModule=!0,t.exports.default=t.exports},"94VI":function(t,e){e.polyfill=t=>t},"9Xx/":function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i}));var r=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},u=c.state,l=c.replace,p=void 0!==l&&l;if("number"==typeof e)t.history.go(e);else{u=r({},u,{key:Date.now()+""});try{i||p?t.history.replaceState(u,null,e):t.history.pushState(u,null,e)}catch(f){t.location[p?"replace":"assign"](e)}}a=o(t),i=!0;var d=new Promise((function(t){return s=t}));return n.forEach((function(t){return t({location:a,action:"PUSH"})})),d}}},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=t.indexOf("?"),n={pathname:e>-1?t.substr(0,e):t,search:e>-1?t.substr(e):""},r=0,o=[n],a=[null];return{get location(){return o[r]},addEventListener:function(t,e){},removeEventListener:function(t,e){},history:{get entries(){return o},get index(){return r},get state(){return a[r]},pushState:function(t,e,n){var i=n.split("?"),s=i[0],c=i[1],u=void 0===c?"":c;r++,o.push({pathname:s,search:u.length?"?"+u:u}),a.push(t)},replaceState:function(t,e,n){var i=n.split("?"),s=i[0],c=i[1],u=void 0===c?"":c;o[r]={pathname:s,search:u},a[r]=t},go:function(t){var e=r+t;e<0||e>a.length-1||(r=e)}}}},s=!("undefined"==typeof window||!window.document||!window.document.createElement),c=a(s?window:i()),u=c.navigate},"9hXx":function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;e.default=function(t,e){if(!Array.isArray(e))return"manifest.webmanifest";var n=e.find((function(e){return t.startsWith(e.start_url)}));return n?"manifest_"+n.lang+".webmanifest":"manifest.webmanifest"}},Enzk:function(t,e,n){"use strict";var r=n("284h"),o=n("TqRt");e.__esModule=!0,e.ScrollHandler=e.ScrollContext=void 0;var a=o(n("PJYZ")),i=o(n("VbXa")),s=r(n("q1tI")),c=o(n("17x9")),u=n("/hTd"),l=s.createContext(new u.SessionStorage);e.ScrollContext=l,l.displayName="GatsbyScrollContext";var p=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o{let{result:n}=e;return{element:n,props:t}}).pop()},e}(a.a.Component);e.a=u},JeVI:function(t){t.exports=JSON.parse("[]")},KQm4:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.score?-1:t.index-e.index}))},v=function(t){return t.replace(/(^\/+|\/+$)/g,"").split("/")},g=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r0})))&&n.length>0?"?"+n.join("&"):"")},y=["uri","path"],w=function(t,e){var n=Object.keys(t);return n.length===Object.keys(e).length&&n.every((function(n){return e.hasOwnProperty(n)&&t[n]===e[n]}))}},LeKB:function(t,e,n){t.exports=[{plugin:n("q9nr"),options:{plugins:[],maxWidth:590,linkImagesToOriginal:!0,showCaptions:!1,markdownCaptions:!1,sizeByPixelDensity:!1,backgroundColor:"white",quality:50,withWebp:!1,tracedSVG:!1,loading:"lazy",disableBgImageOnAlpha:!1,disableBgImage:!1}},{plugin:n("pWkz"),options:{plugins:[],head:!1,anonymize:!1,respectDNT:!1,exclude:[],pageTransitionDelay:0}},{plugin:n("npZl"),options:{plugins:[],name:"SmartBlock",short_name:"SmartBlock",start_url:"/",background_color:"#ffffff",theme_color:"#663399",display:"minimal-ui",icon:"static/favicon.png",legacy:!0,theme_color_in_head:!0,cache_busting_mode:"query",crossOrigin:"anonymous",include_favicon:!0,cacheDigest:"084321a740e799687cc736487af34310"}},{plugin:n("GddB"),options:{plugins:[]}}]},MMVs:function(t,e,n){t.exports=function(){var t=!1;-1!==navigator.appVersion.indexOf("MSIE 10")&&(t=!0);var e,n=[],r="object"==typeof document&&document,o=t?r.documentElement.doScroll("left"):r.documentElement.doScroll,a=r&&(o?/^loaded|^c/:/^loaded|^i|^c/).test(r.readyState);return!a&&r&&r.addEventListener("DOMContentLoaded",e=function(){for(r.removeEventListener("DOMContentLoaded",e),a=1;e=n.shift();)e()}),function(t){a?setTimeout(t,0):n.push(t)}}()},NSX3:function(t,e,n){"use strict";n.r(e);var r=n("xtsi");"https:"!==window.location.protocol&&"localhost"!==window.location.hostname?console.error("Service workers can only be used over HTTPS, or on localhost for development"):"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then((function(t){t.addEventListener("updatefound",()=>{Object(r.apiRunner)("onServiceWorkerUpdateFound",{serviceWorker:t});const e=t.installing;console.log("installingWorker",e),e.addEventListener("statechange",()=>{switch(e.state){case"installed":navigator.serviceWorker.controller?(window.___swUpdated=!0,Object(r.apiRunner)("onServiceWorkerUpdateReady",{serviceWorker:t}),window.___failedResources&&(console.log("resources failed, SW updated - reloading"),window.location.reload())):(console.log("Content is now available offline!"),Object(r.apiRunner)("onServiceWorkerInstalled",{serviceWorker:t}));break;case"redundant":console.error("The installing service worker became redundant."),Object(r.apiRunner)("onServiceWorkerRedundant",{serviceWorker:t});break;case"activated":Object(r.apiRunner)("onServiceWorkerActive",{serviceWorker:t})}})})})).catch((function(t){console.error("Error during service worker registration:",t)}))},NsGk:function(t,e,n){e.components={"component---src-pages-404-js":()=>Promise.all([n.e(0),n.e(3)]).then(n.bind(null,"w2l6")),"component---src-pages-index-js":()=>Promise.all([n.e(9),n.e(6),n.e(0),n.e(4)]).then(n.bind(null,"RXBc")),"component---src-templates-blog-post-js":()=>Promise.all([n.e(0),n.e(5)]).then(n.bind(null,"yZlL"))}},PJYZ:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},QLaP:function(t,e,n){"use strict";t.exports=function(t,e,n,r,o,a,i,s){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,s],l=0;(c=new Error(e.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},SksO:function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},TqRt:function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},UxWs:function(t,e,n){"use strict";n.r(e);var r=n("dI71"),o=n("xtsi"),a=n("q1tI"),i=n.n(a),s=n("i8i4"),c=n.n(s),u=n("YwZP"),l=n("7hJ6"),p=n("MMVs"),d=n.n(p),f=n("Wbzz"),h=n("emEt"),m=n("YLt+"),v=n("5yr3");const g={id:"gatsby-announcer",style:{position:"absolute",top:0,width:1,height:1,padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},"aria-live":"assertive","aria-atomic":"true"};var y=n("9Xx/"),w=n("+ZDr");const b=new Map,P=new Map;function R(t){let e=b.get(t);return e||(e=P.get(t.toLowerCase())),null!=e&&(window.___replace(e.toPath),!0)}m.forEach(t=>{t.ignoreCase?P.set(t.fromPath,t):b.set(t.fromPath,t)});const _=(t,e)=>{R(t.pathname)||Object(o.apiRunner)("onPreRouteUpdate",{location:t,prevLocation:e})},O=(t,e)=>{R(t.pathname)||Object(o.apiRunner)("onRouteUpdate",{location:t,prevLocation:e})},S=function(t,e){if(void 0===e&&(e={}),"number"==typeof t)return void y.c.navigate(t);let{pathname:n}=Object(w.parsePath)(t),r=b.get(n);if(r||(r=P.get(n.toLowerCase())),r&&(t=r.toPath,n=Object(w.parsePath)(t).pathname),window.___swUpdated)return void(window.location=n);const a=setTimeout(()=>{v.a.emit("onDelayedLoadPageResources",{pathname:n}),Object(o.apiRunner)("onRouteUpdateDelayed",{location:window.location})},1e3);h.default.loadPage(n).then(r=>{if(!r||r.status===h.PageResourceStatus.Error)return window.history.replaceState({},"",location.href),window.location=n,void clearTimeout(a);r&&r.page.webpackCompilationHash!==window.___webpackCompilationHash&&("serviceWorker"in navigator&&null!==navigator.serviceWorker.controller&&"activated"===navigator.serviceWorker.controller.state&&navigator.serviceWorker.controller.postMessage({gatsbyApi:"clearPathResources"}),window.location=n),Object(u.navigate)(t,e),clearTimeout(a)})};function x(t,e){let{location:n}=e;const{pathname:r,hash:a}=n,i=Object(o.apiRunner)("shouldUpdateScroll",{prevRouterProps:t,pathname:r,routerProps:{location:n},getSavedScrollPosition:t=>[0,this._stateStorage.read(t,t.key)]});if(i.length>0)return i[i.length-1];if(t){const{location:{pathname:e}}=t;if(e===r)return a?decodeURI(a.slice(1)):[0,0]}return!0}let E=function(t){function e(e){var n;return(n=t.call(this,e)||this).announcementRef=i.a.createRef(),n}Object(r.a)(e,t);var n=e.prototype;return n.componentDidUpdate=function(t,e){requestAnimationFrame(()=>{let t="new page at "+this.props.location.pathname;document.title&&(t=document.title);const e=document.querySelectorAll("#gatsby-focus-wrapper h1");e&&e.length&&(t=e[0].textContent);const n="Navigated to "+t;if(this.announcementRef.current){this.announcementRef.current.innerText!==n&&(this.announcementRef.current.innerText=n)}})},n.render=function(){return i.a.createElement("div",Object.assign({},g,{ref:this.announcementRef}))},e}(i.a.Component);const C=(t,e)=>{var n,r;return t.href!==e.href||(null==t||null===(n=t.state)||void 0===n?void 0:n.key)!==(null==e||null===(r=e.state)||void 0===r?void 0:r.key)};let j=function(t){function e(e){var n;return n=t.call(this,e)||this,_(e.location,null),n}Object(r.a)(e,t);var n=e.prototype;return n.componentDidMount=function(){O(this.props.location,null)},n.shouldComponentUpdate=function(t){return!!C(t.location,this.props.location)&&(_(this.props.location,t.location),!0)},n.componentDidUpdate=function(t){C(t.location,this.props.location)&&O(this.props.location,t.location)},n.render=function(){return i.a.createElement(i.a.Fragment,null,this.props.children,i.a.createElement(E,{location:location}))},e}(i.a.Component);var k=n("IOVJ"),L=n("NsGk"),T=n.n(L);function D(t,e){for(var n in t)if(!(n in e))return!0;for(var r in e)if(t[r]!==e[r])return!0;return!1}var M=function(t){function e(e){var n;n=t.call(this)||this;const{location:r,pageResources:o}=e;return n.state={location:{...r},pageResources:o||h.default.loadPageSync(r.pathname)},n}Object(r.a)(e,t),e.getDerivedStateFromProps=function(t,e){let{location:n}=t;if(e.location.href!==n.href){return{pageResources:h.default.loadPageSync(n.pathname),location:{...n}}}return{location:{...n}}};var n=e.prototype;return n.loadResources=function(t){h.default.loadPage(t).then(e=>{e&&e.status!==h.PageResourceStatus.Error?this.setState({location:{...window.location},pageResources:e}):(window.history.replaceState({},"",location.href),window.location=t)})},n.shouldComponentUpdate=function(t,e){return e.pageResources?this.state.pageResources!==e.pageResources||(this.state.pageResources.component!==e.pageResources.component||(this.state.pageResources.json!==e.pageResources.json||(!(this.state.location.key===e.location.key||!e.pageResources.page||!e.pageResources.page.matchPath&&!e.pageResources.page.path)||function(t,e,n){return D(t.props,e)||D(t.state,n)}(this,t,e)))):(this.loadResources(t.location.pathname),!1)},n.render=function(){return this.props.children(this.state)},e}(i.a.Component),A=n("cSJ8"),U=n("JeVI");const I=new h.ProdLoader(T.a,U);Object(h.setLoader)(I),I.setApiRunner(o.apiRunner),window.asyncRequires=T.a,window.___emitter=v.a,window.___loader=h.publicLoader,y.c.listen(t=>{t.location.action=t.action}),window.___push=t=>S(t,{replace:!1}),window.___replace=t=>S(t,{replace:!0}),window.___navigate=(t,e)=>S(t,e),R(window.location.pathname),Object(o.apiRunnerAsync)("onClientEntry").then(()=>{Object(o.apiRunner)("registerServiceWorker").length>0&&n("NSX3");const t=t=>i.a.createElement(u.BaseContext.Provider,{value:{baseuri:"/",basepath:"/"}},i.a.createElement(k.a,t)),e=i.a.createContext({});let a=function(t){function n(){return t.apply(this,arguments)||this}return Object(r.a)(n,t),n.prototype.render=function(){const{children:t}=this.props;return i.a.createElement(u.Location,null,n=>{let{location:r}=n;return i.a.createElement(M,{location:r},n=>{let{pageResources:r,location:o}=n;const a=Object(h.getStaticQueryResults)();return i.a.createElement(f.StaticQueryContext.Provider,{value:a},i.a.createElement(e.Provider,{value:{pageResources:r,location:o}},t))})})},n}(i.a.Component),s=function(n){function o(){return n.apply(this,arguments)||this}return Object(r.a)(o,n),o.prototype.render=function(){return i.a.createElement(e.Consumer,null,e=>{let{pageResources:n,location:r}=e;return i.a.createElement(j,{location:r},i.a.createElement(l.ScrollContext,{location:r,shouldUpdateScroll:x},i.a.createElement(u.Router,{basepath:"",location:r,id:"gatsby-focus-wrapper"},i.a.createElement(t,Object.assign({path:"/404.html"===n.page.path?Object(A.a)(r.pathname,""):encodeURI(n.page.matchPath||n.page.path)},this.props,{location:r,pageResources:n},n.json)))))})},o}(i.a.Component);const{pagePath:p,location:m}=window;p&&""+p!==m.pathname&&!(I.findMatchPath(Object(A.a)(m.pathname,""))||"/404.html"===p||p.match(/^\/404\/?$/)||p.match(/^\/offline-plugin-app-shell-fallback\/?$/))&&Object(u.navigate)(""+p+m.search+m.hash,{replace:!0}),h.publicLoader.loadPage(m.pathname).then(t=>{if(!t||t.status===h.PageResourceStatus.Error)throw new Error(`page resources for ${m.pathname} not found. Not rendering React`);window.___webpackCompilationHash=t.page.webpackCompilationHash;const e=Object(o.apiRunner)("wrapRootElement",{element:i.a.createElement(s,null)},i.a.createElement(s,null),t=>{let{result:e}=t;return{element:e}}).pop(),n=()=>i.a.createElement(a,null,e),r=Object(o.apiRunner)("replaceHydrateFunction",void 0,c.a.hydrate)[0];d()(()=>{r(i.a.createElement(n,null),"undefined"!=typeof window?document.getElementById("___gatsby"):void 0,()=>{Object(o.apiRunner)("onInitialClientRender")})})})})},VbXa:function(t,e,n){var r=n("SksO");t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},Wbzz:function(t,e,n){"use strict";n.r(e),n.d(e,"graphql",(function(){return m})),n.d(e,"StaticQueryContext",(function(){return p})),n.d(e,"StaticQuery",(function(){return f})),n.d(e,"useStaticQuery",(function(){return h})),n.d(e,"prefetchPathname",(function(){return l}));var r=n("q1tI"),o=n.n(r),a=n("+ZDr"),i=n.n(a);n.d(e,"Link",(function(){return i.a})),n.d(e,"withAssetPrefix",(function(){return a.withAssetPrefix})),n.d(e,"withPrefix",(function(){return a.withPrefix})),n.d(e,"parsePath",(function(){return a.parsePath})),n.d(e,"navigate",(function(){return a.navigate})),n.d(e,"push",(function(){return a.push})),n.d(e,"replace",(function(){return a.replace})),n.d(e,"navigateTo",(function(){return a.navigateTo}));var s=n("7hJ6");n.d(e,"useScrollRestoration",(function(){return s.useScrollRestoration}));var c=n("lw3w"),u=n.n(c);n.d(e,"PageRenderer",(function(){return u.a}));const l=n("emEt").default.enqueue,p=o.a.createContext({});function d(t){let{staticQueryData:e,data:n,query:r,render:a}=t;const i=n?n.data:e[r]&&e[r].data;return o.a.createElement(o.a.Fragment,null,i&&a(i),!i&&o.a.createElement("div",null,"Loading (StaticQuery)"))}const f=t=>{const{data:e,query:n,render:r,children:a}=t;return o.a.createElement(p.Consumer,null,t=>o.a.createElement(d,{data:e,query:n,render:r||a,staticQueryData:t}))},h=t=>{var e;o.a.useContext;const n=o.a.useContext(p);if(isNaN(Number(t)))throw new Error(`useStaticQuery was called with a string but expects to be called using \`graphql\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\`${t}\`);\n`);if(null!==(e=n[t])&&void 0!==e&&e.data)return n[t].data;throw new Error("The result of this StaticQuery could not be fetched.\n\nThis is likely a bug in Gatsby and if refreshing the page does not fix it, please open an issue in https://github.com/gatsbyjs/gatsby/issues")};function m(){throw new Error("It appears like Gatsby is misconfigured. Gatsby related `graphql` calls are supposed to only be evaluated at compile time, and then compiled away. Unfortunately, something went wrong and the query was left in the compiled code.\n\nUnless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.")}},"YLt+":function(t){t.exports=JSON.parse("[]")},YVoz:function(t,e,n){"use strict";t.exports=Object.assign},YwZP:function(t,e,n){"use strict";n.r(e),n.d(e,"Link",(function(){return T})),n.d(e,"Location",(function(){return w})),n.d(e,"LocationProvider",(function(){return b})),n.d(e,"Match",(function(){return q})),n.d(e,"Redirect",(function(){return I})),n.d(e,"Router",(function(){return _})),n.d(e,"ServerLocation",(function(){return P})),n.d(e,"isRedirect",(function(){return M})),n.d(e,"redirectTo",(function(){return A})),n.d(e,"useLocation",(function(){return W})),n.d(e,"useNavigate",(function(){return F})),n.d(e,"useParams",(function(){return N})),n.d(e,"useMatch",(function(){return J})),n.d(e,"BaseContext",(function(){return R}));var r=n("q1tI"),o=n.n(r),a=(n("17x9"),n("QLaP")),i=n.n(a),s=n("nqlD"),c=n.n(s),u=n("94VI"),l=n("LYrO");n.d(e,"matchPath",(function(){return l.match}));var p=n("9Xx/");n.d(e,"createHistory",(function(){return p.a})),n.d(e,"createMemorySource",(function(){return p.b})),n.d(e,"navigate",(function(){return p.d})),n.d(e,"globalHistory",(function(){return p.c}));var d=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var g=function(t,e){var n=c()(e);return n.displayName=t,n},y=g("Location"),w=function(t){var e=t.children;return o.a.createElement(y.Consumer,null,(function(t){return t?e(t):o.a.createElement(b,null,e)}))},b=function(t){function e(){var n,r;h(this,e);for(var o=arguments.length,a=Array(o),i=0;i-1?(a=e.substring(0,r),i=e.substring(r)):a=e,o.a.createElement(y.Provider,{value:{location:{pathname:a,search:i,hash:""},navigate:function(){throw new Error("You can't call navigate on the server.")}}},n)},R=g("Base",{baseuri:"/",basepath:"/"}),_=function(t){return o.a.createElement(R.Consumer,null,(function(e){return o.a.createElement(w,null,(function(n){return o.a.createElement(O,d({},e,n,t))}))}))},O=function(t){function e(){return h(this,e),m(this,t.apply(this,arguments))}return v(e,t),e.prototype.render=function(){var t=this.props,e=t.location,n=t.navigate,r=t.basepath,a=t.primary,i=t.children,s=(t.baseuri,t.component),c=void 0===s?"div":s,u=f(t,["location","navigate","basepath","primary","children","baseuri","component"]),p=o.a.Children.toArray(i).reduce((function(t,e){var n=G(r)(e);return t.concat(n)}),[]),h=e.pathname,m=Object(l.pick)(p,h);if(m){var v=m.params,g=m.uri,y=m.route,w=m.route.value;r=y.default?r:y.path.replace(/\*$/,"");var b=d({},v,{uri:g,location:e,navigate:function(t,e){return n(Object(l.resolve)(t,g),e)}}),P=o.a.cloneElement(w,b,w.props.children?o.a.createElement(_,{location:e,primary:a},w.props.children):void 0),O=a?x:c,S=a?d({uri:g,location:e,component:c},u):u;return o.a.createElement(R.Provider,{value:{baseuri:g,basepath:r}},o.a.createElement(O,S,P))}return null},e}(o.a.PureComponent);O.defaultProps={primary:!0};var S=g("Focus"),x=function(t){var e=t.uri,n=t.location,r=t.component,a=f(t,["uri","location","component"]);return o.a.createElement(S.Consumer,null,(function(t){return o.a.createElement(j,d({},a,{component:r,requestFocus:t,uri:e,location:n}))}))},E=!0,C=0,j=function(t){function e(){var n,r;h(this,e);for(var o=arguments.length,a=Array(o),i=0;i{if("undefined"==typeof document)return void r();const o=document.createElement("link");o.setAttribute("rel","prefetch"),o.setAttribute("href",t),Object.keys(e).forEach(t=>{o.setAttribute(t,e[t])}),o.onload=n,o.onerror=r;(document.getElementsByTagName("head")[0]||document.getElementsByName("script")[0].parentNode).appendChild(o)})}:function(t){return new Promise((e,n)=>{const r=new XMLHttpRequest;r.open("GET",t,!0),r.onload=()=>{200===r.status?e():n()},r.send(null)})},i={};var s=function(t,e){return new Promise(n=>{i[t]?n():a(t,e).then(()=>{n(),i[t]=!0}).catch(()=>{})})},c=n("5yr3"),u=n("30RF");const l={Error:"error",Success:"success"},p=t=>t&&t.default||t,d=t=>{var e;return`/page-data/${"/"===t?"index":e=(e="/"===(e=t)[0]?e.slice(1):e).endsWith("/")?e.slice(0,-1):e}/page-data.json`};function f(t,e){return void 0===e&&(e="GET"),new Promise((n,r)=>{const o=new XMLHttpRequest;o.open(e,t,!0),o.onreadystatechange=()=>{4==o.readyState&&n(o)},o.send(null)})}const h=function(t,e){void 0===e&&(e=null);const n={componentChunkName:t.componentChunkName,path:t.path,webpackCompilationHash:t.webpackCompilationHash,matchPath:t.matchPath,staticQueryHashes:t.staticQueryHashes};return{component:e,json:t.result,page:n}};let m=function(){function t(t,e){this.inFlightNetworkRequests=new Map,this.pageDb=new Map,this.inFlightDb=new Map,this.staticQueryDb={},this.pageDataDb=new Map,this.prefetchTriggered=new Set,this.prefetchCompleted=new Set,this.loadComponent=t,Object(u.d)(e)}var e=t.prototype;return e.memoizedGet=function(t){let e=this.inFlightNetworkRequests.get(t);return e||(e=f(t,"GET"),this.inFlightNetworkRequests.set(t,e)),e.then(e=>(this.inFlightNetworkRequests.delete(t),e)).catch(e=>{throw this.inFlightNetworkRequests.delete(t),e})},e.setApiRunner=function(t){this.apiRunner=t,this.prefetchDisabled=t("disableCorePrefetching").some(t=>t)},e.fetchPageDataJson=function(t){const{pagePath:e,retries:n=0}=t,r=d(e);return this.memoizedGet(r).then(r=>{const{status:o,responseText:a}=r;if(200===o)try{const e=JSON.parse(a);if(void 0===e.path)throw new Error("not a valid pageData response");return Object.assign(t,{status:l.Success,payload:e})}catch(i){}return 404===o||200===o?"/404.html"===e?Object.assign(t,{status:l.Error}):this.fetchPageDataJson(Object.assign(t,{pagePath:"/404.html",notFound:!0})):500===o?Object.assign(t,{status:l.Error}):n<3?this.fetchPageDataJson(Object.assign(t,{retries:n+1})):Object.assign(t,{status:l.Error})})},e.loadPageDataJson=function(t){const e=Object(u.b)(t);if(this.pageDataDb.has(e)){const t=this.pageDataDb.get(e);return Promise.resolve(t)}return this.fetchPageDataJson({pagePath:e}).then(t=>(this.pageDataDb.set(e,t),t))},e.findMatchPath=function(t){return Object(u.a)(t)},e.loadPage=function(t){const e=Object(u.b)(t);if(this.pageDb.has(e)){const t=this.pageDb.get(e);return Promise.resolve(t.payload)}if(this.inFlightDb.has(e))return this.inFlightDb.get(e);const n=Promise.all([this.loadAppData(),this.loadPageDataJson(e)]).then(t=>{const n=t[1];if(n.status===l.Error)return{status:l.Error};let r=n.payload;const{componentChunkName:o,staticQueryHashes:a=[]}=r,i={},s=this.loadComponent(o).then(e=>{let o;return i.createdAt=new Date,e?(i.status=l.Success,!0===n.notFound&&(i.notFound=!0),r=Object.assign(r,{webpackCompilationHash:t[0]?t[0].webpackCompilationHash:""}),o=h(r,e)):i.status=l.Error,o}),u=Promise.all(a.map(t=>{if(this.staticQueryDb[t]){const e=this.staticQueryDb[t];return{staticQueryHash:t,jsonPayload:e}}return this.memoizedGet(`/page-data/sq/d/${t}.json`).then(e=>{const n=JSON.parse(e.responseText);return{staticQueryHash:t,jsonPayload:n}})})).then(t=>{const e={};return t.forEach(t=>{let{staticQueryHash:n,jsonPayload:r}=t;e[n]=r,this.staticQueryDb[n]=r}),e});return Promise.all([s,u]).then(t=>{let n,[r,o]=t;return r&&(n={...r,staticQueryResults:o},i.payload=n,c.a.emit("onPostLoadPageResources",{page:n,pageResources:n})),this.pageDb.set(e,i),n})});return n.then(t=>{this.inFlightDb.delete(e)}).catch(t=>{throw this.inFlightDb.delete(e),t}),this.inFlightDb.set(e,n),n},e.loadPageSync=function(t){const e=Object(u.b)(t);if(this.pageDb.has(e)){return this.pageDb.get(e).payload}},e.shouldPrefetch=function(t){return!!(()=>{if("connection"in navigator&&void 0!==navigator.connection){if((navigator.connection.effectiveType||"").includes("2g"))return!1;if(navigator.connection.saveData)return!1}return!0})()&&!this.pageDb.has(t)},e.prefetch=function(t){if(!this.shouldPrefetch(t))return!1;if(this.prefetchTriggered.has(t)||(this.apiRunner("onPrefetchPathname",{pathname:t}),this.prefetchTriggered.add(t)),this.prefetchDisabled)return!1;const e=Object(u.b)(t);return this.doPrefetch(e).then(()=>{this.prefetchCompleted.has(t)||(this.apiRunner("onPostPrefetchPathname",{pathname:t}),this.prefetchCompleted.add(t))}),!0},e.doPrefetch=function(t){const e=d(t);return s(e,{crossOrigin:"anonymous",as:"fetch"}).then(()=>this.loadPageDataJson(t))},e.hovering=function(t){this.loadPage(t)},e.getResourceURLsForPathname=function(t){const e=Object(u.b)(t),n=this.pageDataDb.get(e);if(n){const t=h(n.payload);return[].concat(Object(o.a)(v(t.page.componentChunkName)),[d(e)])}return null},e.isPageNotFound=function(t){const e=Object(u.b)(t),n=this.pageDb.get(e);return!n||n.notFound},e.loadAppData=function(t){return void 0===t&&(t=0),this.memoizedGet("/page-data/app-data.json").then(e=>{const{status:n,responseText:r}=e;let o;if(200!==n&&t<3)return this.loadAppData(t+1);if(200===n)try{const t=JSON.parse(r);if(void 0===t.webpackCompilationHash)throw new Error("not a valid app-data response");o=t}catch(a){}return o})},t}();const v=t=>(window.___chunkMapping[t]||[]).map(t=>""+t);let g,y=function(t){function e(e,n){return t.call(this,t=>e.components[t]?e.components[t]().then(p).catch(()=>null):Promise.resolve(),n)||this}Object(r.a)(e,t);var n=e.prototype;return n.doPrefetch=function(e){return t.prototype.doPrefetch.call(this,e).then(t=>{if(t.status!==l.Success)return Promise.resolve();const e=t.payload,n=e.componentChunkName,r=v(n);return Promise.all(r.map(s)).then(()=>e)})},n.loadPageDataJson=function(e){return t.prototype.loadPageDataJson.call(this,e).then(t=>t.notFound?f(e,"HEAD").then(e=>200===e.status?{status:l.Error}:t):t)},e}(m);const w=t=>{g=t},b={getResourcesForPathname:t=>(console.warn("Warning: getResourcesForPathname is deprecated. Use loadPage instead"),g.i.loadPage(t)),getResourcesForPathnameSync:t=>(console.warn("Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead"),g.i.loadPageSync(t)),enqueue:t=>g.prefetch(t),getResourceURLsForPathname:t=>g.getResourceURLsForPathname(t),loadPage:t=>g.loadPage(t),loadPageSync:t=>g.loadPageSync(t),prefetch:t=>g.prefetch(t),isPageNotFound:t=>g.isPageNotFound(t),hovering:t=>g.hovering(t),loadAppData:()=>g.loadAppData()};e.default=b;function P(){return g?g.staticQueryDb:{}}},hd9s:function(t,e,n){"use strict";var r=n("284h"),o=n("TqRt");e.__esModule=!0,e.ScrollContainer=void 0;var a=o(n("pVnL")),i=o(n("VbXa")),s=r(n("q1tI")),c=o(n("i8i4")),u=o(n("17x9")),l=n("Enzk"),p=n("YwZP"),d={scrollKey:u.default.string.isRequired,shouldUpdateScroll:u.default.func,children:u.default.element.isRequired},f=function(t){function e(e){return t.call(this,e)||this}(0,i.default)(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=this,e=c.default.findDOMNode(this),n=this.props,r=n.location,o=n.scrollKey;if(e){e.addEventListener("scroll",(function(){t.props.context.save(r,o,e.scrollTop)}));var a=this.props.context.read(r,o);e.scrollTo(0,a||0)}},n.render=function(){return this.props.children},e}(s.Component),h=function(t){return s.createElement(p.Location,null,(function(e){var n=e.location;return s.createElement(l.ScrollContext.Consumer,null,(function(e){return s.createElement(f,(0,a.default)({},t,{context:e,location:n}))}))}))};e.ScrollContainer=h,h.propTypes=d},lw3w:function(t,e,n){var r;t.exports=(r=n("rzlk"))&&r.default||r},npZl:function(t,e,n){"use strict";var r=n("TqRt");n("Wbzz"),r(n("9hXx"))},nqlD:function(t,e,n){const{createContext:r}=n("q1tI");t.exports=r,t.exports.default=r},nwwn:function(t,e,n){"use strict";e.DEFAULT_OPTIONS={maxWidth:650,wrapperStyle:"",backgroundColor:"white",linkImagesToOriginal:!0,showCaptions:!1,markdownCaptions:!1,withWebp:!1,withAvif:!1,tracedSVG:!1,loading:"lazy",disableBgImageOnAlpha:!1,disableBgImage:!1},e.EMPTY_ALT="GATSBY_EMPTY_ALT",e.imageClass="gatsby-resp-image-image",e.imageWrapperClass="gatsby-resp-image-wrapper",e.imageBackgroundClass="gatsby-resp-image-background-image"},pVnL:function(t,e){function n(){return t.exports=n=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let{location:e}=t;const n=a.default.loadPageSync(e.pathname);return n?o.a.createElement(i.a,{location:e,pageResources:n,...n.json}):null}},xtsi:function(t,e,n){const r=n("LeKB"),{getResourcesForPathname:o,getResourcesForPathnameSync:a,getResourceURLsForPathname:i,loadPage:s,loadPageSync:c}=n("emEt").publicLoader;e.apiRunner=function(t,e,n,u){void 0===e&&(e={});let l=r.map(n=>{if(!n.plugin[t])return;e.getResourcesForPathnameSync=a,e.getResourcesForPathname=o,e.getResourceURLsForPathname=i,e.loadPage=s,e.loadPageSync=c;const r=n.plugin[t](e,n.options);return r&&u&&(e=u({args:e,result:r,plugin:n})),r});return l=l.filter(t=>void 0!==t),l.length>0?l:n?[n]:[]},e.apiRunnerAsync=(t,e,n)=>r.reduce((n,r)=>r.plugin[t]?n.then(()=>r.plugin[t](e,r.options)):n,Promise.resolve())}},[["UxWs",1,7]]]); -//# sourceMappingURL=app-bf2df6aaa6a77caf090e.js.map \ No newline at end of file diff --git a/app-bf2df6aaa6a77caf090e.js.LICENSE.txt b/app-bf2df6aaa6a77caf090e.js.LICENSE.txt deleted file mode 100644 index 9308d5b..0000000 --- a/app-bf2df6aaa6a77caf090e.js.LICENSE.txt +++ /dev/null @@ -1,4 +0,0 @@ -/*! - * domready (c) Dustin Diaz 2014 - License MIT - * ie10 fix - Mikael Kristiansson 2019 - */ diff --git a/blocks/index.html b/blocks/index.html index 972e237..3138a30 100644 --- a/blocks/index.html +++ b/blocks/index.html @@ -1,4 +1,4 @@ -Blocks | SmartBlock
            Getting Started
            Extensions
            API
            Community

            GitHub Download

            version 1.3.2

            SmartBlock

            Blocks

            Paragraph

            +Blocks | SmartBlock
            Getting Started
            Extensions
            API
            Community

            GitHub Download

            version 1.3.2

            SmartBlock

            Blocks

            Paragraph

            Paragraph Extension creates paragraph(p) block to the content. You can add it like below

            import * as React from 'react';
             import { render } from 'react-dom';
             import 'smartblock/css/smartblock.css';
            -import { 
            -  SmartBlock, 
            +import {
            +  SmartBlock,
             } from 'smartblock';
             
             render(<>
            -  <SmartBlock 
            +  <SmartBlock
                 extensions={extensions}
                 html={'<h2>Hello World</h2><p>hello</p>'}
            -    onChange={({ json, html }) => { console.log(json, html);}}  
            +    onChange={({ json, html }) => { console.log(json, html);}}
               />
             </>, document.getElementById("app"));

            Heading1

            @@ -85,9 +85,9 @@

            Heading1

            import * as React from 'react';
             import { render } from 'react-dom';
             import 'smartblock/css/smartblock.css';
            -import Base from 'smartblock/lib/extensions/base';
            -import { 
            -  SmartBlock, 
            +import Base from 'smartblock/extensions/base';
            +import {
            +  SmartBlock,
               Heading1
             } from 'smartblock';
             
            @@ -97,10 +97,10 @@ 

            Heading1

            ]; render(<> - <SmartBlock + <SmartBlock extensions={extensions} html={'<h1>Hello World</h1><p>hello</p>'} - onChange={({ json, html }) => { console.log(json, html);}} + onChange={({ json, html }) => { console.log(json, html);}} /> </>, document.getElementById("app"));

            BulletList

            @@ -141,9 +141,9 @@

            BulletList

            import * as React from 'react';
             import { render } from 'react-dom';
             import 'smartblock/css/smartblock.css';
            -import Base from 'smartblock/lib/extensions/base';
            -import { 
            -  SmartBlock, 
            +import Base from 'smartblock/extensions/base';
            +import {
            +  SmartBlock,
               BulletList,
               ListItem
             } from 'smartblock';
            @@ -155,13 +155,13 @@ 

            BulletList

            ]; render(<> - <SmartBlock + <SmartBlock extensions={extensions} html={`<ul> <li>list item 1</li> <li>list item 2</li> </ul>`} - onChange={({ json, html }) => { console.log(json, html);}} + onChange={({ json, html }) => { console.log(json, html);}} /> </>, document.getElementById("app"));

            OrderdList

            @@ -202,9 +202,9 @@

            OrderdList

            import * as React from 'react';
             import { render } from 'react-dom';
             import 'smartblock/css/smartblock.css';
            -import Base from 'smartblock/lib/extensions/base';
            -import { 
            -  SmartBlock, 
            +import Base from 'smartblock/extensions/base';
            +import {
            +  SmartBlock,
               OrderedList,
               ListItem
             } from 'smartblock';
            @@ -216,13 +216,13 @@ 

            OrderdList

            ]; render(<> - <SmartBlock + <SmartBlock extensions={extensions} html={`<ol> <li>list item 1</li> <li>list item 2</li> </ol>`} - onChange={({ json, html }) => { console.log(json, html);}} + onChange={({ json, html }) => { console.log(json, html);}} /> </>, document.getElementById("app"));

            Blockquote

            @@ -261,10 +261,10 @@

            Blockquote

            import * as React from 'react';
             import { render } from 'react-dom';
             import 'smartblock/css/smartblock.css';
            -import Base from 'smartblock/lib/extensions/base';
            -import { 
            +import Base from 'smartblock/extensions/base';
            +import {
               ...Base,
            -  SmartBlock, 
            +  SmartBlock,
               Blockquote
             } from 'smartblock';
             
            @@ -273,10 +273,10 @@ 

            Blockquote

            ]; render(<> - <SmartBlock + <SmartBlock extensions={extensions} html={'<blockquote>quote here!</blockquote>'} - onChange={({ json, html }) => { console.log(json, html);}} + onChange={({ json, html }) => { console.log(json, html);}} /> </>, document.getElementById("app"));

            Embed

            @@ -315,10 +315,10 @@

            Embed

            import * as React from 'react';
             import { render } from 'react-dom';
             import 'smartblock/css/smartblock.css';
            -import Base from 'smartblock/lib/extensions/base';
            -import { 
            +import Base from 'smartblock/extensions/base';
            +import {
               ...Base,
            -  SmartBlock, 
            +  SmartBlock,
               Embed
             } from 'smartblock';
             
            @@ -331,10 +331,10 @@ 

            Embed

            </div>`; render(<> - <SmartBlock + <SmartBlock extensions={extensions} html={embedHtml} - onChange={({ json, html }) => { console.log(json, html);}} + onChange={({ json, html }) => { console.log(json, html);}} /> </>, document.getElementById("app"));

            Table

            @@ -373,9 +373,9 @@

            Table

            import * as React from 'react';
             import { render } from 'react-dom';
             import 'smartblock/css/smartblock.css';
            -import Base from 'smartblock/lib/extensions/base';
            -import { 
            -  SmartBlock, 
            +import Base from 'smartblock/extensions/base';
            +import {
            +  SmartBlock,
               Table
             } from 'smartblock';
             
            @@ -396,10 +396,10 @@ 

            Table

            </table>`; render(<> - <SmartBlock + <SmartBlock extensions={extensions} html={tableHtml} - onChange={({ json, html }) => { console.log(json, html);}} + onChange={({ json, html }) => { console.log(json, html);}} /> </>, document.getElementById("app"));

            Image

            @@ -438,9 +438,9 @@

            Image

            import * as React from 'react';
             import { render } from 'react-dom';
             import 'smartblock/css/smartblock.css';
            -import Base from 'smartblock/lib/extensions/base';
            -import { 
            -  SmartBlock, 
            +import Base from 'smartblock/extensions/base';
            +import {
            +  SmartBlock,
               Image
             } from 'smartblock';
             
            @@ -452,10 +452,10 @@ 

            Image

            const codeHTML = `<img src="/path" />`; render(<> - <SmartBlock + <SmartBlock extensions={extensions} html={codeHtml} - onChange={({ json, html }) => { console.log(json, html);}} + onChange={({ json, html }) => { console.log(json, html);}} /> </>, document.getElementById("app"));

            Customize How to upload image

            @@ -509,8 +509,8 @@

            Code

            import * as React from 'react';
             import { render } from 'react-dom';
             import 'smartblock/css/smartblock.css';
            -import Base from 'smartblock/lib/extensions/base';
            -import { 
            +import Base from 'smartblock/extensions/base';
            +import {
               SmartBlock,
               Code
             } from 'smartblock';
            @@ -524,9 +524,9 @@ 

            Code

            import {render} from 'react-dom';</code>`; render(<> - <SmartBlock + <SmartBlock extensions={extensions} html={codeHtml} - onChange={({ json, html }) => { console.log(json, html);}} + onChange={({ json, html }) => { console.log(json, html);}} /> -</>, document.getElementById("app"));

            Document

            Usage, introduction of other functions, component introduction etc.
            are described in detail in the document.

            Get Started

            View on GitHub

            SmartBlock was developed by @appleplecom and is open source (MIT license) on GitHub.
            Please send us feedback, requests, bug reports and pull requests!

            If you like it, please press Star ;)

            GitHub page

            If you like our project, we glad to have star! :)

            GitHub
            SmartBlock

            A modern block styled editor built with React.
            SmartBlock is provided with MIT license. Made by @appleple ♥ OSS

            \ No newline at end of file +</>, document.getElementById("app"));

            Document

            Usage, introduction of other functions, component introduction etc.
            are described in detail in the document.

            Get Started

            View on GitHub

            SmartBlock was developed by @appleplecom and is open source (MIT license) on GitHub.
            Please send us feedback, requests, bug reports and pull requests!

            If you like it, please press Star ;)

            GitHub page

            If you like our project, we glad to have star! :)

            GitHub
            SmartBlock

            A modern block styled editor built with React.
            SmartBlock is provided with MIT license. Made by @appleple ♥ OSS

            \ No newline at end of file diff --git a/chunk-map.json b/chunk-map.json index 44a7852..1c75b9a 100644 --- a/chunk-map.json +++ b/chunk-map.json @@ -1 +1 @@ -{"polyfill":["/polyfill-49a0303daaf92d07a55b.js"],"app":["/app-3488d54c30c10bf56ca6.js"],"component---src-pages-404-js":["/component---src-pages-404-js-70e0d3f64d7a11a1d05b.js"],"component---src-pages-index-js":["/component---src-pages-index-js-ebd0cb6845420289e25a.js"],"component---src-templates-blog-post-js":["/component---src-templates-blog-post-js-b76d892690dd1e9729b7.js"]} \ No newline at end of file +{"polyfill":["/polyfill-37f287999969e2c44fcb.js"],"app":["/app-6a665d0d1f5bf65820ca.js"],"component---src-pages-404-js":["/component---src-pages-404-js-6679a17b6fda5afde124.js"],"component---src-pages-index-js":["/component---src-pages-index-js-f9ec7c3019dfcfc7801a.js"],"component---src-templates-blog-post-js":["/component---src-templates-blog-post-js-fb13cf6c11cf046459f9.js"]} \ No newline at end of file diff --git a/commons-655d6eaacc365f66f462.js b/commons-655d6eaacc365f66f462.js deleted file mode 100644 index 6dfb7c4..0000000 --- a/commons-655d6eaacc365f66f462.js +++ /dev/null @@ -1,2 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"8+s/":function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var a=n("q1tI"),i=r(a),o=r(n("Gytx"));function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var l,u=[];function T(){l=e(u.map((function(e){return e.props}))),E.canUseDOM?t(l):n&&(l=n(l))}var E=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.peek=function(){return l},a.rewind=function(){if(a.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=l;return l=void 0,u=[],e};var c=a.prototype;return c.shouldComponentUpdate=function(e){return!o(e,this.props)},c.componentWillMount=function(){u.push(this),T()},c.componentDidUpdate=function(){T()},c.componentWillUnmount=function(){var e=u.indexOf(this);u.splice(e,1),T()},c.render=function(){return i.createElement(r,this.props)},a}(a.Component);return c(E,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),c(E,"canUseDOM",s),E}}},Bl7J:function(e,t,n){"use strict";var r=n("dI71"),a=n("q1tI"),i=n.n(a),o=n("Wbzz"),c=n("kzbP"),s=n.n(c),l=n("DIdi"),u=e=>{const{post:t}=e;return i.a.createElement("div",{className:e.isOpen?"offcanvas is-active":"offcanvas"},i.a.createElement("div",{className:"offcanvas-overlay offcanvas-close"}),i.a.createElement("div",{className:"offcanvas-content"},i.a.createElement("button",{className:"button is-close offcanvas-close",onClick:()=>{e.onClose()}},i.a.createElement("span",null),i.a.createElement("span",null),i.a.createElement("span",null)),i.a.createElement("div",{className:"inner"},i.a.createElement("div",{class:"offcanvas-menu"},i.a.createElement(l.a,{active:t&&t.fields?t.fields.slug:""})),i.a.createElement("hr",null),i.a.createElement("div",{className:"offcanvas-menu"},i.a.createElement("a",{href:"https://github.com/appleple/smartblock",className:"button is-white is-small"},i.a.createElement("i",{className:"fa fa-github"})," GitHub"),i.a.createElement("a",{href:"https://github.com/appleple/smartblock/archive/master.zip",className:"button is-small"},i.a.createElement("i",{className:"fa fa-download"})," Download"),i.a.createElement("hr",null),i.a.createElement("p",null,"version 1.3.2")))))},T=e=>{const[t,n]=i.a.useState(e.className?e.className:"header is-sticky is-ghost"),[r,a]=i.a.useState(!1);return e.className||i.a.useEffect(()=>{window.addEventListener("scroll",(function(){window.pageYOffset>50?n("header is-sticky is-ghost active"):n("header is-sticky is-ghost")}))},[]),i.a.createElement(i.a.Fragment,null,i.a.createElement(u,{post:e.post,isOpen:r,onClose:()=>{a(!1)}}),i.a.createElement("header",{className:t},i.a.createElement("h1",{className:"logo is-small"},i.a.createElement(o.Link,{to:"/"},i.a.createElement("img",{src:s.a,alt:"SmartBlock"}))),i.a.createElement("nav",{className:"header-menu"},i.a.createElement("div",{className:"pulldown"},i.a.createElement(o.Link,{to:"/get-started"},"Document")),i.a.createElement("a",{href:"https://github.com/appleple/smartblock/",className:"button is-white is-small"},i.a.createElement("i",{className:"fa fa-github"}),"GitHub")),i.a.createElement("button",{className:"button is-burger hide-on-medium hide-on-large offcanvas-open",onClick:()=>{a(!0)}},i.a.createElement("span",null),i.a.createElement("span",null),i.a.createElement("span",null))))},E=n("nzU5"),f=n.n(E),m=()=>i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"section-devider"},i.a.createElement("section",{className:"section"},i.a.createElement("div",{className:"inner is-small"},i.a.createElement("h2",null,i.a.createElement("i",{className:"fa fa-book"})," Document"),i.a.createElement("p",null,"Usage, introduction of other functions, component introduction etc. ",i.a.createElement("br",null),"are described in detail in the document. "),i.a.createElement("p",null,i.a.createElement(o.Link,{to:"/get-started",className:"button"},i.a.createElement("i",{className:"fa fa-book"}),"Get Started")))),i.a.createElement("section",{className:"section"},i.a.createElement("div",{className:"inner is-small"},i.a.createElement("h2",null,i.a.createElement("i",{className:"fa fa-github"})," View on GitHub"),i.a.createElement("p",null,"SmartBlock was developed by ",i.a.createElement("a",{href:"https://twitter.com/appleplecom"},"@appleplecom")," and is open source (MIT license) on GitHub.",i.a.createElement("br",null),"Please send us feedback, requests, bug reports and pull requests!"),i.a.createElement("p",null,"If you like it, please press Star ;)"),i.a.createElement("p",{style:{marginTop:"10px"}},i.a.createElement("a",{href:"https://github.com/appleple/SmartBlock",className:"button is-white"},i.a.createElement("i",{className:"fa fa-github"})," GitHub page"))))),i.a.createElement("section",{className:"section github-section"},i.a.createElement("div",{className:"inner is-small"},i.a.createElement("p",null,"If you like our project, we glad to have star! :)"),i.a.createElement("a",{href:"https://github.com/appleple/smartblock/",className:"button is-white is-small"},i.a.createElement("i",{className:"fa fa-github"})," GitHub"))),i.a.createElement("footer",{className:"footer"},i.a.createElement("div",null,i.a.createElement("img",{src:f.a,alt:"SmartBlock"}),i.a.createElement("p",null,"A modern block styled editor built with React.",i.a.createElement("br",null)," SmartBlock is provided with MIT license. Made by @appleple ♥ OSS"))));let p=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){const{children:e,post:t}=this.props,n=t?"header is-sticky is-ghost is-colored":"";return i.a.createElement(i.a.Fragment,null,i.a.createElement(T,{className:n,post:t}),e,i.a.createElement(m,null))},t}(i.a.Component);t.a=p},DIdi:function(e,t,n){"use strict";var r=n("q1tI"),a=n.n(r),i=n("Wbzz");t.a=e=>a.a.createElement("div",{style:{marginBottom:"2rem"}},a.a.createElement("div",{className:"type-h3"},a.a.createElement("span",null,"Getting Started")),a.a.createElement("div",{className:"tree"},a.a.createElement("ul",null,a.a.createElement("li",{className:-1!==e.active.indexOf("get-started")?"is-current":""},a.a.createElement(i.Link,{to:"/get-started"},"Installation")),a.a.createElement("li",{className:-1!==e.active.indexOf("usage")?"is-current":""},a.a.createElement(i.Link,{to:"/usage"},"Usage")))),a.a.createElement("div",{className:"type-h3"},a.a.createElement("span",null,"Extensions")),a.a.createElement("div",{className:"tree"},a.a.createElement("ul",null,a.a.createElement("li",{className:-1!==e.active.indexOf("blocks")?"is-current":""},a.a.createElement(i.Link,{to:"/blocks"},"Blocks")),a.a.createElement("li",{className:-1!==e.active.indexOf("marks")?"is-current":""},a.a.createElement(i.Link,{to:"/marks"},"Marks")),a.a.createElement("li",{className:-1!==e.active.indexOf("utils")?"is-current":""},a.a.createElement(i.Link,{to:"/utils"},"Utils")))),a.a.createElement("div",{className:"type-h3"},a.a.createElement("span",null,"API")),a.a.createElement("div",{className:"tree"},a.a.createElement("ul",null,a.a.createElement("li",{className:-1!==e.active.indexOf("props")?"is-current":""},a.a.createElement(i.Link,{to:"/props"},"Props")),a.a.createElement("li",{className:-1!==e.active.indexOf("customize")?"is-current":""},a.a.createElement(i.Link,{to:"/customize"},"Customize")))),a.a.createElement("div",{className:"type-h3"},a.a.createElement("span",null,"Community")),a.a.createElement("div",{className:"tree"},a.a.createElement("ul",null,a.a.createElement("li",{className:-1!==e.active.indexOf("qa")?"is-current":""},a.a.createElement(i.Link,{to:"/qa"},"Q&A")))))},Gytx:function(e,t){e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(t),s=0;s=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p,d,M,A=(0,c.default)(l.reducePropsToState,l.handleClientStateChange,l.mapStateOnServer)((function(){return null})),L=(p=A,M=d=function(e){function t(){return f(this,t),m(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!(0,s.default)(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case u.TAG_NAMES.SCRIPT:case u.TAG_NAMES.NOSCRIPT:return{innerHTML:t};case u.TAG_NAMES.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,a=e.arrayTypeChildren,i=e.newChildProps,o=e.nestedChildren;return r({},a,((t={})[n.type]=[].concat(a[n.type]||[],[r({},i,this.mapNestedChildrenToProps(n,o))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,a=e.child,i=e.newProps,o=e.newChildProps,c=e.nestedChildren;switch(a.type){case u.TAG_NAMES.TITLE:return r({},i,((t={})[a.type]=c,t.titleAttributes=r({},o),t));case u.TAG_NAMES.BODY:return r({},i,{bodyAttributes:r({},o)});case u.TAG_NAMES.HTML:return r({},i,{htmlAttributes:r({},o)})}return r({},i,((n={})[a.type]=r({},o),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=r({},t);return Object.keys(e).forEach((function(t){var a;n=r({},n,((a={})[t]=e[t],a))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return i.default.Children.forEach(e,(function(e){if(e&&e.props){var a=e.props,i=a.children,o=E(a,["children"]),c=(0,l.convertReactPropstoHtmlAttributes)(o);switch(n.warnOnInvalidChildren(e,i),e.type){case u.TAG_NAMES.LINK:case u.TAG_NAMES.META:case u.TAG_NAMES.NOSCRIPT:case u.TAG_NAMES.SCRIPT:case u.TAG_NAMES.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:c,nestedChildren:i});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:c,nestedChildren:i})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=E(e,["children"]),a=r({},n);return t&&(a=this.mapChildrenToProps(t,a)),i.default.createElement(p,a)},a(t,null,[{key:"canUseDOM",set:function(e){p.canUseDOM=e}}]),t}(i.default.Component),d.propTypes={base:o.default.object,bodyAttributes:o.default.object,children:o.default.oneOfType([o.default.arrayOf(o.default.node),o.default.node]),defaultTitle:o.default.string,defer:o.default.bool,encodeSpecialCharacters:o.default.bool,htmlAttributes:o.default.object,link:o.default.arrayOf(o.default.object),meta:o.default.arrayOf(o.default.object),noscript:o.default.arrayOf(o.default.object),onChangeClientState:o.default.func,script:o.default.arrayOf(o.default.object),style:o.default.arrayOf(o.default.object),title:o.default.string,titleAttributes:o.default.object,titleTemplate:o.default.string},d.defaultProps={defer:!0,encodeSpecialCharacters:!0},d.peek=p.peek,d.rewind=function(){var e=p.rewind();return e||(e=(0,l.mapStateOnServer)({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},M);L.renderStatic=L.rewind,t.Helmet=L,t.default=L},bmMU:function(e,t,n){"use strict";var r=Array.isArray,a=Object.keys,i=Object.prototype.hasOwnProperty,o="undefined"!=typeof Element;e.exports=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var c,s,l,u=r(t),T=r(n);if(u&&T){if((s=t.length)!=n.length)return!1;for(c=s;0!=c--;)if(!e(t[c],n[c]))return!1;return!0}if(u!=T)return!1;var E=t instanceof Date,f=n instanceof Date;if(E!=f)return!1;if(E&&f)return t.getTime()==n.getTime();var m=t instanceof RegExp,p=n instanceof RegExp;if(m!=p)return!1;if(m&&p)return t.toString()==n.toString();var d=a(t);if((s=d.length)!==a(n).length)return!1;for(c=s;0!=c--;)if(!i.call(n,d[c]))return!1;if(o&&t instanceof Element&&n instanceof Element)return t===n;for(c=s;0!=c--;)if(!("_owner"===(l=d[c])&&t.$$typeof||e(t[l],n[l])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}},"hFT/":function(e,t){t.__esModule=!0;t.ATTRIBUTE_NAMES={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"};var n=t.TAG_NAMES={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},r=(t.VALID_TAG_NAMES=Object.keys(n).map((function(e){return n[e]})),t.TAG_PROPERTIES={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src"},t.REACT_TAG_MAP={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"});t.HELMET_PROPS={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},t.HTML_TAG_MAP=Object.keys(r).reduce((function(e,t){return e[r[t]]=t,e}),{}),t.SELF_CLOSING_TAGS=[n.NOSCRIPT,n.SCRIPT,n.STYLE],t.HELMET_ATTRIBUTE="data-react-helmet"},kzbP:function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNzEuMTA2IiBoZWlnaHQ9IjMwIiB2aWV3Qm94PSIwIDAgMTcxLjEwNiAzMCI+PGRlZnM+PHN0eWxlPi5hLC5ie2ZpbGw6I2ZmZjt9LmJ7Zm9udC1zaXplOjIzcHg7Zm9udC1mYW1pbHk6RnV0dXJhLUJvbGQsIEZ1dHVyYTtmb250LXdlaWdodDo3MDA7fTwvc3R5bGU+PC9kZWZzPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC03NTguOTYyIDI4Ni4wNzQpIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg3NTguOTYyIC0yODMuMjY0KSI+PHBhdGggY2xhc3M9ImEiIGQ9Ik03ODEuMi0yODAuMjU4bC0xMC4wNDYtNS44YTEuNDMzLDEuNDMzLDAsMCwwLTEuNDM0LDBsLTEwLjA0Niw1LjhhMS40MzMsMS40MzMsMCwwLDAtLjcxNywxLjI0MnYxMS42YTEuNDMzLDEuNDMzLDAsMCwwLC43MTcsMS4yNDJsMTAuMDQ2LDUuOGExLjQzNCwxLjQzNCwwLDAsMCwuNzE3LjE5MiwxLjQzNCwxLjQzNCwwLDAsMCwuNzE3LS4xOTJsMTAuMDQ2LTUuOGExLjQzMywxLjQzMywwLDAsMCwuNzE3LTEuMjQydi0xMS42QTEuNDMzLDEuNDMzLDAsMCwwLDc4MS4yLTI4MC4yNThabS00LjI3OSwxMS43LTUuNjk1LDMuMjg4YTEuNTc1LDEuNTc1LDAsMCwxLS43ODkuMjExLDEuNTc3LDEuNTc3LDAsMCwxLS43ODktLjIxM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LDAsMC0yLjI4OCwwbC0xNi4wMzUsOS4yNThhMi4yODgsMi4yODgsMCwwLDAtMS4xNDQsMS45ODJ2MTguNTE1YTIuMjg4LDIuMjg4LDAsMCwwLDEuMTQ0LDEuOTgybDE2LjAzNSw5LjI1OGEyLjI4OSwyLjI4OSwwLDAsMCwxLjE0NC4zMDcsMi4yODksMi4yODksMCwwLDAsMS4xNDQtLjMwN2wxNi4wMzUtOS4yNThhMi4yODgsMi4yODgsMCwwLDAsMS4xNDQtMS45ODJWLTI3NC43QTIuMjg4LDIuMjg4LDAsMCwwLDc5NC40NjQtMjc2LjY4NlptLTYuODMsMTguNjY5LTkuMDg5LDUuMjQ4YTIuNTE1LDIuNTE1LDAsMCwxLTEuMjU5LjMzNywyLjUxNiwyLjUxNiwwLDAsMS0xLjI1OS0uMzM3bC05LjA5LTUuMjQ4YTIuNTE5LDIuNTE5LDAsMCwxLTEuMjU2LTIuMzA4bC4xODktMy43NzUsNS4wMzIuMjUzLS4xMTIsMi4yMzcsNi41LDMuNzUxLDQuMDUyLTIuMzM5LTE0LjQtOC4zMTRhMi41MTksMi41MTksMCwwLDEtMS4yNTktMi4xODEsMi41MTksMi41MTksMCwwLDEsMS4yNTktMi4xODFsOS4wOS01LjI0OGEyLjUxOSwyLjUxOSwwLDAsMSwyLjUxOSwwbDkuMDg5LDUuMjQ4YTIuNTE5LDIuNTE5LDAsMCwxLDEuMjU3LDIuMzA4bC0uMTg5LDMuNzc1LTUuMDMyLS4yNTMuMTEyLTIuMjM3LTYuNS0zLjc1MS00LjA1MiwyLjMzOSwxNC40LDguMzE0YTIuNTE4LDIuNTE4LDAsMCwxLDEuMjU5LDIuMTgxQTIuNTE4LDIuNTE4LDAsMCwxLDc4Ny42MzQtMjU4LjAxN1oiLz48L2c+PC9zdmc+"},v1p5:function(e,t,n){(function(e){t.__esModule=!0,t.warn=t.requestAnimationFrame=t.reducePropsToState=t.mapStateOnServer=t.handleClientStateChange=t.convertReactPropstoHtmlAttributes=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},T=function(e){var t=d(e,c.TAG_NAMES.TITLE),n=d(e,c.HELMET_PROPS.TITLE_TEMPLATE);if(n&&t)return n.replace(/%s/g,(function(){return t}));var r=d(e,c.HELMET_PROPS.DEFAULT_TITLE);return t||r||void 0},E=function(e){return d(e,c.HELMET_PROPS.ON_CHANGE_CLIENT_STATE)||function(){}},f=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return a({},e,t)}),{})},m=function(e,t){return t.filter((function(e){return void 0!==e[c.TAG_NAMES.BASE]})).map((function(e){return e[c.TAG_NAMES.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},M=(l=Date.now(),function(e){var t=Date.now();t-l>16?(l=t,e(t)):setTimeout((function(){M(e)}),0)}),A=function(e){return clearTimeout(e)},L="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||M:e.requestAnimationFrame||M,h="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||A:e.cancelAnimationFrame||A,N=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},y=null,S=function(e,t){var n=e.baseTag,r=e.bodyAttributes,a=e.htmlAttributes,i=e.linkTags,o=e.metaTags,s=e.noscriptTags,l=e.onChangeClientState,u=e.scriptTags,T=e.styleTags,E=e.title,f=e.titleAttributes;g(c.TAG_NAMES.BODY,r),g(c.TAG_NAMES.HTML,a),b(E,f);var m={baseTag:I(c.TAG_NAMES.BASE,n),linkTags:I(c.TAG_NAMES.LINK,i),metaTags:I(c.TAG_NAMES.META,o),noscriptTags:I(c.TAG_NAMES.NOSCRIPT,s),scriptTags:I(c.TAG_NAMES.SCRIPT,u),styleTags:I(c.TAG_NAMES.STYLE,T)},p={},d={};Object.keys(m).forEach((function(e){var t=m[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(d[e]=m[e].oldTags)})),t&&t(),l(e,p,d)},w=function(e){return Array.isArray(e)?e.join(""):e},b=function(e,t){void 0!==e&&document.title!==e&&(document.title=w(e)),g(c.TAG_NAMES.TITLE,t)},g=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(c.HELMET_ATTRIBUTE),a=r?r.split(","):[],i=[].concat(a),o=Object.keys(t),s=0;s=0;E--)n.removeAttribute(i[E]);a.length===i.length?n.removeAttribute(c.HELMET_ATTRIBUTE):n.getAttribute(c.HELMET_ATTRIBUTE)!==o.join(",")&&n.setAttribute(c.HELMET_ATTRIBUTE,o.join(","))}},I=function(e,t){var n=document.head||document.querySelector(c.TAG_NAMES.HEAD),r=n.querySelectorAll(e+"["+c.HELMET_ATTRIBUTE+"]"),a=Array.prototype.slice.call(r),i=[],o=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===c.TAG_PROPERTIES.INNER_HTML)n.innerHTML=t.innerHTML;else if(r===c.TAG_PROPERTIES.CSS_TEXT)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var s=void 0===t[r]?"":t[r];n.setAttribute(r,s)}n.setAttribute(c.HELMET_ATTRIBUTE,"true"),a.some((function(e,t){return o=t,n.isEqualNode(e)}))?a.splice(o,1):i.push(n)})),a.forEach((function(e){return e.parentNode.removeChild(e)})),i.forEach((function(e){return n.appendChild(e)})),{oldTags:a,newTags:i}},O=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[c.REACT_TAG_MAP[n]||n]=e[n],t}),t)},C=function(e,t,n){switch(e){case c.TAG_NAMES.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})[c.HELMET_ATTRIBUTE]=!0,a=v(n,r),[i.default.createElement(c.TAG_NAMES.TITLE,a,e)];var e,n,r,a},toString:function(){return function(e,t,n,r){var a=O(n),i=w(t);return a?"<"+e+" "+c.HELMET_ATTRIBUTE+'="true" '+a+">"+u(i,r)+"":"<"+e+" "+c.HELMET_ATTRIBUTE+'="true">'+u(i,r)+""}(e,t.title,t.titleAttributes,n)}};case c.ATTRIBUTE_NAMES.BODY:case c.ATTRIBUTE_NAMES.HTML:return{toComponent:function(){return v(t)},toString:function(){return O(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,a=((r={key:n})[c.HELMET_ATTRIBUTE]=!0,r);return Object.keys(t).forEach((function(e){var n=c.REACT_TAG_MAP[e]||e;if(n===c.TAG_PROPERTIES.INNER_HTML||n===c.TAG_PROPERTIES.CSS_TEXT){var r=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:r}}else a[n]=t[e]})),i.default.createElement(e,a)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var a=Object.keys(r).filter((function(e){return!(e===c.TAG_PROPERTIES.INNER_HTML||e===c.TAG_PROPERTIES.CSS_TEXT)})).reduce((function(e,t){var a=void 0===r[t]?t:t+'="'+u(r[t],n)+'"';return e?e+" "+a:a}),""),i=r.innerHTML||r.cssText||"",o=-1===c.SELF_CLOSING_TAGS.indexOf(e);return t+"<"+e+" "+c.HELMET_ATTRIBUTE+'="true" '+a+(o?"/>":">"+i+"")}),"")}(e,t,n)}}}};t.convertReactPropstoHtmlAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[c.HTML_TAG_MAP[n]||n]=e[n],t}),t)},t.handleClientStateChange=function(e){y&&h(y),e.defer?y=L((function(){S(e,(function(){y=null}))})):(S(e),y=null)},t.mapStateOnServer=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,i=e.linkTags,o=e.metaTags,s=e.noscriptTags,l=e.scriptTags,u=e.styleTags,T=e.title,E=void 0===T?"":T,f=e.titleAttributes;return{base:C(c.TAG_NAMES.BASE,t,r),bodyAttributes:C(c.ATTRIBUTE_NAMES.BODY,n,r),htmlAttributes:C(c.ATTRIBUTE_NAMES.HTML,a,r),link:C(c.TAG_NAMES.LINK,i,r),meta:C(c.TAG_NAMES.META,o,r),noscript:C(c.TAG_NAMES.NOSCRIPT,s,r),script:C(c.TAG_NAMES.SCRIPT,l,r),style:C(c.TAG_NAMES.STYLE,u,r),title:C(c.TAG_NAMES.TITLE,{title:E,titleAttributes:f},r)}},t.reducePropsToState=function(e){return{baseTag:m([c.TAG_PROPERTIES.HREF],e),bodyAttributes:f(c.ATTRIBUTE_NAMES.BODY,e),defer:d(e,c.HELMET_PROPS.DEFER),encode:d(e,c.HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:f(c.ATTRIBUTE_NAMES.HTML,e),linkTags:p(c.TAG_NAMES.LINK,[c.TAG_PROPERTIES.REL,c.TAG_PROPERTIES.HREF],e),metaTags:p(c.TAG_NAMES.META,[c.TAG_PROPERTIES.NAME,c.TAG_PROPERTIES.CHARSET,c.TAG_PROPERTIES.HTTPEQUIV,c.TAG_PROPERTIES.PROPERTY,c.TAG_PROPERTIES.ITEM_PROP],e),noscriptTags:p(c.TAG_NAMES.NOSCRIPT,[c.TAG_PROPERTIES.INNER_HTML],e),onChangeClientState:E(e),scriptTags:p(c.TAG_NAMES.SCRIPT,[c.TAG_PROPERTIES.SRC,c.TAG_PROPERTIES.INNER_HTML],e),styleTags:p(c.TAG_NAMES.STYLE,[c.TAG_PROPERTIES.CSS_TEXT],e),title:T(e),titleAttributes:f(c.ATTRIBUTE_NAMES.TITLE,e)}},t.requestAnimationFrame=L,t.warn=N}).call(this,n("yLpj"))},vrFN:function(e,t,n){"use strict";var r=n("q1tI"),a=n.n(r),i=n("TJpk"),o=n.n(i),c=n("Wbzz");function s(e){let{description:t,lang:n,meta:r,title:i}=e;const{site:s}=Object(c.useStaticQuery)("63159454"),l=t||s.siteMetadata.description;return a.a.createElement(o.a,{htmlAttributes:{lang:n},title:i,titleTemplate:"%s | "+s.siteMetadata.title,meta:[{name:"description",content:l},{property:"og:title",content:i},{property:"og:description",content:l},{property:"og:image",content:"http://appleple.github.io"+Object(c.withPrefix)("/ogp.png")},{property:"og:image:secure_url",content:"https://appleple.github.io"+Object(c.withPrefix)("/ogp.png")},{property:"og:type",content:"website"},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:image",content:"https://appleple.github.io"+Object(c.withPrefix)("/ogp.png")},{name:"twitter:creator",content:s.siteMetadata.author},{name:"twitter:title",content:i},{name:"twitter:description",content:l}].concat(r),link:[{rel:"stylesheet",href:"https://unpkg.com/uny@0.2.9/dist/css/uny.min.css"},{rel:"stylesheet",href:"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"},{rel:"stylesheet",href:Object(c.withPrefix)("/prism.css")},{rel:"stylesheet",href:Object(c.withPrefix)("/layout.css")}]})}s.defaultProps={lang:"en",meta:[],description:""},t.a=s},yLpj:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"==typeof window&&(n=window)}e.exports=n}}]); -//# sourceMappingURL=commons-655d6eaacc365f66f462.js.map \ No newline at end of file diff --git a/commons-655d6eaacc365f66f462.js.map b/commons-655d6eaacc365f66f462.js.map deleted file mode 100644 index cb256a1..0000000 --- a/commons-655d6eaacc365f66f462.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///./node_modules/react-side-effect/lib/index.js","webpack:///./src/components/offcanvas.js","webpack:///./src/components/header.js","webpack:///./src/components/footer.js","webpack:///./src/components/layout.js","webpack:///./src/components/sidemenu-inner.js","webpack:///./node_modules/shallowequal/index.js","webpack:///./node_modules/react-helmet/lib/Helmet.js","webpack:///./node_modules/react-fast-compare/index.js","webpack:///./node_modules/react-helmet/lib/HelmetConstants.js","webpack:///./src/components/logo.svg","webpack:///./src/components/footer_logo.svg","webpack:///./node_modules/react-helmet/lib/HelmetUtils.js","webpack:///./src/components/seo.js","webpack:///(webpack)/buildin/global.js"],"names":["_interopDefault","ex","React","React__default","shallowEqual","_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","canUseDOM","window","document","createElement","module","exports","reducePropsToState","handleStateChangeOnClient","mapStateOnServer","Error","WrappedComponent","state","mountedInstances","emitChange","map","instance","props","SideEffect","_Component","subClass","superClass","apply","this","arguments","prototype","create","constructor","__proto__","peek","rewind","recordedState","undefined","_proto","shouldComponentUpdate","nextProps","componentWillMount","push","componentDidUpdate","componentWillUnmount","index","indexOf","splice","render","Component","displayName","name","getDisplayName","post","className","isOpen","onClick","onClose","class","SideMenuInner","active","fields","slug","href","setClassName","useState","setIsOpen","useEffect","addEventListener","pageYOffset","Fragment","Offcanvas","Link","to","src","Logo","alt","style","marginTop","Layout","_React$Component","_inheritsLoose","children","Header","Footer","marginBottom","objA","objB","compare","compareContext","ret","call","keysA","keys","keysB","length","bHasOwnProperty","hasOwnProperty","bind","idx","valueA","valueB","__esModule","Helmet","_extends","assign","target","i","source","_createClass","defineProperties","descriptor","Constructor","protoProps","staticProps","_react2","_interopRequireDefault","_propTypes2","_reactSideEffect2","_reactFastCompare2","_HelmetUtils","_HelmetConstants","default","_objectWithoutProperties","_classCallCheck","TypeError","_possibleConstructorReturn","self","ReferenceError","_class","_temp","HelmetSideEffects","handleClientStateChange","HelmetExport","HelmetWrapper","setPrototypeOf","_inherits","mapNestedChildrenToProps","child","nestedChildren","type","TAG_NAMES","SCRIPT","NOSCRIPT","innerHTML","STYLE","cssText","flattenArrayTypeChildren","_ref","_extends2","arrayTypeChildren","newChildProps","concat","mapObjectTypeChildren","_ref2","_extends3","_extends4","newProps","TITLE","titleAttributes","BODY","bodyAttributes","HTML","htmlAttributes","mapArrayTypeChildrenToProps","newFlattenedProps","forEach","arrayChildName","_extends5","warnOnInvalidChildren","mapChildrenToProps","_this2","Children","_child$props","childProps","convertReactPropstoHtmlAttributes","LINK","META","_props","set","propTypes","base","object","oneOfType","arrayOf","node","defaultTitle","string","defer","bool","encodeSpecialCharacters","link","meta","noscript","onChangeClientState","func","script","title","titleTemplate","defaultProps","mappedState","baseTag","linkTags","metaTags","noscriptTags","scriptTags","styleTags","renderStatic","isArray","Array","keyList","hasProp","hasElementType","Element","a","b","equal","arrA","arrB","dateA","Date","dateB","getTime","regexpA","RegExp","regexpB","toString","$$typeof","error","message","match","number","console","warn","ATTRIBUTE_NAMES","BASE","HEAD","REACT_TAG_MAP","VALID_TAG_NAMES","TAG_PROPERTIES","CHARSET","CSS_TEXT","HREF","HTTPEQUIV","INNER_HTML","ITEM_PROP","NAME","PROPERTY","REL","SRC","accesskey","charset","contenteditable","contextmenu","itemprop","tabindex","HELMET_PROPS","DEFAULT_TITLE","DEFER","ENCODE_SPECIAL_CHARACTERS","ON_CHANGE_CLIENT_STATE","TITLE_TEMPLATE","HTML_TAG_MAP","reduce","SELF_CLOSING_TAGS","HELMET_ATTRIBUTE","requestAnimationFrame","_typeof","Symbol","iterator","_objectAssign2","clock","str","encode","String","replace","getTitleFromPropsList","propsList","innermostTitle","getInnermostProperty","innermostTemplate","innermostDefaultTitle","getOnChangeClientState","getAttributesFromPropsList","tagType","filter","tagAttrs","current","getBaseTagFromPropsList","primaryAttributes","reverse","innermostBaseTag","tag","lowerCaseAttributeKey","toLowerCase","getTagsFromPropsList","tagName","approvedSeenTags","approvedTags","instanceTags","instanceSeenTags","primaryAttributeKey","attributeKey","tagUnion","property","rafPolyfill","now","callback","currentTime","setTimeout","cafPolyfill","id","clearTimeout","webkitRequestAnimationFrame","mozRequestAnimationFrame","global","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","msg","_helmetCallback","commitTagChanges","newState","cb","updateAttributes","updateTitle","tagUpdates","updateTags","addedTags","removedTags","_tagUpdates$tagType","newTags","oldTags","flattenArray","possibleArray","join","attributes","elementTag","getElementsByTagName","helmetAttributeString","getAttribute","helmetAttributes","split","attributesToRemove","attributeKeys","attribute","setAttribute","indexToSave","_i","removeAttribute","tags","headElement","head","querySelector","tagNodes","querySelectorAll","slice","indexToDelete","newElement","styleSheet","appendChild","createTextNode","some","existingTag","isEqualNode","parentNode","removeChild","generateElementAttributesAsString","attr","convertElementAttributestoReactProps","initProps","getMethodsForTag","toComponent","_initProps","attributeString","flattenedTitle","generateTitleAsString","_mappedTag","mappedTag","mappedAttribute","content","dangerouslySetInnerHTML","__html","generateTagsAsReactComponent","attributeHtml","tagContent","isSelfClosing","generateTagsAsString","initAttributes","_ref$title","SEO","description","lang","site","useStaticQuery","metaDescription","siteMetadata","withPrefix","author","rel","g","Function","e"],"mappings":"6FAEA,SAASA,EAAgBC,GACvB,OAAOA,GAAoB,iBAAPA,GAAmB,YAAaA,EAAKA,EAAY,QAAIA,EAE3E,IAAIC,EAAQ,EAAQ,QAChBC,EAAiBH,EAAgBE,GACjCE,EAAeJ,EAAgB,EAAQ,SAC3C,SAASK,EAAgBC,EAAKC,EAAKC,GAWjC,OAVID,KAAOD,EACTG,OAAOC,eAAeJ,EAAKC,EAAK,CAC9BC,MAAOA,EACPG,YAAY,EACZC,cAAc,EACdC,UAAU,IAGZP,EAAIC,GAAOC,EAENF,EAOT,IAAIQ,IAAiC,oBAAXC,SAA0BA,OAAOC,WAAYD,OAAOC,SAASC,eA6EvFC,EAAOC,QA5EP,SAAwBC,EAAoBC,EAA2BC,GACrE,GAAkC,mBAAvBF,EACT,MAAM,IAAIG,MAAM,iDAElB,GAAyC,mBAA9BF,EACT,MAAM,IAAIE,MAAM,wDAElB,QAAgC,IAArBD,G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E2G,SAAW,iBACX4E,QAASe,GAEX,CACE3F,SAAU,WACV4E,QAAS,4BAA4BiB,qBAAW,aAElD,CACE7F,SAAU,sBACV4E,QAAS,6BAA6BiB,qBAAW,aAEnD,CACE7F,SAAW,UACX4E,QAAU,WAEZ,CACEzU,KAAO,eACPyU,QAAU,uBAEZ,CACEzU,KAAM,gBACNyU,QAAS,6BAA6BiB,qBAAW,aAEnD,CACE1V,KAAO,kBACPyU,QAASa,EAAKG,aAAaE,QAE7B,CACE3V,KAAO,gBACPyU,QAASvL,GAEX,CACElJ,KAAO,sBACPyU,QAASe,IAEXnP,OAAOwC,GACTD,KAAM,CACJ,CACEgN,IAAK,aACLhV,KAAM,oDAER,CACEgV,IAAK,aACLhV,KAAM,+EAER,CACEgV,IAAK,aACLhV,KAAM8U,qBAAW,eAEnB,CACEE,IAAK,aACLhV,KAAM8U,qBAAW,mBAQ3BP,EAAI/L,aAAe,CACjBiM,KAAO,KACPxM,KAAM,GACNuM,YAAc,IAUDD,O,mBCtHf,IAAIU,EAGJA,EAAI,WACH,OAAOpX,KADJ,GAIJ,IAECoX,EAAIA,GAAK,IAAIC,SAAS,cAAb,GACR,MAAOC,GAEc,iBAAX3Y,SAAqByY,EAAIzY,QAOrCG,EAAOC,QAAUqY","file":"commons-655d6eaacc365f66f462.js","sourcesContent":["'use strict';\n\nfunction _interopDefault(ex) {\n return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;\n}\nvar React = require('react');\nvar React__default = _interopDefault(React);\nvar shallowEqual = _interopDefault(require('shallowequal'));\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {\n throw new Error('Expected mapStateOnServer to either be undefined or a function.');\n }\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n return function wrap(WrappedComponent) {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n var mountedInstances = [];\n var state;\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n if (SideEffect.canUseDOM) {\n handleStateChangeOnClient(state);\n } else if (mapStateOnServer) {\n state = mapStateOnServer(state);\n }\n }\n var SideEffect = /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(SideEffect, _Component);\n function SideEffect() {\n return _Component.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n // Expose canUseDOM so tests can monkeypatch it\n SideEffect.peek = function peek() {\n return state;\n };\n SideEffect.rewind = function rewind() {\n if (SideEffect.canUseDOM) {\n throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');\n }\n var recordedState = state;\n state = undefined;\n mountedInstances = [];\n return recordedState;\n };\n var _proto = SideEffect.prototype;\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return !shallowEqual(nextProps, this.props);\n };\n _proto.componentWillMount = function componentWillMount() {\n mountedInstances.push(this);\n emitChange();\n };\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n _proto.render = function render() {\n return React__default.createElement(WrappedComponent, this.props);\n };\n return SideEffect;\n }(React.Component);\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n _defineProperty(SideEffect, \"canUseDOM\", canUseDOM);\n return SideEffect;\n };\n}\nmodule.exports = withSideEffect;","import React from 'react';\nimport SideMenuInner from './sidemenu-inner';\n\nexport default (props) => {\n\n const { post } = props;\n\n return (
            \n
            \n
            \n \n
            \n
            \n \n
            \n
            \n
            \n GitHub\n Download\n
            \n

            version 1.3.2

            \n
            \n
            \n
            \n
            )\n}","import React from 'react';\nimport { Link } from 'gatsby';\n\nimport Logo from './logo.svg';\nimport Offcanvas from './offcanvas';\n\nexport default (props) => {\n\n\n const [className, setClassName] = React.useState(props.className ? props.className : 'header is-sticky is-ghost');\n const [isOpen, setIsOpen] = React.useState(false);\n\n if (!props.className) {\n React.useEffect(() => {\n window.addEventListener('scroll', function () {\n if (window.pageYOffset > 50) {\n setClassName('header is-sticky is-ghost active');\n } else {\n setClassName('header is-sticky is-ghost');\n }\n });\n }, []);\n }\n\n return (<>\n {\n setIsOpen(false);\n }}\n />\n
            \n

            \"SmartBlock\"

            \n \n \n
            \n );\n}","import React from 'react';\nimport { Link } from 'gatsby';\n\nimport Logo from './footer_logo.svg';\n\n\nexport default () => {\n\n return (<>\n
            \n
            \n
            \n

            Document

            \n

            Usage, introduction of other functions, component introduction etc.
            are described in detail in the document.

            \n

            Get Started

            \n
            \n
            \n
            \n
            \n

            View on GitHub

            \n

            SmartBlock was developed by @appleplecom and is open source (MIT license) on GitHub.
            Please send us feedback, requests, bug reports and pull requests!

            \n

            If you like it, please press Star ;)

            \n

            GitHub page

            \n
            \n
            \n
            \n
            \n
            \n

            If you like our project, we glad to have star! :)

            \n GitHub\n
            \n
            \n
            \n
            \n \"SmartBlock\"\n

            A modern block styled editor built with React.
            SmartBlock is provided with MIT license. Made by @appleple ♥ OSS

            \n
            \n
            \n );\n}","import React from \"react\"\n\nimport Header from './header';\nimport Footer from './footer';\n\nclass Layout extends React.Component {\n render() {\n const { children, post } = this.props\n const className = post ? 'header is-sticky is-ghost is-colored' : ''\n\n return (\n <>\n
            \n {children}\n