"use strict";(this.webpackChunk_gorgias_chat_client=this.webpackChunk_gorgias_chat_client||[]).push([[690],{2690:(e,t,n)=>{n.r(t),n.d(t,{ResizeObserver:()=>X,ResizeObserverEntry:()=>T});var r,i=[],o="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(r||(r={}));var s,a=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Object.freeze(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),c=function(e){return e instanceof SVGElement&&"getBBox"in e},u=function(e){if(c(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||e.getClientRects().length)},h=function(e){var t,n,r=null===(n=null===(t=e)||void 0===t?void 0:t.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(r&&e instanceof r.Element)},f="undefined"!==typeof window?window:{},d=new WeakMap,v=/auto|scroll/,l=/^tb|vertical/,p=/msie|trident/i.test(f.navigator&&f.navigator.userAgent),g=function(e){return parseFloat(e||"0")},b=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),Object.freeze({inlineSize:(n?t:e)||0,blockSize:(n?e:t)||0})},w=Object.freeze({devicePixelContentBoxSize:b(),borderBoxSize:b(),contentBoxSize:b(),contentRect:new a(0,0,0,0)}),E=function(e,t){if(void 0===t&&(t=!1),d.has(e)&&!t)return d.get(e);if(u(e))return d.set(e,w),w;var n=getComputedStyle(e),r=c(e)&&e.ownerSVGElement&&e.getBBox(),i=!p&&"border-box"===n.boxSizing,o=l.test(n.writingMode||""),s=!r&&v.test(n.overflowY||""),h=!r&&v.test(n.overflowX||""),f=r?0:g(n.paddingTop),E=r?0:g(n.paddingRight),x=r?0:g(n.paddingBottom),T=r?0:g(n.paddingLeft),z=r?0:g(n.borderTopWidth),m=r?0:g(n.borderRightWidth),y=r?0:g(n.borderBottomWidth),B=T+E,S=f+x,O=(r?0:g(n.borderLeftWidth))+m,R=z+y,k=h?e.offsetHeight-R-e.clientHeight:0,C=s?e.offsetWidth-O-e.clientWidth:0,_=i?B+O:0,N=i?S+R:0,D=r?r.width:g(n.width)-_-C,M=r?r.height:g(n.height)-N-k,P=D+B+C+O,F=M+S+k+R,I=Object.freeze({devicePixelContentBoxSize:b(Math.round(D*devicePixelRatio),Math.round(M*devicePixelRatio),o),borderBoxSize:b(P,F,o),contentBoxSize:b(D,M,o),contentRect:new a(T,f,D,M)});return d.set(e,I),I},x=function(e,t,n){var i=E(e,n),o=i.borderBoxSize,s=i.contentBoxSize,a=i.devicePixelContentBoxSize;switch(t){case r.DEVICE_PIXEL_CONTENT_BOX:return a;case r.BORDER_BOX:return o;default:return s}},T=function(e){var t=E(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=[t.borderBoxSize],this.contentBoxSize=[t.contentBoxSize],this.devicePixelContentBoxSize=[t.devicePixelContentBoxSize]},z=function(e){if(u(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},m=function(){var e=1/0,t=[];i.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new T(t.target),i=z(t.target);r.push(n),t.lastReportedSize=x(t.target,t.observedBox),ie?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},B=function(){var e=0;for(y(e);i.some((function(e){return e.activeTargets.length>0}));)e=m(),y(e);return i.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"===typeof ErrorEvent?e=new ErrorEvent("error",{message:o}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=o),window.dispatchEvent(e)}(),e>0},S=[],O=function(e){if(!s){var t=0,n=document.createTextNode("");new MutationObserver((function(){return S.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),s=function(){n.textContent=""+(t?t--:t++)}}S.push(e),s()},R=0,k={attributes:!0,characterData:!0,childList:!0,subtree:!0},C=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],_=function(e){return void 0===e&&(e=0),Date.now()+e},N=!1,D=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!N){N=!0;var n,r=_(e);n=function(){var n=!1;try{n=B()}finally{if(N=!1,e=r-_(),!R)return;n?t.run(1e3):e>0?t.run(e):t.start()}},O((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,k)};document.body?t():f.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),C.forEach((function(t){return f.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),C.forEach((function(t){return f.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),M=function(e){!R&&e>0&&D.start(),!(R+=e)&&D.stop()},P=function(){function e(e,t){this.target=e,this.observedBox=t||r.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=x(this.target,this.observedBox,!0);return e=this.target,c(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),F=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},I=new WeakMap,L=function(e,t){for(var n=0;n=0&&(o&&i.splice(i.indexOf(n),1),n.observationTargets.splice(r,1),M(-1))},e.disconnect=function(e){var t=this,n=I.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),X=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!==typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");W.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!h(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");W.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!h(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");W.unobserve(this,e)},e.prototype.disconnect=function(){W.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}()}}]); //# sourceMappingURL=690.95f8e9fb6cdb3632.js.map