r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Hr=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"range"===e.type||"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},Vr=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},qr=!1;if("undefined"!=typeof window)try{var Xr=Object.defineProperty({},"passive",{get:function(){return qr=!0,!0}});window.addEventListener("test",Xr,Xr),window.removeEventListener("test",Xr,Xr)}catch(e){qr=!1}var Kr=!!qr&&{passive:!1},Yr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Gr=function(e){return[e.deltaX,e.deltaY]},Qr=function(e){return e&&"current"in e?e.current:e},Zr=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Jr=0,eo=[];const to=(no=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(Jr++)[0],i=s.useState((function(){return Dr()}))[0],a=s.useRef(e);s.useEffect((function(){a.current=e}),[e]),s.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+o);var t=[e.lockRef.current].concat((e.shards||[]).map(Qr)).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-"+o)})),function(){document.body.classList.remove("block-interactivity-"+o),t.forEach((function(e){return e.classList.remove("allow-interactivity-"+o)}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=Yr(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-i[0],u="deltaY"in e?e.deltaY:l[1]-i[1],c=e.target,f=Math.abs(s)>Math.abs(u)?"h":"v",d=Wr(f,c);if(!d)return!0;if(d?o=f:(o="v"===f?"h":"v",d=Wr(f,c)),!d)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r,o){var i=r,a=n.target,l=t.contains(a),s=!1,u=i>0,c=0,f=0;do{var d=Vr(e,a),p=d[0],h=d[1]-d[2]-p;(p||h)&&Hr(e,a)&&(c+=h,f+=p),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(0===c||!1)||!u&&(0===f||!1))&&(s=!0),s}(p,t,e,"h"===p?s:u)}),[]),u=s.useCallback((function(e){var n=e;if(eo.length&&eo[eo.length-1]===i){var r="deltaY"in n?Gr(n):Yr(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.preventDefault();else if(!o){var s=(a.current.shards||[]).map(Qr).filter(Boolean).filter((function(e){return e.contains(n.target)}));(s.length>0?l(n,s[0]):!a.current.noIsolation)&&n.preventDefault()}}}),[]),c=s.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),f=s.useCallback((function(e){n.current=Yr(e),r.current=void 0}),[]),d=s.useCallback((function(t){c(t.type,Gr(t),t.target,l(t,e.lockRef.current))}),[]),p=s.useCallback((function(t){c(t.type,Yr(t),t.target,l(t,e.lockRef.current))}),[]);s.useEffect((function(){return eo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Kr),document.addEventListener("touchmove",u,Kr),document.addEventListener("touchstart",f,Kr),function(){eo=eo.filter((function(e){return e!==i})),document.removeEventListener("wheel",u,Kr),document.removeEventListener("touchmove",u,Kr),document.removeEventListener("touchstart",f,Kr)}}),[]);var h=e.removeScrollBar,g=e.inert;return s.createElement(s.Fragment,null,g?s.createElement(i,{styles:Zr(o)}):null,h?s.createElement(Ur,{gapMode:"margin"}):null)},jr.useMedium(no),Ir);var no,ro=s.forwardRef((function(e,t){return s.createElement(Ar,Or({},e,{ref:t,sideCar:to}))}));ro.classNames=Ar.classNames;const oo=ro,io=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?s.useLayoutEffect:()=>{},ao=u["useId".toString()]||(()=>{});let lo=0;function so(e){const[t,n]=s.useState(ao());return io((()=>{e||n((e=>null!=e?e:String(lo++)))}),[e]),e||(t?`radix-${t}`:"")}const uo=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=s.useState(),r=s.useRef({}),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[l,u]=function(e,t){return s.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect((()=>{const e=co(r.current);i.current="mounted"===l?e:"none"}),[l]),io((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=co(t);if(e)u("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))u("UNMOUNT");else{const e=r!==a;u(n&&e?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,u]),io((()=>{if(t){const e=e=>{const n=co(r.current).includes(e.animationName);e.target===t&&n&&u("ANIMATION_END")},n=e=>{e.target===t&&(i.current=co(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),i=we(r.ref,o.ref);return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:i}):null};function co(e){return(null==e?void 0:e.animationName)||"none"}uo.displayName="Presence";let fo=0;function po(){s.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:ho()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:ho()),fo++,()=>{1===fo&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),fo--}}),[])}function ho(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const go=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Ee:t;return s.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.as&&console.error(mo),s.createElement(i,xe({},o,{ref:n}))}))})),{}),mo="Warning: The `as` prop has been removed in favour of `asChild`. For details, see https://radix-ui.com/docs/primitives/overview/styling#changing-the-rendered-element",vo=s.forwardRef(((e,t)=>{var n,r;const{containerRef:o,style:i,...a}=e,l=null!==(n=null==o?void 0:o.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body,[,u]=s.useState({});return io((()=>{u({})}),[]),l?c.createPortal(s.createElement(go.div,xe({"data-radix-portal":""},a,{ref:t,style:l===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...i}:void 0})),l):null}));function yo(e){const t=s.useRef(e);return s.useEffect((()=>{t.current=e})),s.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}const bo={bubbles:!1,cancelable:!0},wo=s.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=s.useState(null),c=yo(o),f=yo(i),d=s.useRef(null),p=we(t,(e=>u(e))),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect((()=>{if(r){function e(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:So(d.current,{select:!0})}function t(e){!h.paused&&l&&(l.contains(e.relatedTarget)||So(d.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,h.paused]),s.useEffect((()=>{if(l){_o.add(h);const e=document.activeElement;if(!l.contains(e)){const t=new Event("focusScope.autoFocusOnMount",bo);l.addEventListener("focusScope.autoFocusOnMount",c),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(So(r,{select:t}),document.activeElement!==n)return}(xo(l).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&So(l))}return()=>{l.removeEventListener("focusScope.autoFocusOnMount",c),setTimeout((()=>{const t=new Event("focusScope.autoFocusOnUnmount",bo);l.addEventListener("focusScope.autoFocusOnUnmount",f),l.dispatchEvent(t),t.defaultPrevented||So(null!=e?e:document.body,{select:!0}),l.removeEventListener("focusScope.autoFocusOnUnmount",f),_o.remove(h)}),0)}}}),[l,c,f,h]);const g=s.useCallback((e=>{if(!n&&!r)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=xo(e);return[Eo(t,e),Eo(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&So(i,{select:!0})):(e.preventDefault(),n&&So(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,h.paused]);return s.createElement(go.div,xe({tabIndex:-1},a,{ref:p,onKeyDown:g}))}));function xo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Eo(e,t){for(const n of e)if(!ko(n,{upTo:t}))return n}function ko(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function So(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const _o=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=Oo(e,t),e.unshift(t)},remove(t){var n;e=Oo(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function Oo(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function Co(e){const t=yo(e);s.useEffect((()=>{const e=e=>{"Escape"===e.key&&t(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[t])}let Po,Lo=0;function To(e,t){const n=s.createContext(t);function r(e){const{children:t,...r}=e,o=s.useMemo((()=>r),Object.values(r));return s.createElement(n.Provider,{value:o},t)}return r.displayName=e+"Provider",[r,function(r){const o=s.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function jo(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>s.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return s.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=s.createContext(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,l=(null==n?void 0:n[e][i])||o,u=s.useMemo((()=>a),Object.values(a));return s.createElement(l.Provider,{value:u},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const l=(null==a?void 0:a[e][i])||o,u=s.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Ro(r,...t)]}function Ro(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return s.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function Ao(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const[Io,Mo]=Ho(),[Do,No]=Vo(),[Fo,zo]=Ho(),[$o,Bo]=Vo(),Uo=s.forwardRef(((e,t)=>{const n=0===No(),r=s.createElement(Wo,xe({},e,{ref:t}));return n?s.createElement(Io,null,s.createElement(Fo,null,r)):r})),Wo=s.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,c=Mo(),f=No()+1,d=f===c,p=zo(n),h=Bo()+(n?1:0),g=h{const e=e=>{const r="mouse"===e.pointerType;t.current=!r,n.current=r&&0===e.button},r=()=>{t.current=!1,n.current=!1};return document.addEventListener("pointerdown",e),document.addEventListener("pointerup",r),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("pointerup",r)}}),[]),io((()=>{if(e){function r(){Lo--,0===Lo&&(document.body.style.pointerEvents=Po)}return 0===Lo&&(Po=document.body.style.pointerEvents),document.body.style.pointerEvents="none",Lo++,()=>{t.current?document.addEventListener("click",r,{once:!0}):n.current?document.addEventListener("pointerup",r,{once:!0}):r()}}}),[e])})({disabled:n}),Co((e=>{d&&(null==r||r(e),e.defaultPrevented||null==l||l())}));const{onPointerDownCapture:m}=function(e){const t=yo((e=>{g||(null==o||o(e),null==a||a(e),e.defaultPrevented||null==l||l())})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{const r=e.target;if(r&&!n.current){const n=new CustomEvent("dismissableLayer.pointerDownOutside",{bubbles:!1,cancelable:!0,detail:{originalEvent:e}});r.addEventListener("dismissableLayer.pointerDownOutside",t,{once:!0}),r.dispatchEvent(n)}n.current=!1},r=window.setTimeout((()=>{document.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),document.removeEventListener("pointerdown",e)}}),[t]),{onPointerDownCapture:()=>n.current=!0}}(),{onBlurCapture:v,onFocusCapture:y}=function(e){const t=yo((e=>{null==i||i(e),null==a||a(e),e.defaultPrevented||null==l||l()})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{const r=e.target;if(r&&!n.current){const n=new CustomEvent("dismissableLayer.focusOutside",{bubbles:!1,cancelable:!0,detail:{originalEvent:e}});r.addEventListener("dismissableLayer.focusOutside",t,{once:!0}),r.dispatchEvent(n)}};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)}),[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(),b=p>0&&!g;return s.createElement(Do,{runningCount:f},s.createElement($o,{runningCount:h},s.createElement(go.div,xe({},u,{ref:t,style:{pointerEvents:b?"auto":void 0,...u.style},onPointerDownCapture:Ao(e.onPointerDownCapture,m),onBlurCapture:Ao(e.onBlurCapture,v),onFocusCapture:Ao(e.onFocusCapture,y)}))))}));function Ho(e){const[t,n]=To("TotalLayerCount",{total:0,onTotalIncrease:()=>{},onTotalDecrease:()=>{}});return[({children:e})=>{const[n,r]=s.useState(0);return s.createElement(t,{total:n,onTotalIncrease:s.useCallback((()=>r((e=>e+1))),[]),onTotalDecrease:s.useCallback((()=>r((e=>e-1))),[])},e)},function(e=!0){const{total:t,onTotalIncrease:r,onTotalDecrease:o}=n("TotalLayerCountConsumer");return s.useLayoutEffect((()=>{if(e)return r(),()=>o()}),[e,r,o]),t}]}function Vo(e){const[t,n]=To("RunningLayerCount",{count:0});return[e=>{const{children:n,runningCount:r}=e;return s.createElement(t,{count:r},n)},function(){return n("RunningLayerCountConsumer").count||0}]}const qo=s.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return s.createElement(go.svg,xe({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:s.createElement("polygon",{points:"0,0 30,0 15,10"}))}));function Xo(e){const[t,n]=s.useState(void 0);return s.useEffect((()=>{if(e){const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else{const t=e.getBoundingClientRect();o=t.width,i=t.height}n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>{n(void 0),t.unobserve(e)}}}),[e]),t}let Ko;const Yo=new Map;function Go(){const e=[];Yo.forEach(((t,n)=>{const r=n.getBoundingClientRect();var o,i;i=r,((o=t.rect).width!==i.width||o.height!==i.height||o.top!==i.top||o.right!==i.right||o.bottom!==i.bottom||o.left!==i.left)&&(t.rect=r,e.push(t))})),e.forEach((e=>{e.callbacks.forEach((t=>t(e.rect)))})),Ko=requestAnimationFrame(Go)}function Qo(e){const[t,n]=s.useState();return s.useEffect((()=>{if(e){const t=function(e,t){const n=Yo.get(e);return void 0===n?(Yo.set(e,{rect:{},callbacks:[t]}),1===Yo.size&&(Ko=requestAnimationFrame(Go))):(n.callbacks.push(t),t(e.getBoundingClientRect())),()=>{const n=Yo.get(e);if(void 0===n)return;const r=n.callbacks.indexOf(t);r>-1&&n.callbacks.splice(r,1),0===n.callbacks.length&&(Yo.delete(e),0===Yo.size&&cancelAnimationFrame(Ko))}}(e,n);return()=>{n(void 0),t()}}}),[e]),t}function Zo({anchorRect:e,popperSize:t,arrowSize:n,arrowOffset:r=0,side:o,sideOffset:i=0,align:a,alignOffset:l=0,shouldAvoidCollisions:s=!0,collisionBoundariesRect:u,collisionTolerance:c=0}){if(!e||!t||!u)return{popperStyles:ni,arrowStyles:ri};const f=function(e,t,n=0,r=0,o){const i=o?o.height:0,a=Jo(t,e,"x"),l=Jo(t,e,"y"),s=l.before-n-i,u=l.after+n+i,c=a.before-n-i,f=a.after+n+i;return{top:{start:{x:a.start+r,y:s},center:{x:a.center,y:s},end:{x:a.end-r,y:s}},right:{start:{x:f,y:l.start+r},center:{x:f,y:l.center},end:{x:f,y:l.end-r}},bottom:{start:{x:a.start+r,y:u},center:{x:a.center,y:u},end:{x:a.end-r,y:u}},left:{start:{x:c,y:l.start+r},center:{x:c,y:l.center},end:{x:c,y:l.end-r}}}}(t,e,i,l,n),d=f[o][a];if(!1===s){const e=ei(d);let i=ri;return n&&(i=oi({popperSize:t,arrowSize:n,arrowOffset:r,side:o,align:a})),{popperStyles:{...e,"--radix-popper-transform-origin":ti(t,o,a,r,n)},arrowStyles:i,placedSide:o,placedAlign:a}}const p=DOMRect.fromRect({...t,...d}),h=(g=u,m=c,DOMRect.fromRect({width:g.width-2*m,height:g.height-2*m,x:g.left+m,y:g.top+m}));var g,m;const v=li(p,h),y=f[ai(o)][a],b=function(e,t,n){const r=ai(e);return t[e]&&!n[r]?r:e}(o,v,li(DOMRect.fromRect({...t,...y}),h)),w=function(e,t,n,r,o){const i="top"===n||"bottom"===n,a=i?"left":"top",l=i?"right":"bottom",s=i?"width":"height",u=t[s]>e[s];return"start"!==r&&"center"!==r||!(o[a]&&u||o[l]&&!u)?"end"!==r&&"center"!==r||!(o[l]&&u||o[a]&&!u)?r:"start":"end"}(t,e,o,a,v),x=ei(f[b][w]);let E=ri;return n&&(E=oi({popperSize:t,arrowSize:n,arrowOffset:r,side:b,align:w})),{popperStyles:{...x,"--radix-popper-transform-origin":ti(t,b,w,r,n)},arrowStyles:E,placedSide:b,placedAlign:w}}function Jo(e,t,n){const r=e["x"===n?"left":"top"],o="x"===n?"width":"height",i=e[o],a=t[o];return{before:r-a,start:r,center:r+(i-a)/2,end:r+i-a,after:r+i}}function ei(e){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(e.x+window.scrollX)}px, ${Math.round(e.y+window.scrollY)}px, 0)`}}function ti(e,t,n,r,o){const i="top"===t||"bottom"===t,a=o?o.width:0,l=o?o.height:0,s=a/2+r;let u="",c="";return i?(u={start:`${s}px`,center:"center",end:e.width-s+"px"}[n],c="top"===t?`${e.height+l}px`:-l+"px"):(u="left"===t?`${e.width+l}px`:-l+"px",c={start:`${s}px`,center:"center",end:e.height-s+"px"}[n]),`${u} ${c}`}const ni={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},ri={position:"absolute",opacity:0};function oi({popperSize:e,arrowSize:t,arrowOffset:n,side:r,align:o}){const i=(e.width-t.width)/2,a=(e.height-t.width)/2,l={top:0,right:90,bottom:180,left:-90}[r],s=Math.max(t.width,t.height),u={width:`${s}px`,height:`${s}px`,transform:`rotate(${l}deg)`,willChange:"transform",position:"absolute",[r]:"100%",direction:ii(r,o)};return"top"!==r&&"bottom"!==r||("start"===o&&(u.left=`${n}px`),"center"===o&&(u.left=`${i}px`),"end"===o&&(u.right=`${n}px`)),"left"!==r&&"right"!==r||("start"===o&&(u.top=`${n}px`),"center"===o&&(u.top=`${a}px`),"end"===o&&(u.bottom=`${n}px`)),u}function ii(e,t){return("top"!==e&&"right"!==e||"end"!==t)&&("bottom"!==e&&"left"!==e||"end"===t)?"ltr":"rtl"}function ai(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function li(e,t){return{top:e.topt.right,bottom:e.bottom>t.bottom,left:e.left{const{__scopePopper:n,virtualRef:r,...o}=e,i=fi("PopperAnchor",n),a=s.useRef(null),l=we(t,a);return s.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:s.createElement(go.div,xe({},o,{ref:l}))})),[pi,hi]=si("PopperContent"),gi=s.forwardRef(((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o,align:i="center",alignOffset:a,collisionTolerance:l,avoidCollisions:u=!0,...c}=e,f=fi("PopperContent",n),[d,p]=s.useState(),h=Qo(f.anchor),[g,m]=s.useState(null),v=Xo(g),[y,b]=s.useState(null),w=Xo(y),x=we(t,(e=>m(e))),E=function(){const[e,t]=s.useState(void 0);return s.useEffect((()=>{let e;function n(){t({width:window.innerWidth,height:window.innerHeight})}function r(){window.clearTimeout(e),e=window.setTimeout(n,100)}return n(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)}),[]),e}(),k=E?DOMRect.fromRect({...E,x:0,y:0}):void 0,{popperStyles:S,arrowStyles:_,placedSide:O,placedAlign:C}=Zo({anchorRect:h,popperSize:v,arrowSize:w,arrowOffset:d,side:r,sideOffset:o,align:i,alignOffset:a,shouldAvoidCollisions:u,collisionBoundariesRect:k,collisionTolerance:l}),P=void 0!==O;return s.createElement("div",{style:S,"data-radix-popper-content-wrapper":""},s.createElement(pi,{scope:n,arrowStyles:_,onArrowChange:b,onArrowOffsetChange:p},s.createElement(go.div,xe({"data-side":O,"data-align":C},c,{style:{...c.style,animation:P?void 0:"none"},ref:x}))))})),mi=s.forwardRef((function(e,t){const{__scopePopper:n,offset:r,...o}=e,i=hi("PopperArrow",n),{onArrowOffsetChange:a}=i;return s.useEffect((()=>a(r)),[a,r]),s.createElement("span",{style:{...i.arrowStyles,pointerEvents:"none"}},s.createElement("span",{ref:i.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},s.createElement(qo,xe({},o,{ref:t,style:{...o.style,display:"block"}}))))})),vi=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return s.createElement(ci,{scope:t,anchor:r,onAnchorChange:o},n)},yi=di,bi=gi,wi=mi;function xi({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=s.useState(e),[r]=n,o=s.useRef(r),i=yo(t);return s.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=yo(n);return[a,s.useCallback((t=>{if(i){const n=t,r="function"==typeof t?n(e):t;r!==e&&l(r)}else o(t)}),[i,e,o,l])]}const[Ei,ki]=jo("Popover",[ui]),Si=ui(),[_i,Oi]=Ei("Popover"),Ci=s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=Oi("PopoverAnchor",n),i=Si(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=o;return s.useEffect((()=>(a(),()=>l())),[a,l]),s.createElement(yi,xe({},i,r,{ref:t}))})),Pi=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=Oi("PopoverContent",e.__scopePopover);return s.createElement(uo,{present:n||o.open},o.modal?s.createElement(Li,xe({},r,{ref:t})):s.createElement(Ti,xe({},r,{ref:t})))})),Li=s.forwardRef(((e,t)=>{const{allowPinchZoom:n,portalled:r=!0,...o}=e,i=Oi("PopoverContent",e.__scopePopover),a=s.useRef(null),l=we(t,a),u=s.useRef(!1);s.useEffect((()=>{const e=a.current;if(e)return _r(e)}),[]);const c=r?vo:s.Fragment;return s.createElement(c,null,s.createElement(oo,{allowPinchZoom:n},s.createElement(ji,xe({},o,{ref:l,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ao(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),u.current||null===(t=i.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Ao(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;u.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:Ao(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})}))))})),Ti=s.forwardRef(((e,t)=>{const{portalled:n=!0,...r}=e,o=Oi("PopoverContent",e.__scopePopover),i=s.useRef(!1),a=n?vo:s.Fragment;return s.createElement(a,null,s.createElement(ji,xe({},r,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,r;null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),t.defaultPrevented||(i.current||null===(r=o.triggerRef.current)||void 0===r||r.focus(),t.preventDefault()),i.current=!1},onInteractOutside:t=>{var n,r;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||(i.current=!0);const a=t.target;(null===(r=o.triggerRef.current)||void 0===r?void 0:r.contains(a))&&t.preventDefault()}})))})),ji=s.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:f,...d}=e,p=Oi("PopoverContent",n),h=Si(n);return po(),s.createElement(wo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},s.createElement(Uo,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1)},s.createElement(bi,xe({"data-state":Ri(p.open),role:"dialog",id:p.contentId},h,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))}));function Ri(e){return e?"open":"closed"}const Ai=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,l=Si(t),u=s.useRef(null),[c,f]=s.useState(!1),[d=!1,p]=xi({prop:r,defaultProp:o,onChange:i});return s.createElement(vi,l,s.createElement(_i,{scope:t,contentId:so(),triggerRef:u,open:d,onOpenChange:p,onOpenToggle:s.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:c,onCustomAnchorAdd:s.useCallback((()=>f(!0)),[]),onCustomAnchorRemove:s.useCallback((()=>f(!1)),[]),modal:a},n))},Ii=Ci,Mi=Pi,Di=s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=Si(n);return s.createElement(wi,xe({},o,r,{ref:t}))}));function Ni(e){var t=fe(Ii,{position:"absolute",left:e.xAnchorCoordinate,top:e.yAnchorCoordinate}),n=fe(Di,{fill:"$grayBase"});return(0,Ie.jsxs)(Ai,{defaultOpen:!0,modal:!0,children:[(0,Ie.jsx)(t,{}),(0,Ie.jsxs)(Mi,{onOpenAutoFocus:function(t){e.preventAutoFocus&&t.preventDefault()},children:[e.children,(0,Ie.jsx)(n,{})]})]})}var Fi=fe("button",{fontFamily:"inter",fontSize:"$2",lineHeight:"1.25",color:"$grayText",variants:{style:{ctaYellow:{borderRadius:"$3",px:"$3",py:"$2",border:"1px solid $yellow3",bg:"$yellow3","&:hover":{bg:"$yellow4",border:"1px solid $grayBorderHover"}},ctaDarkYellow:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$omnivoreGray",bg:"$omnivoreCtaYellow",p:"10px 12px"},ctaLightGray:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$grayTextContrast",p:"10px 12px",bg:"rgb(125, 125, 125, 0.1)","&:hover":{bg:"rgb(47, 47, 47, 0.1)",".ctaButtonIcon":{visibility:"visible"}},".ctaButtonIcon":{visibility:"hidden"}},ctaGray:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$omnivoreGray",bg:"$grayBgActive",p:"10px 12px"},ctaWhite:{borderRadius:"$3",px:"$3",py:"$2",cursor:"pointer",border:"1px solid $grayBgSubtle",bg:"$grayBgSubtle","&:hover":{border:"1px solid $grayBorderHover"}},modalOption:{style:"ghost",height:"52px",width:"100%",textAlign:"left",verticalAlign:"middle",color:"#0A0806",backgroundColor:"unset",outlineColor:"rgba(0, 0, 0, 0)",border:"1px solid rgba(0, 0, 0, 0.06)",cursor:"pointer","&:focus":{outline:"none"}},ctaModal:{height:"32px",verticalAlign:"middle",color:"$textDefault",backgroundColor:"$grayBase",fontWeight:"600",padding:"0px 12px",fontSize:"16px",border:"1px solid $grayBorder",cursor:"pointer",borderRadius:"8px","&:focus":{outline:"none"}},ctaSecondary:{color:"$grayText",border:"none",bg:"transparent","&:hover":{opacity:.8}},ctaPill:{borderRadius:"$3",px:"$3",py:"$2",border:"1px solid $grayBorder",bg:"$grayBgActive","&:hover":{bg:"$grayBgHover",border:"1px solid $grayBorderHover"}},circularIcon:{mx:"$1",display:"flex",alignItems:"center",fontWeight:500,height:44,width:44,borderRadius:"50%",justifyContent:"center",textAlign:"center",background:"$grayBase",cursor:"pointer",border:"none",opacity:.9,"&:hover":{opacity:1}},squareIcon:{mx:"$1",display:"flex",alignItems:"center",fontWeight:500,height:44,width:44,justifyContent:"center",textAlign:"center",background:"$grayBase",cursor:"pointer",border:"none",borderRight:"1px solid $grayText",opacity:.9,"&:hover":{opacity:1}},plainIcon:{bg:"transparent",border:"none",cursor:"pointer","&:hover":{opacity:.8}},articleActionIcon:{bg:"transparent",border:"none",cursor:"pointer","&:hover":{opacity:.8}},ghost:{color:"transparent",border:"none",bg:"transparent","&:hover":{opacity:.8}},themeSwitch:{p:"0px",m:"4px",ml:"0px",width:"24px",height:"24px",fontSize:"14px",borderRadius:"4px",border:"1px solid rgb(243, 243, 243)","&:hover":{transform:"scale(1.2)"}}}},defaultVariants:{style:"ctaWhite"}});function zi(e){return(0,Ie.jsx)("svg",{width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ie.jsx)("path",{d:"M11.6663 8.33333L11.4163 14.1667M8.58301 14.1667L8.33301 8.33333M4.99967 5L5.70854 15.633C5.77858 16.6836 6.65119 17.5 7.70411 17.5H12.2952C13.3482 17.5 14.2208 16.6836 14.2908 15.633L14.9997 5M4.99967 5H7.49967M4.99967 5H3.33301M14.9997 5H16.6663M14.9997 5H12.4997M12.4997 5V4.5C12.4997 3.39543 11.6042 2.5 10.4997 2.5H9.49967C8.3951 2.5 7.49967 3.39543 7.49967 4.5V5M12.4997 5H7.49967",stroke:e.strokeColor,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})})}function $i(e){return e.color,e.height,e.width,(0,Ie.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ie.jsx)("path",{d:"M4.5 20.25H8.68934C8.78783 20.25 8.88536 20.2306 8.97635 20.1929C9.06735 20.1552 9.15003 20.1 9.21967 20.0303L18 11.25L12.75 6.00001L3.96967 14.7803C3.90003 14.85 3.84478 14.9327 3.80709 15.0237C3.80379 15.0316 3.80063 15.0396 3.79761 15.0477C3.76615 15.1317 3.75 15.2208 3.75 15.3107V19.5C3.75 19.6989 3.82902 19.8897 3.96967 20.0303C4.11032 20.171 4.30109 20.25 4.5 20.25Z",fill:"#FFD234"}),(0,Ie.jsx)("path",{d:"M15.2197 3.53034L12.75 6.00001L18 11.25L20.4697 8.78034C20.6103 8.63969 20.6893 8.44892 20.6893 8.25001C20.6893 8.0511 20.6103 7.86033 20.4697 7.71968L16.2803 3.53034C16.1397 3.38969 15.9489 3.31067 15.75 3.31067C15.5511 3.31067 15.3603 3.38969 15.2197 3.53034Z",fill:"#FFD234"}),(0,Ie.jsx)("path",{d:"M8.68934 20.25H4.5C4.30109 20.25 4.11032 20.171 3.96967 20.0303C3.82902 19.8897 3.75 19.6989 3.75 19.5V15.3107C3.75 15.2122 3.7694 15.1147 3.80709 15.0237C3.84478 14.9327 3.90003 14.85 3.96967 14.7803L15.2197 3.53034C15.3603 3.38969 15.5511 3.31067 15.75 3.31067C15.9489 3.31067 16.1397 3.38969 16.2803 3.53034L20.4697 7.71968C20.6103 7.86033 20.6893 8.0511 20.6893 8.25001C20.6893 8.44892 20.6103 8.63969 20.4697 8.78034L9.21967 20.0303C9.15003 20.1 9.06735 20.1552 8.97635 20.1929C8.88536 20.2306 8.78783 20.25 8.68934 20.25Z",stroke:"#0A0806",strokeOpacity:"0.8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Ie.jsx)("path",{d:"M12.75 6L18 11.25",stroke:"#0A0806",strokeOpacity:"0.8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Ie.jsx)("path",{d:"M8.95223 20.2021L3.79785 15.0477",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}var Bi=(0,s.createContext)({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Ui=function(e,t,n){var r=n.get(e);return r?r(t):(console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'),null)};function Wi(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var Hi=(0,s.forwardRef)((function(e,t){var n=e.alt,r=e.color,o=e.size,i=e.weight,a=e.mirrored,l=e.children,u=e.renderPath,c=Wi(e,["alt","color","size","weight","mirrored","children","renderPath"]),f=(0,s.useContext)(Bi),d=f.color,p=void 0===d?"currentColor":d,h=f.size,g=f.weight,m=void 0===g?"regular":g,v=f.mirrored,y=void 0!==v&&v,b=Wi(f,["color","size","weight","mirrored"]);return s.createElement("svg",Object.assign({ref:t,xmlns:"http://www.w3.org/2000/svg",width:null!=o?o:h,height:null!=o?o:h,fill:null!=r?r:p,viewBox:"0 0 256 256",transform:a||y?"scale(-1, 1)":void 0},b,c),!!n&&s.createElement("title",null,n),l,s.createElement("rect",{width:"256",height:"256",fill:"none"}),u(null!=i?i:m,null!=r?r:p))}));Hi.displayName="IconBase";const Vi=Hi;var qi=new Map;qi.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"96",y1:"108",x2:"160",y2:"108",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"96",y1:"148",x2:"116",y2:"148",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("path",{d:"M156.7,216H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8V156.7a7.9,7.9,0,0,1-2.3,5.6l-51.4,51.4A7.9,7.9,0,0,1,156.7,216Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("polyline",{points:"215.3 156 156 156 156 215.3",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),qi.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("polygon",{points:"216 160 160 160 160 216 216 160",opacity:"0.2"}),s.createElement("line",{x1:"96",y1:"96",x2:"160",y2:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"128",x2:"160",y2:"128",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"160",x2:"128",y2:"160",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M156.7,216H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8V156.7a7.9,7.9,0,0,1-2.3,5.6l-51.4,51.4A7.9,7.9,0,0,1,156.7,216Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("polyline",{points:"215.3 160 160 160 160 215.3",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),qi.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.7a15.9,15.9,0,0,0,11.3-4.7L219.3,168a15.9,15.9,0,0,0,4.7-11.3V48A16,16,0,0,0,208,32ZM96,88h64a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16Zm32,80H96a8,8,0,0,1,0-16h32a8,8,0,0,1,0,16ZM96,136a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm64,68.7V160h44.7Z"}))})),qi.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"96",y1:"96",x2:"160",y2:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"96",y1:"128",x2:"160",y2:"128",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"96",y1:"160",x2:"128",y2:"160",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("path",{d:"M156.7,216H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8V156.7a7.9,7.9,0,0,1-2.3,5.6l-51.4,51.4A7.9,7.9,0,0,1,156.7,216Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("polyline",{points:"215.3 160 160 160 160 215.3",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),qi.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"96",y1:"96",x2:"160",y2:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"96",y1:"128",x2:"160",y2:"128",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"96",y1:"160",x2:"128",y2:"160",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("path",{d:"M156.7,216H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8V156.7a7.9,7.9,0,0,1-2.3,5.6l-51.4,51.4A7.9,7.9,0,0,1,156.7,216Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("polyline",{points:"215.3 160 160 160 160 215.3",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),qi.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"96",y1:"96",x2:"160",y2:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"128",x2:"160",y2:"128",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"160",x2:"128",y2:"160",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M156.7,216H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8V156.7a7.9,7.9,0,0,1-2.3,5.6l-51.4,51.4A7.9,7.9,0,0,1,156.7,216Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("polyline",{points:"215.3 160 160 160 160 215.3",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var Xi=function(e,t){return Ui(e,t,qi)},Ki=(0,s.forwardRef)((function(e,t){return s.createElement(Vi,Object.assign({ref:t},e,{renderPath:Xi}))}));Ki.displayName="Note";const Yi=Ki;function Gi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qi(e){for(var t=1;t1)){var r,o=fr(e.split("|"));try{for(o.s();!(r=o.n()).done;){var a=r.value;i({type:vr.SET_KEY_UP,key:a})}}catch(e){o.e(e)}finally{o.f()}}})))}})),r}),[t]),l=(0,s.useCallback)((function(e){var t=e.target;if(e.key){var n=e.key.toLowerCase();void 0!==o[n]&&(!1===o[n]&&i({type:vr.SET_KEY_DOWN,key:n}),a(gr(gr({},o),{},mr({},n,!0)),yr.includes(t.tagName))&&e.preventDefault())}}),[a,o]),u=(0,s.useCallback)((function(e){if(e.key){var t=e.key.toLowerCase();void 0!==o[t]&&!0===o[t]&&setTimeout((function(){return i({type:vr.SET_KEY_UP,key:t})}),800)}}),[o]),(0,s.useEffect)((function(){if("undefined"!=typeof window)return window.addEventListener("keydown",l,!0),function(){return window.removeEventListener("keydown",l,!0)}}),[l]),(0,s.useEffect)((function(){if("undefined"!=typeof window)return window.addEventListener("keyup",u,!0),function(){return window.removeEventListener("keyup",u,!0)}}),[u]);var p=fe("div",{width:"1px",maxWidth:"1px",height:"100%",background:"$grayBorder"});return(0,Ie.jsxs)($e,{distribution:"evenly",alignment:"center",css:{height:"100%",alignItems:"center",width:e.isTouchscreenDevice?"100%":"auto"},children:[e.isNewHighlight?(0,Ie.jsx)(Fi,{style:"plainIcon",title:"Create Highlight",onClick:function(){return e.handleButtonClick("create")},css:{flexDirection:"column",height:"100%",m:0,p:0,alignItems:"baseline"},children:(0,Ie.jsxs)($e,{css:{height:"100%",alignItems:"center"},children:[(0,Ie.jsx)($i,{}),(0,Ie.jsx)(Nn,{style:"body",css:{pl:"12px",m:"0px",color:"$readerFont",fontWeight:"400",fontSize:"16px"},children:"Highlight"})]})}):(0,Ie.jsx)(Fi,{style:"plainIcon",title:"Remove Highlight",onClick:function(){return e.handleButtonClick("delete")},css:{color:"$readerFont",height:"100%",m:0,p:0,pt:"6px"},children:(0,Ie.jsx)(zi,{size:28,strokeColor:de.colors.readerFont.toString()})}),(0,Ie.jsx)(p,{}),(0,Ie.jsx)(Fi,{style:"plainIcon",title:"Add Note to Highlight",onClick:function(){return e.handleButtonClick("comment")},css:{color:"$readerFont",height:"100%",m:0,p:0},children:(0,Ie.jsxs)($e,{css:{height:"100%",alignItems:"center"},children:[(0,Ie.jsx)(Yi,{size:24,color:de.colors.readerFont.toString()}),(0,Ie.jsx)(Nn,{style:"body",css:{pl:"12px",m:"0px",color:"$readerFont",fontWeight:"400",fontSize:"16px"},children:"Note"})]})})]})}function ta(e,t){e.forEach((function(e){var t,n=(t=e,Array.from(document.querySelectorAll("[".concat(Bn,"='").concat(t,"']")))),r=function(e){return Array.from(document.querySelectorAll("[".concat(Un,"='").concat(e,"']")))}(e);r.forEach((function(e){e.remove()})),n.forEach((function(e){if("IMG"===e.nodeName)e.classList.remove("highlight-image");else if(e.childNodes){for(;e.hasChildNodes();){var t=e.firstChild;if(t){if(e.removeChild(t),!e.parentNode)throw new Error("highlight span has no parent node");e.parentNode.insertBefore(t,e.nextSibling)}}e.remove()}else{var n,r=document.createTextNode(e.textContent||"");null===(n=e.parentElement)||void 0===n||n.replaceChild(r,e)}}))}))}var na,ra=new Uint8Array(16);function oa(){if(!na&&!(na="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return na(ra)}const ia=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,aa=function(e){return"string"==typeof e&&ia.test(e)};for(var la=[],sa=0;sa<256;++sa)la.push((sa+256).toString(16).substr(1));const ua=function(e,t,n){var r=(e=e||{}).random||(e.rng||oa)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(la[e[t+0]]+la[e[t+1]]+la[e[t+2]]+la[e[t+3]]+"-"+la[e[t+4]]+la[e[t+5]]+"-"+la[e[t+6]]+la[e[t+7]]+"-"+la[e[t+8]]+la[e[t+9]]+"-"+la[e[t+10]]+la[e[t+11]]+la[e[t+12]]+la[e[t+13]]+la[e[t+14]]+la[e[t+15]]).toLowerCase();if(!aa(n))throw TypeError("Stringified UUID is invalid");return n}(r)};let ca=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),"");function fa(e){var t=e.startContainer.nodeValue,n=e.endContainer.nodeValue,r=pa(e.startOffset,!1,t),o=pa(e.endOffset,!0,n);try{e.setStart(e.startContainer,r),e.setEnd(e.endContainer,o)}catch(e){console.warn("Unable to snap selection to the next word")}}var da=function(e){return!!e&&/\s/.test(e)};function pa(e,t,n){if(!n)return e;var r=n.split(""),o=e;if(t){if(da(r[o-1]))return o-1;for(;o0;){if(da(r[o-1]))return o;o--}}return o}function ha(e){return function(e){if(Array.isArray(e))return ga(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ga(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ga(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ga(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,o=t.selection,i=o.range,a=o.selection,fa(i),l=ua(),s=Yn(i),rr(s)){e.next=9;break}return e.abrupt("return",{errorMessage:"Highlight is too long"});case 9:if(a.isCollapsed||a.collapseToStart(),u=[],t.annotation&&u.push(t.annotation),r&&(t.selection.overlapHighlights.forEach((function(e){var n=t.existingHighlights.find((function(t){return t.id===e})),r=null==n?void 0:n.annotation;r&&u.push(r)})),ta(t.selection.overlapHighlights,t.highlightStartEndOffsets)),c=Kn(s,l,u.length>0),f={prefix:c.prefix,suffix:c.suffix,quote:c.quote,id:l,shortId:ca(8),patch:s,annotation:u.length>0?u.join("\n"):void 0,articleId:t.articleId},p=t.existingHighlights,!r){e.next=23;break}return e.next=19,n.mergeHighlightMutation(va(va({},f),{},{overlapHighlightIdList:t.selection.overlapHighlights}));case 19:d=e.sent,p=t.existingHighlights.filter((function(e){return!t.selection.overlapHighlights.includes(e.id)})),e.next=26;break;case 23:return e.next=25,n.createHighlightMutation(f);case 25:d=e.sent;case 26:if(!d){e.next=31;break}return h=[].concat(ha(p),[d]),e.abrupt("return",{highlights:h,newHighlightIndex:h.length>0?h.length-1:void 0});case 31:return e.abrupt("return",{highlights:t.existingHighlights,errorMessage:"Could not create highlight"});case 32:case"end":return e.stop()}}),e)})))).apply(this,arguments)}const ka=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Ee:t;return s.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),s.createElement(i,xe({},o,{ref:n}))}))})),{}),Sa=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=s.useState(),r=s.useRef({}),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[l,u]=function(e,t){return s.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect((()=>{const e=_a(r.current);i.current="mounted"===l?e:"none"}),[l]),io((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=_a(t);if(e)u("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))u("UNMOUNT");else{const e=r!==a;u(n&&e?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,u]),io((()=>{if(t){const e=e=>{const n=_a(r.current).includes(e.animationName);e.target===t&&n&&u("ANIMATION_END")},n=e=>{e.target===t&&(i.current=_a(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),i=we(r.ref,o.ref);return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:i}):null};function _a(e){return(null==e?void 0:e.animationName)||"none"}Sa.displayName="Presence";const Oa={bubbles:!1,cancelable:!0},Ca=s.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=s.useState(null),c=yo(o),f=yo(i),d=s.useRef(null),p=we(t,(e=>u(e))),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect((()=>{if(r){function e(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:ja(d.current,{select:!0})}function t(e){!h.paused&&l&&(l.contains(e.relatedTarget)||ja(d.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,h.paused]),s.useEffect((()=>{if(l){Ra.add(h);const e=document.activeElement;if(!l.contains(e)){const t=new Event("focusScope.autoFocusOnMount",Oa);l.addEventListener("focusScope.autoFocusOnMount",c),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ja(r,{select:t}),document.activeElement!==n)return}(Pa(l).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&ja(l))}return()=>{l.removeEventListener("focusScope.autoFocusOnMount",c),setTimeout((()=>{const t=new Event("focusScope.autoFocusOnUnmount",Oa);l.addEventListener("focusScope.autoFocusOnUnmount",f),l.dispatchEvent(t),t.defaultPrevented||ja(null!=e?e:document.body,{select:!0}),l.removeEventListener("focusScope.autoFocusOnUnmount",f),Ra.remove(h)}),0)}}}),[l,c,f,h]);const g=s.useCallback((e=>{if(!n&&!r)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=Pa(e);return[La(t,e),La(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&ja(i,{select:!0})):(e.preventDefault(),n&&ja(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,h.paused]);return s.createElement(ka.div,xe({tabIndex:-1},a,{ref:p,onKeyDown:g}))}));function Pa(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function La(e,t){for(const n of e)if(!Ta(n,{upTo:t}))return n}function Ta(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function ja(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const Ra=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=Aa(e,t),e.unshift(t)},remove(t){var n;e=Aa(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function Aa(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}let Ia,Ma=0;const Da=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Na=s.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,c=s.useContext(Da),[f,d]=s.useState(null),[,p]=s.useState({}),h=we(t,(e=>d(e))),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(m),y=f?g.indexOf(f):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,x=function(e){const t=yo((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));w&&!n&&(null==o||o(e),null==a||a(e),e.defaultPrevented||null==l||l())})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{e.target&&!n.current&&za("dismissableLayer.pointerDownOutside",t,{originalEvent:e}),n.current=!1},r=window.setTimeout((()=>{document.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),document.removeEventListener("pointerdown",e)}}),[t]),{onPointerDownCapture:()=>n.current=!0}}(),E=function(e){const t=yo((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==a||a(e),e.defaultPrevented||null==l||l())})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{e.target&&!n.current&&za("dismissableLayer.focusOutside",t,{originalEvent:e})};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)}),[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}();return Co((e=>{y===c.layers.size-1&&(null==r||r(e),e.defaultPrevented||null==l||l())})),function({disabled:e}){const t=s.useRef(!1);io((()=>{if(e){function n(){Ma--,0===Ma&&(document.body.style.pointerEvents=Ia)}function r(e){t.current="mouse"!==e.pointerType}return 0===Ma&&(Ia=document.body.style.pointerEvents),document.body.style.pointerEvents="none",Ma++,document.addEventListener("pointerup",r),()=>{t.current?document.addEventListener("click",n,{once:!0}):n(),document.removeEventListener("pointerup",r)}}}),[e])}({disabled:n}),s.useEffect((()=>{f&&(n&&c.layersWithOutsidePointerEventsDisabled.add(f),c.layers.add(f),Fa())}),[f,n,c]),s.useEffect((()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),Fa())}),[f,c]),s.useEffect((()=>{const e=()=>p({});return document.addEventListener("dismissableLayer.update",e),()=>document.removeEventListener("dismissableLayer.update",e)}),[]),s.createElement(ka.div,xe({},u,{ref:h,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:Ao(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Ao(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ao(e.onPointerDownCapture,x.onPointerDownCapture)}))}));function Fa(){const e=new Event("dismissableLayer.update");document.dispatchEvent(e)}function za(e,t,n){const r=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});return t&&r.addEventListener(e,t,{once:!0}),!r.dispatchEvent(o)}const $a=u["useId".toString()]||(()=>{});let Ba=0;function Ua(e){const[t,n]=s.useState($a());return io((()=>{e||n((e=>null!=e?e:String(Ba++)))}),[e]),e||(t?`radix-${t}`:"")}const[Wa,Ha]=jo("Dialog"),[Va,qa]=Wa("Dialog"),Xa=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=qa("DialogOverlay",e.__scopeDialog);return o.modal?s.createElement(Sa,{present:n||o.open},s.createElement(Ka,xe({},r,{ref:t}))):null})),Ka=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=qa("DialogOverlay",n);return s.createElement(oo,{as:Ee,allowPinchZoom:o.allowPinchZoom,shards:[o.contentRef]},s.createElement(ka.div,xe({"data-state":Ja(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))})),Ya=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=qa("DialogContent",e.__scopeDialog);return s.createElement(Sa,{present:n||o.open},o.modal?s.createElement(Ga,xe({},r,{ref:t})):s.createElement(Qa,xe({},r,{ref:t})))})),Ga=s.forwardRef(((e,t)=>{const n=qa("DialogContent",e.__scopeDialog),r=s.useRef(null),o=we(t,n.contentRef,r);return s.useEffect((()=>{const e=r.current;if(e)return _r(e)}),[]),s.createElement(Za,xe({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ao(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Ao(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Ao(e.onFocusOutside,(e=>e.preventDefault()))}))})),Qa=s.forwardRef(((e,t)=>{const n=qa("DialogContent",e.__scopeDialog),r=s.useRef(!1);return s.createElement(Za,xe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault()),r.current=!1},onInteractOutside:t=>{var o,i;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const a=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(a))&&t.preventDefault()}}))})),Za=s.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=qa("DialogContent",n),u=we(t,s.useRef(null));return po(),s.createElement(s.Fragment,null,s.createElement(Ca,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},s.createElement(Na,xe({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Ja(l.open)},a,{ref:u,onDismiss:()=>l.onOpenChange(!1)}))),!1)}));function Ja(e){return e?"open":"closed"}const[el,tl]=To("DialogTitleWarning",{contentName:"DialogContent",titleName:"DialogTitle",docsSlug:"dialog"}),nl=Xa,rl=Ya;var ol,il=fe((e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0,allowPinchZoom:l}=e,u=s.useRef(null),c=s.useRef(null),[f=!1,d]=xi({prop:r,defaultProp:o,onChange:i});return s.createElement(Va,{scope:t,triggerRef:u,contentRef:c,contentId:Ua(),titleId:Ua(),descriptionId:Ua(),open:f,onOpenChange:d,onOpenToggle:s.useCallback((()=>d((e=>!e))),[d]),modal:a,allowPinchZoom:l},n)}),{}),al=he({"0%":{opacity:0},"100%":{opacity:1}}),ll=fe(nl,{backgroundColor:"$overlay",width:"100vw",height:"100vh",position:"fixed",inset:0,"@media (prefers-reduced-motion: no-preference)":{animation:"".concat(al," 150ms cubic-bezier(0.16, 1, 0.3, 1)")}}),sl=(he({"0%":{opacity:0,transform:"translate(-50%, -48%) scale(.96)"},"100%":{opacity:1,transform:"translate(-50%, -50%) scale(1)"}}),fe(rl,{backgroundColor:"$grayBg",borderRadius:6,boxShadow:de.shadows.cardBoxShadow.toString(),position:"fixed","&:focus":{outline:"none"}})),ul=fe(sl,{top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"90vw",maxWidth:"600px",maxHeight:"85vh","@smDown":{maxWidth:"95%",width:"95%"}}),cl=fe("textarea",{outline:"none",border:"none",overflow:"auto",resize:"none",background:"unset",color:"$grayText",fontSize:"$3",fontFamily:"inter",lineHeight:"1.35","&::placeholder":{opacity:.7}});function fl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function dl(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function pl(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){dl(i,r,o,a,l,"next",e)}function l(e){dl(i,r,o,a,l,"throw",e)}a(void 0)}))}}function hl(e){return gl.apply(this,arguments)}function gl(){return gl=pl(regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,nt.gql)(ol||(ol=fl(["\n mutation UpdateHighlight($input: UpdateHighlightInput!) {\n updateHighlight(input: $input) {\n ... on UpdateHighlightSuccess {\n highlight {\n id\n }\n }\n\n ... on UpdateHighlightError {\n errorCodes\n }\n }\n }\n "]))),e.prev=1,e.next=4,pn(n,{input:t});case 4:return r=e.sent,o=r,e.abrupt("return",null==o?void 0:o.updateHighlight.highlight.id);case 9:return e.prev=9,e.t0=e.catch(1),e.abrupt("return",void 0);case 12:case"end":return e.stop()}}),e,null,[[1,9]])}))),gl.apply(this,arguments)}fe(cl,{borderRadius:"6px",border:"1px solid $grayBorder",p:"$3",fontSize:"$1"});let ml,vl,yl,bl={data:""},wl=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||bl,xl=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,El=/\/\*[^]*?\*\/|\s\s+|\n/g,kl=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?kl(a,i):i+"{"+kl(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=kl(a,t?t.replace(/([^,])+/g,(e=>i.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=kl.p?kl.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Sl={},_l=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+_l(e[n]);return t}return e},Ol=(e,t,n,r,o)=>{let i=_l(e),a=Sl[i]||(Sl[i]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(i));if(!Sl[a]){let t=i!==e?e:(e=>{let t,n=[{}];for(;t=xl.exec(e.replace(El,""));)t[4]?n.shift():t[3]?n.unshift(n[0][t[3]]=n[0][t[3]]||{}):n[0][t[1]]=t[2];return n[0]})(e);Sl[a]=kl(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}return((e,t,n)=>{-1==t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Sl[a],t,r),a},Cl=(e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":kl(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),"");function Pl(e){let t=this||{},n=e.call?e(t.p):e;return Ol(n.unshift?n.raw?Cl(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,wl(t.target),t.g,t.o,t.k)}function Ll(){return Ll=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2])||arguments[2],r=(0,s.useCallback)((function(r){var o=r.key.toLowerCase();if(e&&"enter"===o){if(n&&!r.metaKey&&!r.ctrlKey)return;e()}else t&&"escape"===o&&t()}),[t,e]);(0,s.useEffect)((function(){if("undefined"!=typeof window)return window.addEventListener("keydown",r),function(){window.removeEventListener("keydown",r)}}),[r])}((function(){h()}),void 0,!0),e.highlight&&(c=null===(r=e.highlight)||void 0===r?void 0:r.updatedAt,f="Updated ",(d=Math.ceil((new Date).valueOf()-new Date(c).valueOf())/1e3)<60?"".concat(f," a few seconds ago"):d<3600?"".concat(f," ").concat(Math.floor(d/60)," minutes ago"):d<86400?"".concat(f," ").concat(Math.floor(d/3600)," hours ago"):d<604800?"".concat(f," ").concat(Math.floor(d/86400)," days ago"):d<2592e3?"".concat(f," ").concat(Math.floor(d/604800)," weeks ago"):d<31536e3?"".concat(f," ").concat(Math.floor(d/2592e3)," months ago"):d<31536e4?"".concat(f," ").concat(Math.floor(d/31536e3)," years ago"):d<31536e5&&"".concat(f," ").concat(Math.floor(d/31536e4)," decades ago"));var c,f,d,p=(0,s.useCallback)((function(e){u(e.target.value)}),[u]),h=(0,s.useCallback)(ds(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l==(null===(n=e.highlight)||void 0===n?void 0:n.annotation)||null===(r=e.highlight)||void 0===r||!r.id){t.next=5;break}return t.next=3,hl({highlightId:null===(o=e.highlight)||void 0===o?void 0:o.id,annotation:l});case 3:t.sent?(e.onUpdate(us(us({},e.highlight),{},{annotation:l})),e.onOpenChange(!1)):as("Error updating your note",{position:"bottom-right"});case 5:if(e.highlight||!e.createHighlightForNote){t.next=12;break}return t.next=8,e.createHighlightForNote(l);case 8:t.sent?e.onOpenChange(!0):as("Error saving highlight",{position:"bottom-right"}),t.next=13;break;case 12:e.onOpenChange(!1);case 13:case"end":return t.stop()}}),t)}))),[l,e]);return(0,Ie.jsxs)(il,{defaultOpen:!0,onOpenChange:e.onOpenChange,children:[(0,Ie.jsx)(ll,{}),(0,Ie.jsx)(ul,{css:{overflow:"auto"},onPointerDownOutside:function(e){e.preventDefault()},children:(0,Ie.jsxs)(Be,{children:[(0,Ie.jsxs)($e,{distribution:"between",alignment:"center",css:{width:"100%"},children:[(0,Ie.jsx)(Nn,{style:"modalHeadline",css:{p:"16px"},children:"Notes"}),(0,Ie.jsx)(Fi,{css:{pt:"16px",pr:"16px"},style:"ghost",onClick:function(){e.onOpenChange(!1)},children:(0,Ie.jsx)(ls,{size:20,strokeColor:de.colors.grayText.toString()})})]}),(0,Ie.jsx)(Ne,{css:{width:"100%",height:"1px",opacity:"0.2",backgroundColor:de.colors.grayText.toString()}}),(0,Ie.jsx)(cl,{css:{mt:"$2",width:"95%",p:"0px",height:"$6",marginLeft:"16px"},autoFocus:!0,placeholder:"Add your note here",value:l,onChange:p,maxLength:4e3}),(0,Ie.jsx)(Ne,{css:{width:"100%",height:"1px",opacity:"0.2",backgroundColor:de.colors.grayText.toString()}}),(0,Ie.jsx)($e,{alignment:"end",distribution:"end",css:{width:"100%",padding:"22px 22px 20px 0"},children:(0,Ie.jsx)(Fi,{style:"ctaDarkYellow",onClick:h,children:"Save"})})]})})]})}function gs(e){var t,n=(0,s.useMemo)((function(){return e.highlight.quote.split("\n")}),[e.highlight.quote]),r=null!==(t=e.highlight.annotation)&&void 0!==t?t:"",o=fe(ze,{margin:"0px 24px 16px 24px",fontSize:"18px",lineHeight:"27px",color:"$textDefault",cursor:"pointer"});return(0,Ie.jsxs)(Be,{css:{width:"100%",boxSizing:"border-box"},children:[r&&(0,Ie.jsx)(De,{css:{p:"16px",m:"16px",ml:"24px",mr:"24px",borderRadius:"6px",bg:"$grayBase"},children:(0,Ie.jsx)(Nn,{style:"shareHighlightModalAnnotation",children:r})}),(0,Ie.jsxs)(o,{onClick:function(){e.scrollToHighlight&&e.scrollToHighlight(e.highlight.id)},children:[e.highlight.prefix,(0,Ie.jsx)(Ne,{css:{bg:"$highlightBackground",p:"1px",borderRadius:"2px"},children:n.map((function(e,t){return(0,Ie.jsxs)(s.Fragment,{children:[e,t!==n.length-1&&(0,Ie.jsxs)(Ie.Fragment,{children:[(0,Ie.jsx)("br",{}),(0,Ie.jsx)("br",{})]})]},t)}))}),e.highlight.suffix]}),(0,Ie.jsx)(De,{css:{p:"24px",pt:"0",width:"100%",boxSizing:"border-box"},children:e.author&&e.title&&(0,Ie.jsx)(Nn,{style:"highlightTitleAndAuthor",children:e.title+e.author})})]})}function ms(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function vs(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ms(i,r,o,a,l,"next",e)}function l(e){ms(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ys(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ns.createElement(ka.span,xe({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),Es=s.forwardRef(((e,t)=>{var n,r;const{containerRef:o,style:i,...a}=e,l=null!==(n=null==o?void 0:o.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body,[,u]=s.useState({});return io((()=>{u({})}),[]),l?c.createPortal(s.createElement(ka.div,xe({"data-radix-portal":""},a,{ref:t,style:l===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...i}:void 0})),l):null})),ks=s.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return s.createElement(ka.svg,xe({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:s.createElement("polygon",{points:"0,0 30,0 15,10"}))}));function Ss(e){const[t,n]=s.useState(void 0);return s.useEffect((()=>{if(e){const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else{const t=e.getBoundingClientRect();o=t.width,i=t.height}n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const[_s,Os]=jo("Popper"),[Cs,Ps]=_s("Popper"),Ls=s.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Ps("PopperAnchor",n),a=s.useRef(null),l=we(t,a);return s.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:s.createElement(ka.div,xe({},o,{ref:l}))})),[Ts,js]=_s("PopperContent"),Rs=s.forwardRef(((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o,align:i="center",alignOffset:a,collisionTolerance:l,avoidCollisions:u=!0,...c}=e,f=Ps("PopperContent",n),[d,p]=s.useState(),h=Qo(f.anchor),[g,m]=s.useState(null),v=Ss(g),[y,b]=s.useState(null),w=Ss(y),x=we(t,(e=>m(e))),E=function(){const[e,t]=s.useState(void 0);return s.useEffect((()=>{let e;function n(){t({width:window.innerWidth,height:window.innerHeight})}function r(){window.clearTimeout(e),e=window.setTimeout(n,100)}return n(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)}),[]),e}(),k=E?DOMRect.fromRect({...E,x:0,y:0}):void 0,{popperStyles:S,arrowStyles:_,placedSide:O,placedAlign:C}=Zo({anchorRect:h,popperSize:v,arrowSize:w,arrowOffset:d,side:r,sideOffset:o,align:i,alignOffset:a,shouldAvoidCollisions:u,collisionBoundariesRect:k,collisionTolerance:l}),P=void 0!==O;return s.createElement("div",{style:S,"data-radix-popper-content-wrapper":""},s.createElement(Ts,{scope:n,arrowStyles:_,onArrowChange:b,onArrowOffsetChange:p},s.createElement(ka.div,xe({"data-side":O,"data-align":C},c,{style:{...c.style,animation:P?void 0:"none"},ref:x}))))})),As=s.forwardRef((function(e,t){const{__scopePopper:n,offset:r,...o}=e,i=js("PopperArrow",n),{onArrowOffsetChange:a}=i;return s.useEffect((()=>a(r)),[a,r]),s.createElement("span",{style:{...i.arrowStyles,pointerEvents:"none"}},s.createElement("span",{ref:i.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},s.createElement(ks,xe({},o,{ref:t,style:{...o.style,display:"block"}}))))})),Is=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return s.createElement(Cs,{scope:t,anchor:r,onAnchorChange:o},n)},Ms=Ls,Ds=Rs,Ns=As;function Fs(e){const t=s.useRef({value:e,previous:e});return s.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const[zs,$s]=jo("Tooltip",[Os]),Bs=Os(),[Us,Ws]=zs("TooltipProvider",{isOpenDelayed:!0,delayDuration:700,onOpen:()=>{},onClose:()=>{}}),[Hs,Vs]=zs("Tooltip"),qs=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Vs("TooltipTrigger",n),i=Bs(n),a=we(t,o.onTriggerChange),l=s.useRef(!1),u=s.useCallback((()=>l.current=!1),[]);return s.useEffect((()=>()=>document.removeEventListener("mouseup",u)),[u]),s.createElement(Ms,xe({asChild:!0},i),s.createElement(ka.button,xe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:a,onMouseEnter:Ao(e.onMouseEnter,o.onTriggerEnter),onMouseLeave:Ao(e.onMouseLeave,o.onClose),onMouseDown:Ao(e.onMouseDown,(()=>{o.onClose(),l.current=!0,document.addEventListener("mouseup",u,{once:!0})})),onFocus:Ao(e.onFocus,(()=>{l.current||o.onOpen()})),onBlur:Ao(e.onBlur,o.onClose),onClick:Ao(e.onClick,(e=>{0===e.detail&&o.onClose()}))})))})),Xs=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=Vs("TooltipContent",e.__scopeTooltip);return s.createElement(Sa,{present:n||o.open},s.createElement(Ks,xe({ref:t},r)))})),Ks=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,portalled:i=!0,...a}=e,l=Vs("TooltipContent",n),u=Bs(n),c=i?Es:s.Fragment,{onClose:f}=l;return Co((()=>f())),s.useEffect((()=>(document.addEventListener("tooltip.open",f),()=>document.removeEventListener("tooltip.open",f))),[f]),s.createElement(c,null,s.createElement(Ys,{__scopeTooltip:n}),s.createElement(Ds,xe({"data-state":l.stateAttribute},u,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),s.createElement(Se,null,r),s.createElement(xs,{id:l.contentId,role:"tooltip"},o||r)))}));function Ys(e){const{__scopeTooltip:t}=e,n=Vs("CheckTriggerMoved",t),r=Qo(n.trigger),o=null==r?void 0:r.left,i=Fs(o),a=null==r?void 0:r.top,l=Fs(a),u=n.onClose;return s.useEffect((()=>{(void 0!==i&&i!==o||void 0!==l&&l!==a)&&u()}),[u,i,l,o,a]),null}const Gs=qs,Qs=Xs,Zs=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Bs(n);return s.createElement(Ns,xe({},o,r,{ref:t}))}));var Js=["children","active","tooltipContent","tooltipSide","arrowStyles"];function eu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tu(e){for(var t=1;t{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,delayDuration:a}=e,l=Ws("Tooltip",t),u=Bs(t),[c,f]=s.useState(null),d=Ua(),p=s.useRef(0),h=null!=a?a:l.delayDuration,g=s.useRef(!1),{onOpen:m,onClose:v}=l,[y=!1,b]=xi({prop:r,defaultProp:o,onChange:e=>{e&&(document.dispatchEvent(new CustomEvent("tooltip.open")),m()),null==i||i(e)}}),w=s.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),x=s.useCallback((()=>{window.clearTimeout(p.current),g.current=!1,b(!0)}),[b]),E=s.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{g.current=!0,b(!0)}),h)}),[h,b]);return s.useEffect((()=>()=>window.clearTimeout(p.current)),[]),s.createElement(Is,u,s.createElement(Hs,{scope:t,contentId:d,open:y,stateAttribute:w,trigger:c,onTriggerChange:f,onTriggerEnter:s.useCallback((()=>{l.isOpenDelayed?E():x()}),[l.isOpenDelayed,E,x]),onOpen:s.useCallback(x,[x]),onClose:s.useCallback((()=>{window.clearTimeout(p.current),b(!1),v()}),[b,v])},n))},su=Gs,uu=iu,cu=au,fu={backgroundColor:"#F9D354",color:"#0A0806"},du={fill:"#F9D354"},pu=function(e){var t=e.children,n=e.active,r=e.tooltipContent,o=e.tooltipSide,i=e.arrowStyles,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Js);return(0,Ie.jsxs)(lu,{open:n,children:[(0,Ie.jsx)(su,{asChild:!0,children:t}),(0,Ie.jsxs)(uu,tu(tu({sideOffset:5,side:o,style:fu},a),{},{children:[r,(0,Ie.jsx)(cu,{style:null!=i?i:du})]}))]})},hu=new Map;hu.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),hu.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",opacity:"0.2"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),hu.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M232,128a104.3,104.3,0,0,1-91.5,103.3,4.1,4.1,0,0,1-4.5-4V152h24a8,8,0,0,0,8-8.5,8.2,8.2,0,0,0-8.3-7.5H136V112a16,16,0,0,1,16-16h16a8,8,0,0,0,8-8.5,8.2,8.2,0,0,0-8.3-7.5H152a32,32,0,0,0-32,32v24H96a8,8,0,0,0-8,8.5,8.2,8.2,0,0,0,8.3,7.5H120v75.3a4,4,0,0,1-4.4,4C62.8,224.9,22,179,24.1,124.1A104,104,0,0,1,232,128Z"}))})),hu.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),hu.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),hu.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var gu=function(e,t){return Ui(e,t,hu)},mu=(0,s.forwardRef)((function(e,t){return s.createElement(Vi,Object.assign({ref:t},e,{renderPath:gu}))}));mu.displayName="FacebookLogo";const vu=mu;var yu=new Map;yu.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),yu.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",opacity:"0.2"}),s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),yu.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M245.7,77.7l-30.2,30.1C209.5,177.7,150.5,232,80,232c-14.5,0-26.5-2.3-35.6-6.8-7.3-3.7-10.3-7.6-11.1-8.8a8,8,0,0,1,3.9-11.9c.2-.1,23.8-9.1,39.1-26.4a108.6,108.6,0,0,1-24.7-24.4c-13.7-18.6-28.2-50.9-19.5-99.1a8.1,8.1,0,0,1,5.5-6.2,8,8,0,0,1,8.1,1.9c.3.4,33.6,33.2,74.3,43.8V88a48.3,48.3,0,0,1,48.6-48,48.2,48.2,0,0,1,41,24H240a8,8,0,0,1,7.4,4.9A8.4,8.4,0,0,1,245.7,77.7Z"}))})),yu.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),yu.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),yu.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var bu=function(e,t){return Ui(e,t,yu)},wu=(0,s.forwardRef)((function(e,t){return s.createElement(Vi,Object.assign({ref:t},e,{renderPath:bu}))}));wu.displayName="TwitterLogo";const xu=wu;function Eu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nt.start?1:0})).forEach((function(e){f>=e.start&&d<=e.end?h=!0:f<=e.end&&e.start<=d&&g.push(e)})),m=null,!g.length){t.next=21;break}if(x=!1,f<=g[0].start?(v=a.startContainer,y=a.startOffset):(E=tr(g[0].id),v=E.shift(),y=0),d>=g[g.length-1].end?(b=a.endContainer,w=a.endOffset):(k=tr(g[g.length-1].id),b=k.pop(),w=0,x=!0),v&&b){t.next=18;break}throw new Error("Failed to query node for computing new merged range");case 18:(m=new Range).setStart(v,y),x?m.setEndAfter(b):m.setEnd(b,w);case 21:if(!h){t.next=23;break}return t.abrupt("return",setTimeout((function(){o(null)}),100));case 23:return t.abrupt("return",o({selection:s,mouseEvent:n,range:null!==(r=m)&&void 0!==r?r:a,focusPosition:{x:p[l?"left":"right"],y:p[l?"top":"bottom"],isReverseSelected:l},overlapHighlights:g.map((function(e){return e.id}))}));case 24:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[e]);return(0,s.useEffect)((function(){return document.addEventListener("mouseup",i),document.addEventListener("touchend",i),document.addEventListener("contextmenu",i),function(){document.removeEventListener("mouseup",i),document.removeEventListener("touchend",i),document.removeEventListener("contextmenu",i)}}),[e,i,false]),[r,o]}(u),m=$u(g,2),v=m[0],y=m[1],b=(0,s.useMemo)((function(){var e;return"undefined"!=typeof window&&!(!wr()&&!(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document))&&"function"==typeof(null===(e=navigator)||void 0===e?void 0:e.share)}),[]);(0,s.useEffect)((function(){var t=[];if(n.forEach((function(e){try{var n=function(e){var t=function(e){return Kn(e.patch,e.id,!!e.annotation,void 0,void 0)}(e),n=t.startLocation,r=t.endLocation;return{id:e.id,start:n,end:r}}(e);t.push(n)}catch(e){console.error(e)}})),c(t),e.scrollToHighlight.current){var r=document.querySelector('[omnivore-highlight-id="'.concat(e.scrollToHighlight.current,'"]'));r&&r.scrollIntoView({behavior:"auto"})}}),[n,c]);var w=(0,s.useCallback)(function(){var t=zu(regeneratorRuntime.mark((function t(o){var i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=o||(null==p?void 0:p.id)){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,e.articleMutations.deleteHighlightMutation(i);case 5:t.sent?(ta(n.map((function(e){return e.id}))),r(n.filter((function(e){return e.id!==i}))),h(void 0)):console.error("Failed to delete highlight");case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[p,n,u]),x=(0,s.useCallback)((function(e){ta([e.id]);var t,o=n.filter((function(t){return t.id!==e.id}));r([].concat(function(e){if(Array.isArray(e))return Uu(e)}(t=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||Bu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e]))}),[n,u]),E=(0,s.useCallback)((function(t){var n;null===(n=navigator)||void 0===n||n.share({title:e.articleTitle,url:"".concat(e.highlightsBaseURL,"/").concat(t)}).then((function(){h(void 0)})).catch((function(e){console.log(e),h(void 0)}))}),[e.articleTitle,e.highlightsBaseURL]),k=(0,s.useCallback)((function(t){var n,r,o,i,l,s,u;void 0!==(null===(n=window)||void 0===n||null===(r=n.webkit)||void 0===r?void 0:r.messageHandlers.highlightAction)&&e.highlightBarDisabled?null===(o=window)||void 0===o||null===(i=o.webkit)||void 0===i||null===(l=i.messageHandlers.highlightAction)||void 0===l||l.postMessage({actionID:"annotate",annotation:null!==(s=null===(u=t.highlight)||void 0===u?void 0:u.annotation)&&void 0!==s?s:""}):(t.createHighlightForNote=function(){var e=zu(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.selectionData){e.next=2;break}return e.abrupt("return",void 0);case 2:return e.next=4,S(t.selectionData,n);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a(t))}),[e.highlightBarDisabled]),S=function(){var t=zu(regeneratorRuntime.mark((function t(o,i){var l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,xa({selection:o,articleId:e.articleId,existingHighlights:n,highlightStartEndOffsets:u,annotation:i},e.articleMutations);case 2:if((l=t.sent).highlights&&0!=l.highlights.length){t.next=6;break}return console.error("Failed to create highlight"),t.abrupt("return",void 0);case 6:if(y(null),r(l.highlights),void 0!==l.newHighlightIndex){t.next=11;break}return a({highlightModalAction:"none"}),t.abrupt("return",void 0);case 11:return t.abrupt("return",l.highlights[l.newHighlightIndex]);case 12:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),_=(0,s.useCallback)(function(){var e=zu(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,S(v,n);case 4:e.sent||as("Error saving highlight",{position:"bottom-right"});case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[E,n,k,e.articleId,v,y,b,u]),O=(0,s.useCallback)((function(e){var t=e.target,r=e.pageX,o=e.pageY;if(t&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE)if(f.current={pageX:r,pageY:o},t.hasAttribute(Bn)){var i=t.getAttribute(Bn),a=n.find((function(e){return e.id===i}));if(a){var l,s,u,c=t.getBoundingClientRect();null===(l=window)||void 0===l||null===(s=l.webkit)||void 0===s||null===(u=s.messageHandlers.viewerAction)||void 0===u||u.postMessage({actionID:"showMenu",rectX:c.x,rectY:c.y,rectWidth:c.width,rectHeight:c.height}),h(a)}}else if(t.hasAttribute(Un)){var d=t.getAttribute(Un),p=n.find((function(e){return e.id===d}));k({highlight:p,highlightModalAction:"addComment"})}else h(void 0)}),[n,u]);(0,s.useEffect)((function(){if("undefined"!=typeof window)return document.addEventListener("click",O),function(){return document.removeEventListener("click",O)}}),[O]);var C,P,L,T,j,R,A=(0,s.useCallback)((function(t){switch(t){case"delete":w();break;case"create":_("none");break;case"comment":e.highlightBarDisabled||p?k({highlight:p,highlightModalAction:"addComment"}):k({highlight:void 0,selectionData:v||void 0,highlightModalAction:"addComment"});break;case"share":var n,r,o;e.isAppleAppEmbed&&(null===(n=window)||void 0===n||null===(r=n.webkit)||void 0===r||null===(o=r.messageHandlers.highlightAction)||void 0===o||o.postMessage({actionID:"share",highlightID:null==p?void 0:p.id})),p?b?E(p.shortId):a({highlight:p,highlightModalAction:"share"}):_("share");break;case"unshare":console.log("unshare")}}),[_,p,E,k,e.highlightBarDisabled,e.isAppleAppEmbed,w,b]);return(0,s.useEffect)((function(){var t=function(){A("comment")},n=function(){A("create")},r=function(){A("share")},o=function(){A("delete")},i=function(){h(void 0)},a=function(){var e=zu(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!p){e.next=4;break}return e.next=3,navigator.clipboard.writeText(p.quote);case 3:h(void 0);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),l=function(){var t=zu(regeneratorRuntime.mark((function t(n){var r,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!p){t.next=9;break}return i=null!==(r=n.annotation)&&void 0!==r?r:"",t.next=4,e.articleMutations.updateHighlightMutation({highlightId:p.id,annotation:null!==(o=n.annotation)&&void 0!==o?o:""});case 4:t.sent?x(Du(Du({},p),{},{annotation:i})):console.log("failed to change annotation for highlight with id",p.id),h(void 0),t.next=10;break;case 9:_("none",n.annotation);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return document.addEventListener("annotate",t),document.addEventListener("highlight",n),document.addEventListener("share",r),document.addEventListener("remove",o),document.addEventListener("copyHighlight",a),document.addEventListener("dismissHighlight",i),document.addEventListener("saveAnnotation",l),function(){document.removeEventListener("annotate",t),document.removeEventListener("highlight",n),document.removeEventListener("share",r),document.removeEventListener("remove",o),document.removeEventListener("copyHighlight",a),document.removeEventListener("dismissHighlight",i),document.removeEventListener("saveAnnotation",l)}})),"addComment"==(null==i?void 0:i.highlightModalAction)?(0,Ie.jsx)(hs,{highlight:i.highlight,author:e.articleAuthor,title:e.articleTitle,onUpdate:x,onOpenChange:function(){return a({highlightModalAction:"none"})},createHighlightForNote:null==i?void 0:i.createHighlightForNote}):"share"==(null==i?void 0:i.highlightModalAction)&&i.highlight?(0,Ie.jsx)(Su,{url:"".concat(e.highlightsBaseURL,"/").concat(i.highlight.shortId),title:e.articleTitle,author:e.articleAuthor,highlight:i.highlight,onOpenChange:function(){a({highlightModalAction:"none"})}}):e.highlightBarDisabled||!p&&!v?e.showHighlightsModal?(0,Ie.jsx)(Ru,{highlights:n,onOpenChange:function(){return e.setShowHighlightsModal(!1)},deleteHighlightAction:function(e){w(e)}}):(0,Ie.jsx)(Ie.Fragment,{}):(0,Ie.jsx)(Ie.Fragment,{children:(0,Ie.jsx)(Ji,{anchorCoordinates:{pageX:null!==(C=null!==(P=null===(L=f.current)||void 0===L?void 0:L.pageX)&&void 0!==P?P:null==v?void 0:v.focusPosition.x)&&void 0!==C?C:0,pageY:null!==(T=null!==(j=null===(R=f.current)||void 0===R?void 0:R.pageY)&&void 0!==j?j:null==v?void 0:v.focusPosition.y)&&void 0!==T?T:0},isNewHighlight:!!v,handleButtonClick:A,isSharedToFeed:null!=(null==p?void 0:p.sharedAt),isTouchscreenDevice:!0})})}function Hu(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Vu(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Hu(i,r,o,a,l,"next",e)}function l(e){Hu(i,r,o,a,l,"throw",e)}a(void 0)}))}}function qu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>16&255,n>>8&255,255&n]);return(0,Ie.jsx)(Fi,{style:"plainIcon",onClick:function(t){r.push('/home?q=label:"'.concat(e.text,'"')),t.stopPropagation()},children:(0,Ie.jsx)(Ne,{css:{display:"inline-table",margin:"4px",borderRadius:"32px",color:e.color,fontSize:"12px",fontWeight:"bold",padding:"2px 5px 2px 5px",whiteSpace:"nowrap",cursor:"pointer",backgroundClip:"padding-box",border:"1px solid rgba(".concat(o[0],", ").concat(o[1],", ").concat(o[2],", 0.7)"),backgroundColor:"rgba(".concat(o[0],", ").concat(o[1],", ").concat(o[2],", 0.08)")},children:e.text})})}function ec(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function tc(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ec(i,r,o,a,l,"next",e)}function l(e){ec(i,r,o,a,l,"throw",e)}a(void 0)}))}}function nc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rc(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=100&&r<=300&&k(r)},n=function(e){var t,n,r=null!==(t=null!==(n=e.maxWidthPercentage)&&void 0!==n?n:b)&&void 0!==t?t:100;r>=40&&r<=100&&w(r)},o=function(t){var n,r,o,i=null!==(n=null!==(r=null!==(o=t.fontFamily)&&void 0!==o?o:_)&&void 0!==r?r:e.fontFamily)&&void 0!==n?n:"inter";console.log("setting font fam to",t.fontFamily),O(i)},i=function(){var e=tc(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="high"==t.fontContrast,L(n);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a=function(){var e=tc(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=null!==(n=t.fontSize)&&void 0!==n?n:18)>=10&&r<=28&&j(r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),l=function(e){var t;Pn(null!==(t=e.isDark)&&void 0!==t&&t?r.Dark:r.Light)},s=function(){navigator.share&&navigator.share({title:e.article.title,url:e.article.originalArticleUrl})};return document.addEventListener("updateFontFamily",o),document.addEventListener("updateLineHeight",t),document.addEventListener("updateMaxWidthPercentage",n),document.addEventListener("updateFontSize",a),document.addEventListener("updateColorMode",l),document.addEventListener("handleFontContrastChange",i),document.addEventListener("share",s),function(){document.removeEventListener("updateFontFamily",o),document.removeEventListener("updateLineHeight",t),document.removeEventListener("updateMaxWidthPercentage",n),document.removeEventListener("updateFontSize",a),document.removeEventListener("updateColorMode",l),document.removeEventListener("handleFontContrastChange",i),document.removeEventListener("share",s)}}));var R={fontSize:m,margin:null!==(o=e.margin)&&void 0!==o?o:360,maxWidthPercentage:null!=b?b:e.maxWidthPercentage,lineHeight:null!==(i=null!=E?E:e.lineHeight)&&void 0!==i?i:150,fontFamily:null!==(a=null!=_?_:e.fontFamily)&&void 0!==a?a:"inter",readerFontColor:P?de.colors.readerFontHighContrast.toString():de.colors.readerFont.toString(),readerFontColorTransparent:de.colors.readerFontTransparent.toString(),readerTableHeaderColor:de.colors.readerTableHeader.toString(),readerHeadersColor:de.colors.readerHeader.toString()};return(0,Ie.jsxs)(Ie.Fragment,{children:[(0,Ie.jsxs)(De,{id:"article-container",css:{padding:"16px",maxWidth:"".concat(null!==(l=R.maxWidthPercentage)&&void 0!==l?l:100,"%"),background:e.isAppleAppEmbed?"unset":de.colors.grayBg.toString(),"--text-font-family":R.fontFamily,"--text-font-size":"".concat(R.fontSize,"px"),"--line-height":"".concat(R.lineHeight,"%"),"--blockquote-padding":"0.5em 1em","--blockquote-icon-font-size":"1.3rem","--figure-margin":"1.6rem auto","--hr-margin":"1em","--font-color":R.readerFontColor,"--font-color-transparent":R.readerFontColorTransparent,"--table-header-color":R.readerTableHeaderColor,"--headers-color":R.readerHeadersColor,"@sm":{"--blockquote-padding":"1em 2em","--blockquote-icon-font-size":"1.7rem","--figure-margin":"2.6875rem auto","--hr-margin":"2em",margin:"30px 0px"},"@md":{maxWidth:R.maxWidthPercentage?"".concat(R.maxWidthPercentage,"%"):1024-R.margin}},children:[(0,Ie.jsxs)(Be,{alignment:"start",distribution:"start",children:[(0,Ie.jsx)(Nn,{style:"boldHeadline","data-testid":"article-headline",css:{fontFamily:R.fontFamily},children:e.article.title}),(0,Ie.jsx)(Fn,{rawDisplayDate:null!==(u=e.article.publishedAt)&&void 0!==u?u:e.article.createdAt,author:e.article.author,href:e.article.url}),e.labels?(0,Ie.jsx)(Ne,{css:{pb:"16px",width:"100%","&:empty":{display:"none"}},children:null===(c=e.labels)||void 0===c?void 0:c.map((function(e){return(0,Ie.jsx)(Ju,{text:e.name,color:e.color},e.id)}))}):null]}),(0,Ie.jsx)(Dn,{articleId:e.article.id,content:e.article.content,highlightHref:T,initialAnchorIndex:e.article.readingProgressAnchorIndex,articleMutations:e.articleMutations}),(0,Ie.jsxs)(Fi,{style:"ghost",css:{p:0,my:"$4",color:"$error",fontSize:"$1","&:hover":{opacity:.8}},onClick:function(){return h(!0)},children:["Report issues with this page -",">"]}),(0,Ie.jsx)(De,{css:{height:"100px"}})]}),(0,Ie.jsx)(Wu,{scrollToHighlight:T,highlights:e.article.highlights,articleTitle:e.article.title,articleAuthor:null!==(f=e.article.author)&&void 0!==f?f:"",articleId:e.article.id,isAppleAppEmbed:e.isAppleAppEmbed,highlightsBaseURL:e.highlightsBaseURL,highlightBarDisabled:e.highlightBarDisabled,showHighlightsModal:e.showHighlightsModal,setShowHighlightsModal:e.setShowHighlightsModal,articleMutations:e.articleMutations}),p?(0,Ie.jsx)(Xu,{onCommit:function(t){!function(e){Qu.apply(this,arguments)}({pageId:e.article.id,itemUrl:e.article.url,reportTypes:["CONTENT_DISPLAY"],reportComment:t})},onOpenChange:function(e){return h(e)}}):null]})}var ic=o(3379),ac=o.n(ic),lc=o(7795),sc=o.n(lc),uc=o(569),cc=o.n(uc),fc=o(3565),dc=o.n(fc),pc=o(9216),hc=o.n(pc),gc=o(4589),mc=o.n(gc),vc=o(7420),yc={};yc.styleTagTransform=mc(),yc.setAttributes=dc(),yc.insert=cc().bind(null,"head"),yc.domAPI=sc(),yc.insertStyleElement=hc(),ac()(vc.Z,yc),vc.Z&&vc.Z.locals&&vc.Z.locals;var bc=o(2778),wc={};function xc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ec(t){for(var n=1;n0&&void 0!==arguments[0])||arguments[0];if("undefined"!=typeof window){var t=window.localStorage.getItem(On);t&&Object.values(r).includes(t)&&(e?Cn(t):Pn(t))}}(!1),(0,Ie.jsx)(Ie.Fragment,{children:(0,Ie.jsx)(De,{css:{overflowY:"auto",height:"100%",width:"100vw"},children:(0,Ie.jsx)(Be,{alignment:"center",distribution:"center",className:"disable-webkit-callout",children:(0,Ie.jsx)(oc,{article:window.omnivoreArticle,labels:window.omnivoreArticle.labels,isAppleAppEmbed:!0,highlightBarDisabled:!window.enableHighlightBar,highlightsBaseURL:"https://example.com",fontSize:null!==(e=window.fontSize)&&void 0!==e?e:18,fontFamily:null!==(t=window.fontFamily)&&void 0!==t?t:"inter",margin:window.margin,maxWidthPercentage:window.maxWidthPercentage,lineHeight:window.lineHeight,highContrastFont:null===(n=window.prefersHighContrastFont)||void 0===n||n,articleMutations:{createHighlightMutation:function(e){return kc("createHighlight",e)},deleteHighlightMutation:function(e){return kc("deleteHighlight",{highlightId:e})},mergeHighlightMutation:function(e){return kc("mergeHighlight",e)},updateHighlightMutation:function(e){return kc("updateHighlight",e)},articleReadingProgressMutation:function(e){return kc("articleReadingProgress",e)}}})})})})};c.render((0,Ie.jsx)(Sc,{}),document.getElementById("root"))})()})();
\ No newline at end of file
diff --git a/packages/appreader/src/index.jsx b/packages/appreader/src/index.jsx
index b820478b8..65d8ff8f3 100644
--- a/packages/appreader/src/index.jsx
+++ b/packages/appreader/src/index.jsx
@@ -37,7 +37,7 @@ const App = () => {
article={window.omnivoreArticle}
labels={window.omnivoreArticle.labels}
isAppleAppEmbed={true}
- highlightBarDisabled={true}
+ highlightBarDisabled={!window.enableHighlightBar}
highlightsBaseURL="https://example.com"
fontSize={window.fontSize ?? 18}
fontFamily={window.fontFamily ?? 'inter'}