PageSourceSearch

https://mastodon.jakewharton.com/packs/modal_container-I2GjoOZF.js

js jakewharton.com collected 2026-10-02 02:34:09 UTC 73,701 bytes, 15 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/packs/collection_adder-C9aHBnjb.js","/packs/rolldown-runtime-C0FnF6B9.js","/packs/jsx-runtime-CKeovgl0.js","/packs/react-intl-C-SARy9S.js","/packs/logo-CXYNw2nw.js","/packs/preload-helper-GL7oveUC.js","/packs/detect-it.esm-DZnguM0j.js","/packs/isSymbol-3r8dk6Lb.js","/packs/react-router-MZ31fgC0.js","/packs/defineProperty-C0YrXxyM.js","/packs/time-COg4FErg.js","/packs/ready-B3bZnx13.js","/packs/initial_state-Bw8LfuSU.js","/packs/locales-DnnqBx9I.js","/packs/async-mutex-DHaCcEsI.js","/packs/router-NUmZVTLW.js","/packs/axios-BtspdZ3f.js","/packs/axios-0On1V31i.js","/packs/api-DV_mEPlR.js","/packs/accounts_typed-DEKNQ9Ib.js","/packs/typed_functions-Bx3rrHQB.js","/packs/utils-mbzdvLJX.js","/packs/locale-CAKj_jJ6.js","/packs/emoji-hHCdnq1f.js","/packs/settings-Cq4pjZIN.js","/packs/modal-Cy2tCnPO.js","/packs/status_quoted-x9cUYBP6.js","/packs/react-router-dom-UToIjw8I.js","/packs/classnames-CfLRLWYq.js","/packs/poll-B-vbxn_z.js","/packs/esm-DrOrXu-Y.js","/packs/short_number-CLefuEED.js","/packs/numbers-BEp7e788.js","/packs/useHovering-DdyfdvF-.js","/packs/useAccount-CJ7iJFpl.js","/packs/skeleton-BPzYVaMC.js","/packs/intl-Bc6RNtc5.js","/packs/utils-B468qXuV.js","/packs/display_name-C40ywjEK.js","/packs/card-SWNlaUHA.js","/packs/home-IbrFWG2m.js","/packs/bookmark-B2hqPyV_.js","/packs/toString-HjykfQcJ.js","/packs/edit-CL9scpLF.js","/packs/insert_chart-D4wAJdIq.js","/packs/link-DNgq7kbC.js","/packs/visibility-CwBsrRXv.js","/packs/push_pin-CG_WJKyG.js","/packs/assets/status_quoted-BXC2E0lB.css","/packs/bundle_column_error-DQZq3dYn.js","/packs/helmet-s187qnAA.js","/packs/skip_links-IVfVanfn.js","/packs/assets/skip_links-DIHZBkdS.css","/packs/copy_button-GzZExb0J.js","/packs/content_copy-DmCbczi_.js","/packs/elephant_ui-B5tyzxY4.js","/packs/gif-BmHrde0J.js","/packs/assets/bundle_column_error-TCkCl549.css","/packs/form_fields-65dAoktq.js","/packs/search-B-ny-j05.js","/packs/keyboard_arrow_up-DMuu0NYV.js","/packs/mood-B4LsXNXq.js","/packs/emoji_picker_dropdown_container-CkPZByI6.js","/packs/form_field_wrapper-Xu51klxy.js","/packs/a11y_live_region-Bs1tHFTY.js","/packs/info-Jlkt-j5H.js","/packs/error-C6QD33OC.js","/packs/assets/form_field_wrapper-BlP-LQo1.css","/packs/text_input_field-CUnQlNwH.js","/packs/assets/text_input_field-CZfb3Ks7.css","/packs/toggle_field-DZi46YKJ.js","/packs/assets/toggle_field-CbgUPVKo.css","/packs/assets/form_fields-0PbAwYJT.css","/packs/useAccountId-Bt5QT2kO.js","/packs/collection_list_item-CS2Q3Yt4.js","/packs/account-CeWuz5uf.js","/packs/smart_toy-1o5zSWek.js","/packs/block-UwaGNu-T.js","/packs/volume_off-BinPItth.js","/packs/assets/account-DcfjHi2n.css","/packs/add-BAo-xtI2.js","/packs/columns_area-DdAGJPeD.js","/packs/navigation_panel-7I8tXhRc.js","/packs/list_alt-fill-D0syImyh.js","/packs/use-gesture-react.esm-BB-5p3vn.js","/packs/alternate_email-D365s_QD.js","/packs/category-DVBtrZAC.js","/packs/manufacturing-BfFTnxq1.js","/packs/index.module-y4HS80Z2.js","/packs/assets/index-BNWomVqV.css","/packs/list_alt-BGdjrKte.js","/packs/lists-BP6lb-yK.js","/packs/hashtag-p04l1l9l.js","/packs/build-DIHEKhBl.js","/packs/unfold_less-y9QfXOC1.js","/packs/chevron_left-D0AYmAQ6.js","/packs/graphic_eq-oI4ReqmY.js","/packs/server_hero_image-Cw3Vvugd.js","/packs/alt_text_badge-CjTZOkTe.js","/packs/useSelectableClick-ClFtTe-Q.js","/packs/assets/alt_text_badge-Dp0EyRCt.css","/packs/assets/server_hero_image-B4ZnzyEW.css","/packs/compose_form_container-BZJxNMIf.js","/packs/visualizer-yDEMtkJ8.js","/packs/share-xKHOJFRx.js","/packs/fuzzysort-CJTuKKST.js","/packs/link_footer-BZKkRfvE.js","/packs/assets/link_footer-BFct3wYC.css","/
1packs/assets/columns_area-ith_ChOf.css","/packs/callout-MwPf2rKw.js","/packs/assets/callout-IFgvMNaK.css","/packs/components-Dw68GB35.js","/packs/formatted_date-BwMMJ5MA.js","/packs/useSearchTags-oHsCzLve.js","/packs/index.module-Br8BcTX1.js","/packs/help-CaxqkNGC.js","/packs/account_list_item-BO-AH93P.js","/packs/number_fields-hCe-RGgC.js","/packs/assets/number_fields-DAO-UqGM.css","/packs/assets/account_list_item-OsUTas1E.css","/packs/more_vert-BHpsAU4S.js","/packs/not_signed_in_indicator-CYskkBUu.js","/packs/useSearchAccounts-CL7Yt39z.js","/packs/useSearchParam-BgKTCg4E.js","/packs/visibility_off-iBpk0mWR.js","/packs/revoke_collection_inclusion_modal-Cd9XmzjY.js","/packs/confirmation_modal-nvUdy42Q.js","/packs/assets/collection_list_item-BAn6mDCP.css","/packs/assets/collection_adder-Ce8jIiSB.css","/packs/share_modal-CfcmGJNS.js","/packs/assets/share_modal-BmvU6eCf.css","/packs/note_modal-DJZqWVLs.js","/packs/styles.module-BoFKCCUL.js","/packs/assets/styles-BdqKzGTn.css","/packs/field_modal-jF-DeP37.js","/packs/useFieldHtml-PsqEIpNW.js","/packs/join_modal-BS68Qslg.js","/packs/anniversary-CY9QMW9B.js","/packs/hide_featured_tab-DRrp5Vjv.js","/packs/modals-BwQ4CvdQ.js","/packs/expand_more-Da5y8bVR.js","/packs/account_edit-TTmtH_o0.js","/packs/account_bio-5JeW3Ll9.js","/packs/assets/account_bio-DpMboqlm.css","/packs/delete-Dr3YaDIc.js","/packs/edit_button-BBHjE3CN.js","/packs/assets/edit_button-VCZjbsjh.css","/packs/replace_image-B7za8cxG.js","/packs/react-easy-crop-DkkQSApX.js","/packs/assets/react-easy-crop-BY2xzm8t.css","/packs/assets/modals-CmCk97ab.css"])))=>i.map(i=>d[i]);
2import{o as e,t}from"./rolldown-runtime-C0FnF6B9.js";import{n,t as r}from"./jsx-runtime-CKeovgl0.js";import{a as i,c as a,o,s}from"./react-intl-C-SARy9S.js";import{t as c}from"./preload-helper-GL7oveUC.js";import{C as l}from"./initial_state-Bw8LfuSU.js";import{P as u,f as d,j as f,k as p,l as m,r as h}from"./logo-CXYNw2nw.js";import{r as g,rn as _,zt as v}from"./detect-it.esm-DZnguM0j.js";import{$i as y,An as b,At as x,Ba as S,Ci as C,Dn as w,Mn as T,Un as E,Wn as D,Z as ee,_ as te,an as ne,bi as O,ci as re,gi as ie,ra as ae,sr as oe,ta as se,wi as ce,za as le}from"./time-COg4FErg.js";import{b as ue,s as de}from"./react-router-MZ31fgC0.js";import{t as k}from"./defineProperty-C0YrXxyM.js";import{t as fe}from"./api-DV_mEPlR.js";import{A as pe}from"./accounts_typed-DEKNQ9Ib.js";import{n as me,o as A,s as j}from"./typed_functions-Bx3rrHQB.js";import{t as he}from"./helmet-s187qnAA.js";import{t as ge}from"./react-router-dom-UToIjw8I.js";import{n as _e,t as M}from"./modal-Cy2tCnPO.js";import{$t as N,Bt as ve,F as ye,Gt as be,H as xe,Ot as Se,Q as Ce,St as we,Ut as Te,Vt as Ee,W as De,an as Oe,it as ke,lt as Ae,nt as je,q as Me,qt as Ne,v as Pe,vt as Fe,yt as Ie}from"./status_quoted-x9cUYBP6.js";import{t as Le}from"./classnames-CfLRLWYq.js";import{t as Re}from"./a11y_live_region-Bs1tHFTY.js";import{F as P,P as F,R as ze,d as I,f as Be,h as Ve,p as He}from"./poll-B-vbxn_z.js";import{t as Ue}from"./alert-CwlkislK.js";import{t as We}from"./intl-Bc6RNtc5.js";import{t as Ge}from"./useAccount-CJ7iJFpl.js";import{t as L}from"./skeleton-BPzYVaMC.js";import{r as Ke,t as qe}from"./video-B5BGLtox.js";import{t as Je}from"./audio-DnciXCgo.js";import{a as Ye,i as Xe,n as Ze,o as Qe,r as $e,t as et}from"./media_modal-CiKdfGAl.js";import{t as tt}from"./gif-BmHrde0J.js";import{t as nt}from"./alternate_email-D365s_QD.js";import{t as rt}from"./manufacturing-BfFTnxq1.js";import{a as it,b as at,d as ot,h as st,w as ct,x as lt,y as ut}from"./bookmark-B2hqPyV_.js";import{E as dt}from"./graphic_eq-oI4ReqmY.js";import{t as ft}from"./useSelectableClick-ClFtTe-Q.js";import{i as pt,n as mt}from"./mood-B4LsXNXq.js";import{a as ht,n as gt,o as _t,r as R}from"./compose_form_container-BZJxNMIf.js";import{t as vt}from"./edit-CL9scpLF.js";import{t as yt}from"./question_mark-B8843QLg.js";import{t as bt}from"./embedded_status-BcZCx6DY.js";import{t as z}from"./confirmation_modal-nvUdy42Q.js";import{t as xt}from"./settings-fill-0h8AXJJ3.js";import{t as St}from"./delete-Dr3YaDIc.js";import{t as Ct}from"./check_box-BUGR-7SX.js";var B=e(n()),V=r(),H=(e,t,n)=>typeof t==`object`?e.formatMessage(t,n):t,wt=({alert:{key:e,title:t,message:n,values:r,action:i,onClick:o}
2,dismissAfter:s})=>{let c=A(),l=a(),[u,d]=(0,B.useState)(!1);return(0,B.useEffect)(()=>{let e=setTimeout(()=>{d(!0)},1);return()=>{clearTimeout(e)}},[]),(0,B.useEffect)(()=>{let t=setTimeout(()=>{d(!1),setTimeout(()=>{c(se({key:e}))},500)},s);return()=>{clearTimeout(t)}},[c,d,e,s]),(0,V.jsx)(Ue,{isActive:u,title:t?H(l,t,r):void 0,message:H(l,n,r),action:i?H(l,i,r):void 0,onActionClick:o})},Tt=()=>{let e=j(e=>e.alerts),t=j(e=>!!e.meta.get(`needsReload`));return(0,V.jsxs)(Re,{className:`notification-list`,children:[e.map((e,t)=>(0,V.jsx)(wt,{alert:e,dismissAfter:5e3+t*1e3},e.key)),t&&(0,V.jsx)(Dt,{})]})},Et=o({id:`alert.need_reload.message`,defaultMessage:`Mastodon has been updated. Some things may not work correctly until you reload the page.`}),Dt=()=>{let e=a();return(0,V.jsx)(Ue,{isActive:!0,message:e.formatMessage(Et)})},Ot=e(g()),kt=v((e,t)=>({loading:e.get(`loadingBar`)[t.scope||`default`]}))(Ot.default.WrappedComponent),At=pt(),U=e(Le()),jt=s({help:{id:`info_button.label`,defaultMessage:`Help`}}),Mt=()=>{let e=a(),[t,n]=(0,B.useState)(!1),[r,o]=(0,B.useState)(null),s=(0,B.useId)(),c=(0,B.useCallback)(()=>{n(!t)},[t,n]),[l,u]=ft(c);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{type:`button`,className:(0,U.default)(`help-button`,{active:t}),ref:o,onClick:c,"aria-expanded":t,"aria-controls":s,"aria-label":e.formatMessage(jt.help),children:(0,V.jsx)(P,{id:``,icon:yt})}),(0,V.jsx)(Ve,{isOpen:t,placement:`top`,onClose:c,offset:5,reference:r,children:({props:e})=>(0,V.jsx)(`div`,{...e,className:`dialog-modal__popout prose dropdown-animation`,role:`region`,id:s,onMouseDown:l,onMouseUp:u,children:(0,V.jsx)(i,{id:`info_button.what_is_alt_text`,defaultMessage:`<h1>What is alt text?</h1>
3
4            <p>Alt text provides image descriptions for people with vision impairments, low-bandwidth connections, or those seeking extra context.</p>
5
6            <p>You can improve accessibility and understanding for everyone by writing clear, concise, and objective alt text.</p>
7
8            <ul>
9              <li>Capture important elements</li>
10              <li>Summarize text in images</li>
11              <li>Use regular sentence structure</li>
12              <li>Avoid redundant information</li>
13              <li>Focus on trends and key findings in complex visuals (like diagrams or maps)</li>
14            </ul>`,values:{h1:e=>(0,V.jsx)(`h1`,{children:e}),p:e=>(0,V.jsx)(`p`,{children:e}),ul:e=>(0,V.jsx)(`ul`,{children:e}),li:e=>(0,V.jsx)(`li`,{children:e})}})})})]})},W=s({placeholderVisual:{id:`alt_text_modal.describe_for_people_with_visual_impairments`,defaultMessage:`Describe this for people with visual impairments…`},placeholderHearing:{id:`alt_text_modal.describe_for_people_with_hearing_impairments`,defaultMessage:`Describe this for people with hearing impairments…`},discardMessage:{id:`confirmations.discard_edit_media.message`,defaultMessage:`You have unsaved changes to the media description or preview, discard them anyway?`},discardConfirm:{id:`confirmations.discard_edit_media.confirm`,defaultMessage:`Discard`}}),Nt=1e4,Pt=({children:e,onSelectFile:t,mimeTypes:n})=>{let r=(0,B.useRef)(null),i=(0,B.useCallback)(()=>{r.current?.click()},[]),a=(0,B.useCallback)(e=>{let n=e.target.files?.[0];n&&t(n)},[t]);return(0,V.jsxs)(`label`,{children:[(0,V.jsx)(N,{onClick:i,children:e}),(0,V.jsx)(`input`,{id:`upload-modal__thumbnail`,ref:r,type:`file`,accept:n,onChange:a,style:{display:`none`}})]})},Ft=({mediaId:e,position:t,onPositionChange:n})=>{let r=(0,B.useRef)(null),[i,a]=(0,B.useState)(null),[o,s]=t,c=u({to:{left:`${o*100}%`,top:`${s*100}%`},immediate:i===`moving`}),d=j(t=>t.compose.get(`media_attachments`).find(t=>t.get(`id`)===e)),p=j(e=>l?e.accounts.get(l):void 0),m=(0,B.useCallback)(e=>{r.current=e},[]),h=(0,B.useCallback)(e=>{if(e.button!==0)return;let t=e=>{let{x:t,y:i}=Ke(r.current,e);a(`moving`),n([t,i])},i=()=>{a(null),document.removeEventListener(`mouseup`,i),document.removeEventListener(`mousemove`,t)},{x:o,y:s}=Ke(r.current,e.nativeEvent);a(`started`),n([o,s]),document.addEventListener(`mouseup`,i),document.addEventListener(`mousemove`,t)},[a,n]);return d?d.get(`type`)===`image`?(0,V.jsxs)(`div`,{className:(0,U.default)(`focal-point`,{dragging:i}),children:[(0,V.jsx)(`img`,{ref:m,draggable:!1,src:d.get(`url`),alt:``,role:`presentation`,onMouseDown:h}),(0,V.jsx)(f.div,{className:`focal-point__reticle`,style:c}
14)]}):d.get(`type`)===`gifv`?(0,V.jsxs)(`div`,{className:(0,U.default)(`focal-point`,{dragging:i}),children:[(0,V.jsx)(Xe,{ref:m,src:d.get(`url`),alt:``,onMouseDown:h}),(0,V.jsx)(f.div,{className:`focal-point__reticle`,style:c})]}):d.get(`type`)===`video`?(0,V.jsx)(qe,{preview:d.get(`preview_url`),frameRate:d.getIn([`meta`,`original`,`frame_rate`]),aspectRatio:`${d.getIn([`meta`,`original`,`width`])} / ${d.getIn([`meta`,`original`,`height`])}`,blurhash:d.get(`blurhash`),src:d.get(`url`),detailed:!0,editable:!0}):d.get(`type`)===`audio`?(0,V.jsx)(Je,{src:d.get(`url`),poster:d.get(`preview_url`)??p?.avatar_static,duration:d.getIn([`meta`,`original`,`duration`],0),backgroundColor:d.getIn([`meta`,`colors`,`background`]),foregroundColor:d.getIn([`meta`,`colors`,`foreground`]),accentColor:d.getIn([`meta`,`colors`,`accent`]),editable:!0}):null:null},It=(0,B.forwardRef)(({mediaId:e,previousDescription:t,previousPosition:n,onClose:r},o)=>{let s=a(),l=A(),u=j(t=>t.compose.get(`media_attachments`).find(t=>t.get(`id`)===e)),d=j(e=>e.compose.get(`language`)),f=u?.getIn([`meta`,`focus`,`x`],0)??0,p=u?.getIn([`meta`,`focus`,`y`],0)??0,[m,h]=(0,B.useState)(t??u?.get(`description`)??``),[g,_]=(0,B.useState)(n??[f/2+.5,p/-2+.5]),[v,y]=(0,B.useState)(!1),[x,S]=(0,B.useState)(!1),C=(0,B.useRef)(!!(t||n)),w=u?.get(`type`),T=(0,At.length)(m)<=Nt,E=u?.get(`unattached`),D=(0,B.useCallback)(e=>{h(e.target.value),C.current=!0},[h]),ee=(0,B.useCallback)(t=>{l(ce(e,t))},[l,e]),ne=(0,B.useCallback)(e=>{_(e),C.current=!0},[_]),O=(0,B.useCallback)(()=>{S(!0),l(b({id:e,description:m,focus:`${((g[0]-.5)*2).toFixed(2)},${((g[1]-.5)*-2).toFixed(2)}`})).then(()=>(S(!1),C.current=!1,r(),``)).catch(e=>{S(!1),l(ae(e))})},[l,S,e,r,g,m]),re=(0,B.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&e.key===`Enter`&&(e.preventDefault(),T&&O())},[O,T]),ie=(0,B.useCallback)(()=>{y(!0),Ne().then(async({createWorker:e})=>{let[t,n]=await Promise.all([c(()=>import(`./worker.min-BKj2FSBn.js`),[],import.meta.url),c(()=>import(`./tesseract-core.wasm-1MSTuyyV.js`),[],import.meta.url)]),r=await e(`eng`,1,{workerPath:t.default,corePath:n.default,langPath:`${te}/ocr/lang-data`,cacheMethod:`write`}),i=URL.createObjectURL(u?.get(`file`)),a=await r.recognize(i);return h(a.data.text),y(!1),await r.terminate(),``}).catch(()=>{y(!1)})},[h,y,u]);return(0,B.useImperativeHandle)(o,()=>({getCloseConfirmationMessage:()=>C.current?{message:s.formatMessage(W.discardMessage),confirm:s.formatMessage(W.discardConfirm),props:{previousDescription:m,previousPosition:g}}:null}),[s,m,g]),(0,V.jsxs)(`div`,{className:`modal-root__modal dialog-modal`,children:[(0,V.jsxs)(`div`,{className:`dialog-modal__header`,children:[(0,V.jsx)(N,{onClick:O,disabled:!T,children:x?(0,V.jsx)(ze,{}):(0,V.jsx)(i,{id:`alt_text_modal.done`,defaultMessage:`Done`})}),(0,V.jsx)(Oe,{as:`h1`,className:`dialog-modal__header__title`,children:(0,V.jsx)(i,{id:`alt_text_modal.add_alt_text`,defaultMessage:`Add alt text`})}),(0,V.jsx)(N,{secondary:!0,onClick:r,children:(0,V.jsx)(i,{id:`alt_text_modal.cancel`,defaultMessage:`Cancel`})})]}),(0,V.jsxs)(`div`,{className:`dialog-modal__content`,children:[(0,V.jsxs)(`div`,{className:`dialog-modal__content__preview`,children:[(0,V.jsx)(Ft,{mediaId:e,position:g,onPositionChange:ne}),(w===`audio`||w===`video`)&&E&&(0,V.jsx)(Pt,{onSelectFile:ee,mimeTypes:`image/jpeg,image/png,image/gif,image/heic,image/heif,image/webp,image/avif`,children:(0,V.jsx)(i,{id:`alt_text_modal.change_thumbnail`,defaultMessage:`Change thumbnail`})})]}),(0,V.jsx)(`form`,{className:`dialog-modal__content__form simple_form`,onSubmit:O,children:(0,V.jsxs)(`div`,{className:`input`,children:[(0,V.jsxs)(`div`,{className:`label_input`,children:[(0,V.jsx)(mt,{id:`description`,value:v?` `:m,onChange:D,onKeyDown:re,lang:d,placeholder:s.formatMessage(w===`audio`?W.placeholderHearing:W.placeholderVisual),minRows:3,disabled:v}),v&&(0,V.jsxs)(`div`,{className:`label_input__loading-indicator`,children:[(0,V.jsx)(L,{width:`100%`}),(0,V.jsx)(L,{width:`100%`}),(0,V.jsx)(L,{width:`61%`})]})]}),(0,V.jsxs)(`div`,{className:`input__toolbar`,children:[(0,V.jsx)(ht,{max:Nt,text:v?``:m}),(0,V.jsx)(`div`,{className:`spacer`}),(0,V.jsx)(`button`,{className:`link-button`,onClick:ie,disabled:w!==`image`||v,type:`button`,children:(0,V.jsx)(i,{id:`alt_text_modal.add_text_from_image`,defaultMessage:`Add text from image`})}),(0,V.jsx)(Mt,{})]})]})})]})]})});It.displayName=`AltTextModal`;var Lt=({actions:e,onClick:t,className:n})=>
14(0,V.jsx)(`div`,{className:(0,U.default)(`modal-root__modal actions-modal`,n),children:(0,V.jsx)(`ul`,{children:e.map((e,n)=>{if(e===null)return(0,V.jsx)(`li`,{className:`dropdown-menu__separator`},`sep-${n}`);let{text:r,highlighted:i,disabled:a,dangerous:o}=e,s;return s=Be(e)?(0,V.jsx)(`button`,{onClick:t,"data-index":n,disabled:a,type:`button`,children:(0,V.jsx)(I,{item:e})}):He(e)?(0,V.jsx)(`a`,{href:e.href,target:e.target??`_target`,"data-method":e.method,rel:`noopener`,onClick:t,"data-index":n,children:(0,V.jsx)(I,{item:e})}):(0,V.jsx)(ge,{to:e.to,onClick:t,"data-index":n,children:(0,V.jsx)(I,{item:e})}),(0,V.jsx)(`li`,{className:(0,U.default)(`dropdown-menu__item`,{"dropdown-menu__item--dangerous":o,"dropdown-menu__item--highlighted":i}),children:s},`${r}-${n}`)})})}),Rt=({media:e,statusId:t,options:n,onClose:r,onChangeBackgroundColor:i})=>{let a=j(e=>e.statuses.get(t)),o=a?.get(`account`),s=j(e=>o?e.accounts.get(o)?.avatar_static:void 0);(0,B.useEffect)(()=>(i($e(e.get(`blurhash`))??{r:255,g:255,b:255}),()=>{i(null)}),[e,i]);let c=a?.getIn([`translation`,`language`])??a?.get(`language`),l=e.getIn([`translation`,`description`])??e.get(`description`);return(0,V.jsxs)(`div`,{className:`modal-root__modal audio-modal`,children:[(0,V.jsx)(`div`,{className:`audio-modal__container`,children:(0,V.jsx)(Je,{src:e.get(`url`),alt:l,lang:c,poster:e.get(`preview_url`)??s,duration:e.getIn([`meta`,`original`,`duration`],0),backgroundColor:e.getIn([`meta`,`colors`,`background`]),foregroundColor:e.getIn([`meta`,`colors`,`foreground`]),accentColor:e.getIn([`meta`,`colors`,`accent`]),startPlaying:n.autoPlay})}),(0,V.jsx)(`div`,{className:`media-modal__overlay`,children:a&&(0,V.jsx)(Qe,{statusId:a.get(`id`),withOpenButton:!0,onClose:r})})]})},zt=s({cancel_reblog:{id:`status.cancel_reblog_private`,defaultMessage:`Unboost`},reblog:{id:`status.reblog`,defaultMessage:`Boost`}}),Bt=({status:e,onReblog:t,onClose:n,missingMediaDescription:r})=>{let o=a(),s=j(e=>e.compose.get(`default_privacy`)),c=e.get(`id`),l=e.get(`visibility`),[u,d]=(0,B.useState)(l===`private`?`private`:s),f=(0,B.useCallback)(e=>{d(e)},[]),p=(0,B.useCallback)(()=>{t(e,u),n()},[n,t,e,u]),h=(0,B.useCallback)(()=>{n()},[n]);return(0,V.jsxs)(`div`,{className:`modal-root__modal safety-action-modal`,children:[(0,V.jsxs)(`div`,{className:`safety-action-modal__top`,children:[(0,V.jsxs)(`div`,{className:`safety-action-modal__header`,children:[(0,V.jsx)(`div`,{className:`safety-action-modal__header__icon`,children:(0,V.jsx)(P,{icon:m,id:`retweet`})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(Oe,{as:`h1`,children:e.get(`reblogged`)?(0,V.jsx)(i,{id:`boost_modal.undo_reblog`,defaultMessage:`Unboost post?`}):(0,V.jsx)(i,{id:`boost_modal.reblog`,defaultMessage:`Boost post?`})}),(0,V.jsx)(`div`,{children:r?(0,V.jsx)(i,{id:`boost_modal.missing_description`,defaultMessage:`This toot contains some media without description`}):(0,V.jsx)(i,{id:`boost_modal.combo`,defaultMessage:`You can press {combo} to skip this next time`,values:{combo:(0,V.jsxs)(`span`,{className:`hotkey-combination`,children:[(0,V.jsx)(`kbd`,{children:`Shift`}),`+`,(0,V.jsx)(P,{id:`retweet`,icon:m})]})}})})]})]}),(0,V.jsx)(`div`,{className:`safety-action-modal__status`,children:(0,V.jsx)(bt,{statusId:c})})]}),(0,V.jsx)(`div`,{className:(0,U.default)(`safety-action-modal__bottom`),children:(0,V.jsxs)(`div`,{className:`safety-action-modal__actions`,children:[!e.get(`reblogged`)&&(0,V.jsx)(gt,{noDirect:!0,value:u,onChange:f,disabled:l===`private`}),(0,V.jsx)(`div`,{className:`spacer`}),(0,V.jsx)(`button`,{onClick:h,className:`link-button`,type:`button`,children:(0,V.jsx)(i,{id:`confirmation_modal.cancel`,defaultMessage:`Cancel`})}),(0,V.jsx)(N,{onClick:p,text:o.formatMessage(e.get(`reblogged`)?zt.cancel_reblog:zt.reblog),autoFocus:!0})]})})]})},G=s({deleteAndRedraftTitle:{id:`confirmations.redraft.title`,defaultMessage:`Delete & redraft post?`},deleteAndRedraftMessage:{id:`confirmations.redraft.message`,defaultMessage:`Are you sure you want to delete this status and re-draft it? Favorites and boosts will be lost, and replies to the original post will be orphaned.`},deleteAndRedraftConfirm:{id:`confirmations.redraft.confirm`,defaultMessage:`Delete & redraft`},deleteTitle:{id:`confirmations.delete.title`,defaultMessage:`Delete post?`}
14,deleteMessage:{id:`confirmations.delete.message`,defaultMessage:`Are you sure you want to delete this status?`},deleteConfirm:{id:`confirmations.delete.confirm`,defaultMessage:`Delete`}}),Vt=({statusId:e,withRedraft:t,onClose:n,onDeleteSuccess:r})=>{let i=a(),o=A(),s=(0,B.useCallback)(()=>{o(E(e,t)).then(()=>{r?.(),n()}).catch(()=>{n()})},[o,e,t,r,n]);return(0,V.jsx)(z,{title:i.formatMessage(t?G.deleteAndRedraftTitle:G.deleteTitle),message:i.formatMessage(t?G.deleteAndRedraftMessage:G.deleteMessage),confirm:i.formatMessage(t?G.deleteAndRedraftConfirm:G.deleteConfirm),onConfirm:s,onClose:n})},K=s({deleteListTitle:{id:`confirmations.delete_list.title`,defaultMessage:`Delete list?`},deleteListMessage:{id:`confirmations.delete_list.message`,defaultMessage:`Are you sure you want to permanently delete this list?`},deleteListConfirm:{id:`confirmations.delete_list.confirm`,defaultMessage:`Delete`}}),Ht=({listId:e,columnId:t,onClose:n})=>{let r=a(),i=A(),o=de(),s=(0,B.useCallback)(()=>{i(ne(e)),t?i(x(t)):o.push(`/lists`)},[i,o,t,e]);return(0,V.jsx)(z,{title:r.formatMessage(K.deleteListTitle),message:r.formatMessage(K.deleteListMessage),confirm:r.formatMessage(K.deleteListConfirm),onConfirm:s,onClose:n})},q=s({deleteListTitle:{id:`confirmations.delete_collection.title`,defaultMessage:`Delete "{name}"?`},deleteListMessage:{id:`confirmations.delete_collection.message`,defaultMessage:`This action cannot be undone.`},deleteListConfirm:{id:`confirmations.delete_collection.confirm`,defaultMessage:`Delete`}}),Ut=({id:e,name:t,onClose:n})=>{let r=a(),i=A(),o=de(),{acct:s}=Ge(l)??{},c=(0,B.useCallback)(async()=>{await i(pe({collectionId:e})),o.push(`/@${s}/collections`)},[i,o,e,s]);return(0,V.jsx)(z,{title:r.formatMessage(q.deleteListTitle,{name:t}),message:r.formatMessage(q.deleteListMessage),confirm:r.formatMessage(q.deleteListConfirm),onConfirm:c,onClose:n})},Wt=s({title:{id:`confirmations.discard_draft.edit.title`,defaultMessage:`Discard changes to your post?`},message:{id:`confirmations.discard_draft.edit.message`,defaultMessage:`Continuing will discard any changes you have made to the post you are currently editing.`},cancel:{id:`confirmations.discard_draft.edit.cancel`,defaultMessage:`Resume editing`}}),Gt=s({title:{id:`confirmations.discard_draft.post.title`,defaultMessage:`Discard your draft post?`},message:{id:`confirmations.discard_draft.post.message`,defaultMessage:`Continuing will discard the post you are currently composing.`},cancel:{id:`confirmations.discard_draft.post.cancel`,defaultMessage:`Resume draft`}}),Kt=s({confirm:{id:`confirmations.discard_draft.confirm`,defaultMessage:`Discard and continue`}}),qt=({onConfirm:e,onClose:t})=>{let n=a(),r=j(e=>!!e.compose.get(`id`))?Wt:Gt;return(0,V.jsx)(z,{title:n.formatMessage(r.title),message:n.formatMessage(r.message),cancel:n.formatMessage(r.cancel),confirm:n.formatMessage(Kt.confirm),onConfirm:e,onClose:t})},Jt=({status:e,onClose:t})=>{let n=A(),r=(0,B.useCallback)(()=>{n(ie(e))},[n,e]);return(0,V.jsx)(qt,{onConfirm:r,onClose:t})},Yt=({statusId:e,onClose:t})=>{let n=A(),r=(0,B.useCallback)(()=>{n(D(e))},[n,e]);return(0,V.jsx)(qt,{onConfirm:r,onClose:t})},Xt=s({withdrawConfirm:{id:`confirmations.withdraw_request.confirm`,defaultMessage:`Withdraw request`}}),Zt=({account:e,onClose:t})=>{let n=a(),r=A(),o=(0,B.useCallback)(()=>{r(S(e.id))},[r,e.id]);return(0,V.jsx)(z,{title:(0,V.jsx)(i,{id:`confirmations.withdraw_request.title`,defaultMessage:`Withdraw request to follow {name}?`,values:{name:`@${e.acct}`}}),confirm:n.formatMessage(Xt.withdrawConfirm),onConfirm:o,onClose:t})},Qt=s({unfollowConfirm:{id:`confirmations.unfollow.confirm`,defaultMessage:`Unfollow`}}),$t=({account:e,onClose:t})=>{let n=a(),r=A(),o=(0,B.useCallback)(()=>{r(S(e.id))},[r,e.id]);return(0,V.jsx)(z,{title:(0,V.jsx)(i,{id:`confirmations.unfollow.title`,defaultMessage:`Unfollow {name}?`,values:{name:`@${e.acct}`}}),confirm:n.formatMessage(Qt.unfollowConfirm),onConfirm:o,onClose:t})},en=s({unblockConfirm:{id:`confirmations.unblock.confirm`,defaultMessage:`Unblock`}}),tn=({account:e,onClose:t})=>{let n=a(),r=A(),o=(0,B.useCallback)(()=>{r(le(e.id))},[r,e.id]);return(0,V.jsx)(z,{title:(0,V.jsx)(i,{id:`confirmations.unblock.title`,defaultMessage:`Unblock {name}?`,values:{name:`@${e.acct}`}}),confirm:n.formatMessage(en.unblockConfirm),onConfirm:o,onClose:t})},nn=s({clearTitle:{id:`notifications.clear_title`,defaultMessage:`Clear notifications?`}
14,clearMessage:{id:`notifications.clear_confirmation`,defaultMessage:`Are you sure you want to permanently clear all your notifications?`},clearConfirm:{id:`notifications.clear`,defaultMessage:`Clear notifications`}}),rn=({onClose:e})=>{let t=a(),n=A(),r=(0,B.useCallback)(()=>{n(oe())},[n]);return(0,V.jsx)(z,{title:t.formatMessage(nn.clearTitle),message:t.formatMessage(nn.clearMessage),confirm:t.formatMessage(nn.clearConfirm),onConfirm:r,onClose:e})};async function an(){try{let e=await fe(!1).delete(`/auth/sign_out`,{headers:{Accept:`application/json`},withCredentials:!0});e.status===200&&e.data.redirect_to?window.location.href=e.data.redirect_to:console.error(`Failed to log out, got an unexpected non-redirect response from the server`,e)}catch(e){console.error(`Failed to log out, response was an error`,e)}}var on=s({logoutTitle:{id:`confirmations.logout.title`,defaultMessage:`Log out?`},logoutMessage:{id:`confirmations.logout.message`,defaultMessage:`Are you sure you want to log out?`},logoutConfirm:{id:`confirmations.logout.confirm`,defaultMessage:`Log out`}}),sn=({onClose:e})=>{let t=a(),n=(0,B.useCallback)(()=>{an()},[]);return(0,V.jsx)(z,{title:t.formatMessage(on.logoutTitle),message:t.formatMessage(on.logoutMessage),confirm:t.formatMessage(on.logoutConfirm),onConfirm:n,onClose:e})},cn=s({title:{id:`confirmations.follow_to_list.title`,defaultMessage:`Follow user?`},confirm:{id:`confirmations.follow_to_list.confirm`,defaultMessage:`Follow and add to list`}}),ln=({accountId:e,onConfirm:t,onClose:n})=>{let r=a(),o=Ge(e);return(0,V.jsx)(z,{title:r.formatMessage(cn.title),message:(0,V.jsx)(i,{id:`confirmations.follow_to_list.message`,defaultMessage:`You need to be following {name} to add them to a list.`,values:{name:(0,V.jsxs)(`strong`,{children:[`@`,o?.acct]})}}),confirm:r.formatMessage(cn.confirm),onConfirm:t,onClose:n})},J=s({title:{id:`confirmations.missing_alt_text.title`,defaultMessage:`Add alt text?`},confirm:{id:`confirmations.missing_alt_text.confirm`,defaultMessage:`Add alt text`},message:{id:`confirmations.missing_alt_text.message`,defaultMessage:`Your post contains media without alt text. Adding descriptions helps make your content accessible to more people.`},secondary:{id:`confirmations.missing_alt_text.secondary`,defaultMessage:`Post anyway`}}),un=({onClose:e,overridePrivacy:t})=>{let n=a(),r=A(),i=j(e=>e.compose.get(`media_attachments`).find(e=>[`image`,`gifv`].includes(e.get(`type`))&&(e.get(`description`)??``).length===0)?.get(`id`)),o=(0,B.useCallback)(()=>{r(_e({modalType:`FOCAL_POINT`,modalProps:{mediaId:i}}))},[r,i]),s=(0,B.useCallback)(()=>{r(O(void 0,t))},[r,t]);return(0,V.jsx)(z,{title:n.formatMessage(J.title),message:n.formatMessage(J.message),confirm:n.formatMessage(J.confirm),secondary:n.formatMessage(J.secondary),onConfirm:o,onSecondary:s,onClose:e})},dn=s({revokeQuoteTitle:{id:`confirmations.revoke_quote.title`,defaultMessage:`Remove post?`},revokeQuoteMessage:{id:`confirmations.revoke_quote.message`,defaultMessage:`This action cannot be undone.`},revokeQuoteConfirm:{id:`confirmations.revoke_quote.confirm`,defaultMessage:`Remove post`}}),fn=({statusId:e,quotedStatusId:t,onClose:n})=>{let r=a(),i=A(),o=(0,B.useCallback)(()=>{i(ee({quotedStatusId:t,statusId:e}))},[i,e,t]);return(0,V.jsx)(z,{title:r.formatMessage(dn.revokeQuoteTitle),message:r.formatMessage(dn.revokeQuoteMessage),confirm:r.formatMessage(dn.revokeQuoteConfirm),onConfirm:o,onClose:n})},Y=s({title:{id:`confirmations.quiet_post_quote_info.title`,defaultMessage:`Quoting quiet public posts`},message:{id:`confirmations.quiet_post_quote_info.message`,defaultMessage:`When quoting a quiet public post, your post will be hidden from trending timelines.`},got_it:{id:`confirmations.quiet_post_quote_info.got_it`,defaultMessage:`Got it`},dismiss:{id:`confirmations.quiet_post_quote_info.dismiss`,defaultMessage:`Don't remind me again`}}),pn=({status:e})=>{let t=a(),n=A(),r=(0,B.useCallback)(()=>{n(T(e)),n(M({modalType:`CONFIRM_QUIET_QUOTE`,ignoreFocus:!0}))},[n,e]),i=(0,B.useCallback)(()=>{n(T(e)),n(y([`dismissed_banners`,`quote/quiet_post_hint`],!0)),n(M({modalType:`CONFIRM_QUIET_QUOTE`,ignoreFocus:!0}))},[n,e]);return(0,V.jsx)(z,{title:t.formatMessage(Y.title),message:t.formatMessage(Y.message),confirm:t.formatMessage(Y.got_it),cancel:t.formatMessage(Y.dismiss),onConfirm:r,onClose:i,noCloseOnConfirm:!0})},mn=e(h()),hn=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20viewBox='0%200%20216.41507%20232.00976'
14%20version='1.1'%20id='svg6'%20sodipodi:docname='logo_warn_glitch.svg'%20inkscape:version='1.1.2%20(0a00cf5339,%202022-02-04)'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:svg='http://www.w3.org/2000/svg'%3e%3cdefs%20id='defs10'%20/%3e%3csodipodi:namedview%20id='namedview8'%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1.0'%20inkscape:pageshadow='2'%20inkscape:pageopacity='0.0'%20inkscape:pagecheckerboard='0'%20showgrid='false'%20inkscape:zoom='1.7951831'%20inkscape:cx='-30.916067'%20inkscape:cy='90.241493'%20inkscape:window-width='1920'%20inkscape:window-height='1011'%20inkscape:window-x='0'%20inkscape:window-y='32'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg6'%20/%3e%3cg%20id='g2025'%3e%3cpath%20d='M211.80683%20139.0875c-3.1825%2016.36625-28.4925%2034.2775-57.5625%2037.74875-15.16%201.80875-30.0825%203.47125-45.99875%202.74125-26.0275-1.1925-46.565-6.2125-46.565-6.2125%200%202.53375.15625%204.94625.46875%207.2025%203.38375%2025.68625%2025.47%2027.225%2046.3925%2027.9425%2021.115.7225%2039.91625-5.20625%2039.91625-5.20625l.86875%2019.09s-14.77%207.93125-41.08125%209.39c-14.50875.7975-32.52375-.365-53.50625-5.91875C9.23183%20213.82%201.40558%20165.31125.20808%20116.09125c-.36375-14.61375-.14-28.39375-.14-39.91875%200-50.33%2032.97625-65.0825%2032.97625-65.0825C49.67058%203.45375%2078.20308.2425%20107.86433%200h.72875c29.66125.2425%2058.21125%203.45375%2074.8375%2011.09%200%200%2032.97625%2014.7525%2032.97625%2065.0825%200%200%20.4125%2037.13375-4.6%2062.915'%20fill='%233088d4'%20id='path2'%20/%3e%3cpath%20d='m%20124.52893,137.75645%20c%200,9.01375%20-7.30875,16.32125%20-16.3225,16.32125%20-9.01375,0%20-16.32125,-7.3075%20-16.32125,-16.32125%200,-9.01375%207.3075,-16.3225%2016.32125,-16.3225%209.01375,0%2016.3225,7.30875%2016.3225,16.3225'%20fill='%23ffffff'%20id='path4'%20sodipodi:nodetypes='csssc'%20/%3e%3cpath%20id='path1121'%20d='m%20108.20703,25.453125%20c%20-9.013749,0%20-16.322264,7.308516%20-16.322264,16.322266%200,5.31808%202.555126,37.386806%206.492187,67.763669%204.100497,4.20028%2015.890147,3.77063%2019.660157,-0.01%203.9367,-30.375272%206.49219,-62.4364%206.49219,-67.753909%200,-9.01375%20-7.30852,-16.322266%20-16.32227,-16.322266%20z'%20style='fill:%23ffffff'%20sodipodi:nodetypes='ssccsss'%20/%3e%3c/g%3e%3c/svg%3e`,gn=s({discardChanges:{id:`confirmations.deprecated_settings.confirm`,defaultMessage:`Use Mastodon preferences`},user_setting_expand_spoilers:{id:`settings.enable_content_warnings_auto_unfold`,defaultMessage:`Automatically unfold content-warnings`},user_setting_disable_swiping:{id:`settings.swipe_to_change_columns`,defaultMessage:`Allow swiping to change columns (Mobile only)`}}),_n=class extends B.PureComponent{constructor(...e){super(...e),k(this,`handleClick`,()=>{this.props.onConfirm(),this.props.onClose()})}render(){let{settings:e,intl:t}=this.props;return(0,V.jsxs)(`div`,{className:`modal-root__modal confirmation-modal`,children:[(0,V.jsxs)(`div`,{className:`confirmation-modal__container`,children:[(0,V.jsx)(`img`,{src:hn,className:`modal-warning`,alt:``}),(0,V.jsx)(i,{id:`confirmations.deprecated_settings.message`,defaultMessage:`Some of the glitch-soc device-specific {app_settings} you are using have been replaced by Mastodon {preferences} and will be overriden:`,values:{app_settings:(0,V.jsxs)(`strong`,{className:`deprecated-settings-label`,children:[(0,V.jsx)(P,{id:`cogs`,icon:rt}),` `,(0,V.jsx)(i,{id:`navigation_bar.app_settings`,defaultMessage:`App settings`})]}),preferences:(0,V.jsxs)(`strong`,{className:`deprecated-settings-label`,children:[(0,V.jsx)(P,{id:`cog`,icon:xt}),` `,(0,V.jsx)(i,{id:`navigation_bar.preferences`,defaultMessage:`Preferences`})]})}}),(0,V.jsx)(`div`,{className:`deprecated-settings-info`,children:(0,V.jsx)(`ul`,{children:e.map(e=>(0,V.jsx)(`li`,{children:(0,V.jsx)(`a`,{href:Pe(e),children:(0,V.jsx)(i,{...gn[e]})})},e))})})]}),(0,V.jsx)(`div`,{children:(0,V.jsxs)(`div`,{className:`confirmation-modal__action-bar`,children:[(0,V.jsx)(`div`,{}),(0,V.jsx)(N,{text:t.formatMessage(gn.discardChanges),onClick:this.handleClick,autoFocus:!0})]})})]})}},vn=We(_n),yn=t((e=>
14{Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function n(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function r(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.default=function(e){r(a,e);function a(){i(this,a);var e=n(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,0,0));return e._down=!1,e._px=0,e._py=0,e}return t(a,[{key:`down`,get:function(){return this._down},set:function(e){this._down=e}},{key:`x`,get:function(){return this._x},set:function(e){this._x=e}},{key:`y`,get:function(){return this._y},set:function(e){this._y=e}},{key:`px`,get:function(){return this._px},set:function(e){this._px=e}},{key:`py`,get:function(){return this._py},set:function(e){this._py=e}}]),a}(function(){function e(t,n){i(this,e),this._x=t,this._y=n}return t(e,[{key:`set`,value:function(e,t){this._x=e,this._y=t}},{key:`x`,get:function(){return this._x},set:function(e){this._x=e}},{key:`y`,get:function(){return this._y},set:function(e){this._y=e}}]),e}())})),bn=t(((e,t)=>{var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=i(yn());function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var s=function(){function e(t,n,i,a){var s=this;if(o(this,e),!document)throw Error(`no DOM found`);if(t instanceof window.Node&&t.tagName===`CANVAS`)this.canvas=t;else if(typeof t==`string`)this.canvas=document.querySelector(t);else throw Error(`can't look for canvas based on '`+t+`'`);if(!this.canvas)throw Error(`canvas not found`);this.canvas.width=n||500,this.canvas.height=i||500,this.canvas.style.cursor=`crosshair`,this.mouse=new r.default;var c=function(e){e.preventDefault();var t=s.canvas.getBoundingClientRect(),n=e.changedTouches&&e.changedTouches[0]||e,r=n.offsetX,i=n.offsetY;r===void 0&&(r=n.clientX+document.documentElement.scrollLeft-t.left),i===void 0&&(i=n.clientY+document.documentElement.scrollTop-t.top),s.mouse.down?(s.draw(r,i),!s._dirty&&(r!==s.mouse.x||i!==s.mouse.y)&&(s._dirty=!0,s.fireDirty())):(s.mouse.x=r,s.mouse.y=i)},l=function(e){if(e.preventDefault(),c(e),s._mode===`fill`){s.fill();return}s.mouse.px=s.mouse.x,s.mouse.py=s.mouse.y,s.mouse.down=!0,s.context.beginPath(),s.context.moveTo(s.mouse.px,s.mouse.py)},u=function(){s.mouse.down=!1,s.context.closePath()};this.canvas.addEventListener(`mousemove`,c),this.canvas.addEventListener(`mousedown`,l),document.addEventListener(`mouseup`,u),this.canvas.addEventListener(`touchstart`,l),this.canvas.addEventListener(`touchend`,u),this.canvas.addEventListener(`touchmove`,c),this.destroy=function(){s.clear(),s.canvas.removeEventListener(`mousemove`,c),s.canvas.removeEventListener(`mousedown`,l),document.removeEventListener(`mouseup`,u),s.canvas.removeEventListener(`touchstart`,l),s.canvas.removeEventListener(`touchend`,u),s.canvas.removeEventListener(`touchmove`,c)},this.context=this.canvas.getContext(`2d`),this.context.globalCompositeOperation=`source-over`,this.context.globalAlpha=1,this.context.strokeStyle=a||`rgba(0,0,0,1)`,this.context.lineCap=`round`,this.context.lineJoin=`round`,this.context.translate(.5,.5),this._filling=!1,this._fillStack=[],this.SMOOTHING_INIT=.85,this.WEIGHT_SPREAD=10,this._smoothing=this.SMOOTHING_INIT,this._maxWeight=12,this._thickness=2,this._targetThickness=2,this._weight=2,this._mode=`draw`,this._adaptive=!0}return n(e,[{key:`draw`,value:function(t,n){var r=this.mouse,i=this.context,a=e.lineDistance(t,n,r.px,r.py),o=Math.min(.87,this._smoothing+(a-60)/3e3);r.x=t-(t-r.px)*o,r.y=n-(n-r.py)*o;var s=e.lineDistance(r.x,r.y,r.px,r.py);this._adaptive?(this._targetThickness=(s-1)/49*(this._maxWeight-this._weight)+this._weight,this._thickness>this._targetThickness?this._thickness-=.5:this._thickness<this._targetThickness&&(this._thickness+=.5),i.lineWidth=this._thickness):i.lineWidth=this._weight,i.quadraticCurveTo(r.px,r.py,r.x,r.y),i.stroke(),r.px=r.x,r.py=r.y}},{key:`fireDirty`,value:function(){var e=document.createEvent(`Event`);e.initEvent(`dirty`,!0,!0),this.canvas.dispatchEvent(e)}},{key:`clear`,value:function(){this.dirty&&(this._dirty=!1,this.fireDirty(),this.context.globalCompositeOperation===`destination-out`?(this.mode=`draw`,this.context.clearRect(-10,-10,this.canvas.width+20,this.canvas.height+20),this.mode=`erase`):this.context.clearRect(-10,-10,this.canvas.width+20,this.canvas.height+20))}},{key:`toImage`,value:function(){return this.canvas.toDataURL()}},{key:`fill`,value:function(){var e=this,t=this.mouse,n=this.context,r=Array.prototype.slice.call(n.getImageData(t.x,t.y,1,1).data,0);this._filling?this._fillStack.push([t.x,t.y,r]):(this.canvas.style.cursor=`progress`,this._filling=!0,setTimeout(function(){e._floodFill(t.x,t.y,r)},100))}},{key:`_floodFill`,value:function(t,n,r){var i=this,o=this.context,s=Math.floor(t),c=Math.floor(n),l=o.canvas.width,u=o.canvas.height,d=[[s,c]],f=e.hexToRgb(this.color),p=o.getImageData(0,0,o.canvas.width,o.canvas.height),m=Math.min(o.globalAlpha*10*255,255),h=e.colorPixel.apply(e,[p.data].concat(a(f),[r,m])),g=e.matchColor.apply(e,[p.data].concat(a(r)));if(e.matchColor.apply(e,[p.data].concat([].concat(a(f),[255])))((c*o.canvas.width+s)*4)){this._filling=!1,setTimeout(function(){i.canvas.style.cursor=`crosshair`},100);return}for(;d.length;){for(var _=d.pop(),v=_[0],y=_[1],b=(y*l+v)*4;y-->=0&&g(b);)b-=l*4;b+=l*4,++y;for(var x=!1,S=!1;y++<u-1&&g(b);)h(b),v>0&&(g(b-4)?x||=(d.push([v-1,y]),!0):x&&=!1),v<l-1&&(g(b+4)?S||=(d.push([v+1,y]),!0):S&&=!1),b+=l*4}o.putImageData(p,0,0),this._fillStack.length?this._floodFill.apply(this,a(this._fillStack.shift())):(this._filling=!1,setTimeout(function(){i.canvas.style.cursor=`crosshair`},100))}},{key:`color`,get:function(){return this.context.strokeStyle},set:function(e){if(typeof e!=`string`)throw Error(`wrong argument type`);this.context.strokeStyle=e}},{key:`weight`,get:function(){return this._weight},set:function(e){if(typeof e!=`number`)throw Error(`wrong argument type`);this._weight=e,this._thickness=e,this._targetThickness=e,this._maxWeight=e+this.WEIGHT_SPREAD}},{key:`adaptiveStroke`,get:function(){return this._adaptive},set:function(e){this._adaptive=!!e}},{key:`mode`,get:function(){return this._mode},set:function(e){if(typeof e!=`string`)throw Error(`wrong argument type`);switch(e){case`erase`:this._mode=`erase`,this.context.globalCompositeOperation=`destination-out`;break;case`fill`:this._mode=`fill`,this.context.globalCompositeOperation=`source-over`;break;default:this._mode=`draw`,this.context.globalCompositeOperation=`source-over`}}},{key:`dirty`,get:function(){return!!this._dirty}},{key:`smoothing`,get:function(){return this._smoothing===this.SMOOTHING_INIT},set:function(e){if(typeof e!=`boolean`)throw Error(`wrong argument type`);this._smoothing=e?this.SMOOTHING_INIT:0}},{key:`opacity`,set:function(e){if(typeof e!=`number`)throw Error(`wrong argument type`);e>=1?this.context.globalAlpha=1:this.context.globalAlpha=e/10}}],[{key:`lineDistance`,value:function(e,t,n,r){var i=(n-e)**2,a=(r-t)**2;return Math.sqrt(i+a)}},{key:`hexToRgb`,value:function(e){var t=e.match(/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{key:`matchColor`,value:function(e,t,n,r,i){return function(a){var o=e[a],s=e[a+1],c=e[a+2],l=e[a+3];return o===t&&s===n&&c===r&&l===i}}},{key:`colorPixel`,value:function(t,n,r,i,o,s){var c=e.matchColor.apply(e,[t].concat(a(o)));return function(e){t[e]=n,t[e+1]=r,t[e+2]=i,t[e+3]=s,c(e+4)||(t[e+4]=t[e+4]*.01+n*.99,t[e+4+1]=t[e+4
14+1]*.01+r*.99,t[e+4+2]=t[e+4+2]*.01+i*.99,t[e+4+3]=t[e+4+3]*.01+s*.99),c(e-4)||(t[e-4]=t[e-4]*.01+n*.99,t[e-4+1]=t[e-4+1]*.01+r*.99,t[e-4+2]=t[e-4+2]*.01+i*.99,t[e-4+3]=t[e-4+3]*.01+s*.99)}}}]),e}();function c(e,t,n,r){return new s(e,t,n,r)}t.exports=c,t.exports.Atrament=s})),xn=t(((e,t)=>{var n=st(),r=ot(),i=it();function a(e,t){var a={};return t=i(t,3),r(e,function(e,r,i){n(a,r,t(e,r,i))}),a}t.exports=a})),Sn=e(_()),Cn=e(bn()),wn=e(xn()),Tn=e=>(0,V.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:24,viewBox:`0 -960 960 960`,width:24,...e,children:(0,V.jsx)(`path`,{d:`M346-140 100-386q-10-10-15-22t-5-25q0-13 5-25t15-22l230-229-106-106 62-65 400 400q10 10 14.5 22t4.5 25q0 13-4.5 25T686-386L440-140q-10 10-22 15t-25 5q-13 0-25-5t-22-15Zm47-506L179-432h428L393-646Zm399 526q-36 0-61-25.5T706-208q0-27 13.5-51t30.5-47l42-54 44 54q16 23 30 47t14 51q0 37-26 62.5T792-120Z`})}),En=e=>(0,V.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:24,viewBox:`0 -960 960 960`,width:24,...e,children:(0,V.jsx)(`path`,{d:`M280-200v-80h284q63 0 109.5-40T720-420q0-60-46.5-100T564-560H312l104 104-56 56-200-200 200-200 56 56-104 104h252q97 0 166.5 63T800-420q0 94-69.5 157T564-200H280Z`})}),X=e(ue()),Dn=[[`rgb(  0,    0,    0)`,`Black`],[`rgb( 38,   38,   38)`,`Gray 15`],[`rgb( 77,   77,   77)`,`Grey 30`],[`rgb(128,  128,  128)`,`Grey 50`],[`rgb(171,  171,  171)`,`Grey 67`],[`rgb(217,  217,  217)`,`Grey 85`],[`rgb(255,  255,  255)`,`White`],[`rgb(128,    0,    0)`,`Maroon`],[`rgb(209,    0,    0)`,`English-red`],[`rgb(255,   54,   34)`,`Tomato`],[`rgb(252,   60,    3)`,`Orange-red`],[`rgb(255,  140,  105)`,`Salmon`],[`rgb(252,  232,   32)`,`Cadium-yellow`],[`rgb(243,  253,   37)`,`Lemon yellow`],[`rgb(121,    5,   35)`,`Dark crimson`],[`rgb(169,   32,   62)`,`Deep carmine`],[`rgb(255,  140,    0)`,`Orange`],[`rgb(255,  168,   18)`,`Dark tangerine`],[`rgb(217,  144,   88)`,`Persian orange`],[`rgb(194,  178,  128)`,`Sand`],[`rgb(255,  229,  180)`,`Peach`],[`rgb(100,   54,   46)`,`Bole`],[`rgb(108,   41,   52)`,`Dark cordovan`],[`rgb(163,   65,   44)`,`Chestnut`],[`rgb(228,  136,  100)`,`Dark salmon`],[`rgb(255,  195,  143)`,`Apricot`],[`rgb(255,  219,  188)`,`Unbleached silk`],[`rgb(242,  227,  198)`,`Straw`],[`rgb( 53,   19,   13)`,`Bistre`],[`rgb( 84,   42,   14)`,`Dark chocolate`],[`rgb(102,   51,   43)`,`Burnt sienna`],[`rgb(184,   66,    0)`,`Sienna`],[`rgb(216,  153,   12)`,`Yellow ochre`],[`rgb(210,  180,  140)`,`Tan`],[`rgb(232,  204,  144)`,`Dark wheat`],[`rgb(  0,   49,   83)`,`Prussian blue`],[`rgb( 48,   69,  119)`,`Dark grey blue`],[`rgb(  0,   71,  171)`,`Cobalt blue`],[`rgb( 31,  117,  254)`,`Blue`],[`rgb(120,  180,  255)`,`Bright french blue`],[`rgb(171,  200,  255)`,`Bright steel blue`],[`rgb(208,  231,  255)`,`Ice blue`],[`rgb( 30,   51,   58)`,`Medium jungle green`],[`rgb( 47,   79,   79)`,`Dark slate grey`],[`rgb( 74,  104,   93)`,`Dark grullo green`],[`rgb(  0,  128,  128)`,`Teal`],[`rgb( 67,  170,  176)`,`Turquoise`],[`rgb(109,  174,  199)`,`Cerulean frost`],[`rgb(173,  217,  186)`,`Tiffany green`],[`rgb( 22,   34,   29)`,`Gray-asparagus`],[`rgb( 36,   48,   45)`,`Medium dark teal`],[`rgb( 74,  104,   93)`,`Xanadu`],[`rgb(119,  198,  121)`,`Mint`],[`rgb(175,  205,  182)`,`Timberwolf`],[`rgb(185,  245,  246)`,`Celeste`],[`rgb(193,  255,  234)`,`Aquamarine`],[`rgb( 29,   52,   35)`,`Cal Poly Pomona`],[`rgb(  1,   68,   33)`,`Forest green`],[`rgb( 42,  128,    0)`,`Napier green`],[`rgb(128,  128,    0)`,`Olive`],[`rgb( 65,  156,  105)`,`Sea green`],[`rgb(189,  246,   29)`,`Green-yellow`],[`rgb(231,  244,  134)`,`Bright chartreuse`],[`rgb(138,   23,  137)`,`Purple`],[`rgb( 78,   39,  138)`,`Violet`],[`rgb(193,   75,  110)`,`Dark thulian pink`],[`rgb(222,   49,   99)`,`Cerise`],[`rgb(255,   20,  147)`,`Deep pink`],[`rgb(255,  102,  204)`,`Rose pink`],[`rgb(255,  203,  219)`,`Pink`],[`rgb(255,  255,  255)`,`White`],[`rgb(229,   17,    1)`,`RGB Red`],[`rgb(  0,  255,    0)`,`RGB Green`],[`rgb(  0,    0,  255)`,`RGB Blue`],[`rgb(  0,  255,  255)`,`CMYK Cyan`],[`rgb(255,    0,  255)`,`CMYK Magenta`],[`rgb(255,  255,    0)`,`CMYK Yellow`]],On=[];for(let e=0;e<7;e++){for(let t=0;t<11;t++)On.push(Dn[t*7+e]);On.push(null)}function kn(e,t){let n=e.split(`,`),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]),a=i.length,o=new Uint8Array(a);for(;a--;)o[a]=i.charCodeAt(a);return new File([o],t,{type:r})}var An={normal:[500,500,`Square 500`],tootbanner:[702,330,`Tootbanner`],s640x480:[640,480,`640×480 - 480p`],s800x600:[800,600,`800×600 - SVGA`],s720x480:[720,405,`720x405 - 16:9`]},jn=e=>({options:e.getIn([`compose`,`doodle`])}),Mn=e=>({setOpt:t=>e(re(t)),submit:t=>e(C([t]))}),Nn=class extends lt{constructor(...e){super(...e),k(this,`handleKeyUp`,e=>{if(e.target.nodeName!==`INPUT`){if(e.key===`Delete`){e.preventDefault(),this.handleClearBtn();return}
14(e.key===`Backspace`||e.key===`z`&&(e.ctrlKey||e.metaKey))&&(e.preventDefault(),this.undo()),(e.key===`Control`||e.key===`Meta`)&&(this.controlHeld=!1,this.swapped=!1),e.key===`Shift`&&(this.shiftHeld=!1,this.mode=`draw`)}}),k(this,`handleKeyDown`,e=>{(e.key===`Control`||e.key===`Meta`)&&(this.controlHeld=!0,this.swapped=!0),e.key===`Shift`&&(this.shiftHeld=!0,this.mode=`fill`)}),k(this,`setCanvasRef`,e=>{this.canvas=e,e&&(e.addEventListener(`dirty`,()=>{this.saveUndo(),this.sketcher._dirty=!1}),e.addEventListener(`click`,()=>{this.mode===`fill`&&this.saveUndo()}),e.addEventListener(`contextmenu`,e=>{e.preventDefault()}),e.addEventListener(`mousedown`,e=>{e.button===2&&(this.swapped=!0)}),e.addEventListener(`mouseup`,e=>{e.button===2&&(this.swapped=this.controlHeld)}),this.initSketcher(e),this.mode=`draw`)}),k(this,`onDoneButton`,()=>{let e=kn(this.sketcher.toImage(),`doodle.png`);this.props.submit(e),this.props.onClose()}),k(this,`onCancelButton`,()=>{this.undos.length>1&&!confirm(`Discard doodle? All changes will be lost!`)||this.props.onClose()}),k(this,`clearScreen`,()=>{this.ctx.fillStyle=this.bg,this.ctx.fillRect(-1,-1,this.canvas.width+2,this.canvas.height+2),this.undos=[],this.doSaveUndo()}),k(this,`undo`,()=>{if(this.undos.length>1){this.undos.pop();let e=this.undos.pop();this.sketcher.clear(),this.ctx.putImageData(e,0,0),this.doSaveUndo()}}),k(this,`doSaveUndo`,()=>{this.undos.push(this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height))}),k(this,`saveUndo`,(0,Sn.default)(()=>{this.doSaveUndo()},100)),k(this,`onPaletteClick`,e=>{let t=e.target.dataset.color;this.controlHeld?this.bg=t:this.fg=t,e.target.blur(),e.preventDefault()}),k(this,`onPaletteRClick`,e=>{this.bg=e.target.dataset.color,e.target.blur(),e.preventDefault()}),k(this,`setModeDraw`,e=>{this.mode=`draw`,e.target.blur()}),k(this,`setModeFill`,e=>{this.mode=`fill`,e.target.blur()}),k(this,`tglSmooth`,e=>{this.smoothing=!this.smoothing,e.target.blur()}),k(this,`tglAdaptive`,e=>{this.adaptiveStroke=!this.adaptiveStroke,e.target.blur()}),k(this,`setWeight`,e=>{this.weight=+e.target.value||1}),k(this,`changeSize`,e=>{let t=e.target.value;t!==this.oldSize&&(this.undos.length>1&&!confirm(`Change canvas size? This will erase your current drawing!`)||(this.size=t))}),k(this,`handleClearBtn`,()=>{this.undos.length>1&&!confirm(`Clear canvas? This will erase your current drawing!`)||this.clearScreen()})}get fg(){return this.props.options.get(`fg`)}set fg(e){this.props.setOpt({fg:e})}get bg(){return this.props.options.get(`bg`)}set bg(e){this.props.setOpt({bg:e})}get swapped(){return this.props.options.get(`swapped`)}set swapped(e){this.props.setOpt({swapped:e})}get mode(){return this.props.options.get(`mode`)}set mode(e){this.props.setOpt({mode:e})}get weight(){return this.props.options.get(`weight`)}set weight(e){this.props.setOpt({weight:e})}get opacity(){return this.props.options.get(`opacity`)}set opacity(e){this.props.setOpt({opacity:e})}get adaptiveStroke(){return this.props.options.get(`adaptiveStroke`)}set adaptiveStroke(e){this.props.setOpt({adaptiveStroke:e})}get smoothing(){return this.props.options.get(`smoothing`)}set smoothing(e){this.props.setOpt({smoothing:e})}get size(){return this.props.options.get(`size`)}set size(e){this.props.setOpt({size:e})}componentDidMount(){this.controlHeld=!1,this.shiftHeld=!1,this.swapped=!1,window.addEventListener(`keyup`,this.handleKeyUp,!1),window.addEventListener(`keydown`,this.handleKeyDown,!1)}componentWillUnmount(){window.removeEventListener(`keyup`,this.handleKeyUp,!1),window.removeEventListener(`keydown`,this.handleKeyDown,!1),this.sketcher&&this.sketcher.destroy()}initSketcher(e=null){let t=An[this.size];this.sketcher&&this.sketcher.destroy(),this.sketcher=new Cn.default(e||this.canvas,t[0],t[1]),e&&(this.ctx=this.sketcher.context,this.updateSketcherSettings()),this.clearScreen()}updateSketcherSettings(){this.sketcher&&(this.oldSize!==this.size&&this.initSketcher(),this.sketcher.color=this.swapped?this.bg:this.fg,this.sketcher.opacity=this.opacity,this.sketcher.weight=this.weight,this.sketcher.mode=this.mode,this.sketcher.smoothing=this.smoothing,this.sketcher.adaptiveStroke=this.adaptiveStroke,this.oldSize=this.size)}render(){return this.updateSketcherSettings(),(0,V.jsxs)(`div`,{className:`modal-root__modal doodle-modal`,children:[(0,V.jsx)(`div`,{className:`doodle-modal__container`,children:(0,V.jsx)(`canvas`,{ref:this.setCanvasRef})}),(0,V.jsxs)(`div`,{className:`doodle-modal__action-bar`,children:[(0,V.jsxs)(`div`,{className:`doodle-toolbar`,children:[(0,V.jsx)(N,{text:`Done`,onClick:this.onDoneButton}),(0,V.jsx)(N,{text:`Cancel`,onClick:this.onCancelButton})]}),(0,V.jsx)(`div`,{className:`filler`}
14),(0,V.jsxs)(`div`,{className:`doodle-toolbar with-inputs`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{htmlFor:`dd_smoothing`,children:`Smoothing`}),(0,V.jsx)(`span`,{className:`val`,children:(0,V.jsx)(`input`,{type:`checkbox`,id:`dd_smoothing`,onChange:this.tglSmooth,checked:this.smoothing})})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{htmlFor:`dd_adaptive`,children:`Adaptive`}),(0,V.jsx)(`span`,{className:`val`,children:(0,V.jsx)(`input`,{type:`checkbox`,id:`dd_adaptive`,onChange:this.tglAdaptive,checked:this.adaptiveStroke})})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{htmlFor:`dd_weight`,children:`Weight`}),(0,V.jsx)(`span`,{className:`val`,children:(0,V.jsx)(`input`,{type:`number`,min:1,id:`dd_weight`,value:this.weight,onChange:this.setWeight})})]}),(0,V.jsx)(`div`,{children:(0,V.jsx)(`select`,{"aria-label":`Canvas size`,onInput:this.changeSize,defaultValue:this.size,children:Object.values((0,wn.default)(An,(e,t)=>(0,V.jsx)(`option`,{value:t,children:e[2]},t)))})})]}),(0,V.jsxs)(`div`,{className:`doodle-toolbar`,children:[(0,V.jsx)(F,{icon:`pencil`,iconComponent:vt,title:`Draw`,label:`Draw`,onClick:this.setModeDraw,size:18,active:this.mode===`draw`,inverted:!0}),(0,V.jsx)(F,{icon:`bath`,iconComponent:Tn,title:`Fill`,label:`Fill`,onClick:this.setModeFill,size:18,active:this.mode===`fill`,inverted:!0}),(0,V.jsx)(F,{icon:`undo`,iconComponent:En,title:`Undo`,label:`Undo`,onClick:this.undo,size:18,inverted:!0}),(0,V.jsx)(F,{icon:`trash`,iconComponent:St,title:`Clear`,label:`Clear`,onClick:this.handleClearBtn,size:18,inverted:!0})]}),(0,V.jsx)(`div`,{className:`doodle-palette`,children:On.map((e,t)=>e===null?(0,V.jsx)(`br`,{},t):(0,V.jsx)(`button`,{style:{backgroundColor:e[0]},onClick:this.onPaletteClick,onContextMenu:this.onPaletteRClick,"data-color":e[0],title:e[1],className:(0,U.default)({foreground:this.fg===e[0],background:this.bg===e[0]})},t))})]})]})}};k(Nn,`propTypes`,{options:mn.default.map,onClose:X.default.func.isRequired,setOpt:X.default.func.isRequired,submit:X.default.func.isRequired});var Pn=v(jn,Mn)(Nn),Fn=s({favourite:{id:`status.favourite`,defaultMessage:`Favorite`}}),In=({status:e,onFavourite:t,onClose:n})=>{let r=a(),o=e.get(`id`),s=(0,B.useCallback)(()=>{t(e),n()},[n,t,e]),c=(0,B.useCallback)(()=>{n()},[n]);return(0,V.jsxs)(`div`,{className:`modal-root__modal safety-action-modal`,children:[(0,V.jsxs)(`div`,{className:`safety-action-modal__top`,children:[(0,V.jsxs)(`div`,{className:`safety-action-modal__header`,children:[(0,V.jsx)(`div`,{className:`safety-action-modal__header__icon`,children:(0,V.jsx)(P,{icon:d,id:`star`})}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h1`,{children:(0,V.jsx)(i,{id:`favourite_modal.favourite`,defaultMessage:`Favourite post?`})}),(0,V.jsx)(`div`,{children:(0,V.jsx)(i,{id:`boost_modal.combo`,defaultMessage:`You can press {combo} to skip this next time`,values:{combo:(0,V.jsxs)(`span`,{className:`hotkey-combination`,children:[(0,V.jsx)(`kbd`,{children:`Shift`}),`+`,(0,V.jsx)(P,{id:`star`,icon:d})]})}})})]})]}),(0,V.jsx)(`div`,{className:`safety-action-modal__status`,children:(0,V.jsx)(bt,{statusId:o})})]}),(0,V.jsx)(`div`,{className:(0,U.default)(`safety-action-modal__bottom`),children:(0,V.jsxs)(`div`,{className:`safety-action-modal__actions`,children:[(0,V.jsx)(`div`,{className:`spacer`}),(0,V.jsx)(`button`,{onClick:c,className:`link-button`,type:`button`,children:(0,V.jsx)(i,{id:`confirmation_modal.cancel`,defaultMessage:`Cancel`})}),(0,V.jsx)(N,{onClick:s,text:r.formatMessage(Fn.favourite),autoFocus:!0})]})})]})},Ln=s({close:{id:`lightbox.close`,defaultMessage:`Close`}}),Rn=({src:e,alt:t,onClose:n})=>{let r=a(),[i,o]=(0,B.useState)(!1),s=(0,B.useCallback)(()=>{o(e=>!e)},[o]),c=(0,U.default)(`media-modal__navigation`,{"media-modal__navigation--hidden":i});return(0,V.jsxs)(`div`,{className:`modal-root__modal media-modal`,children:[(0,V.jsx)(`div`,{className:`media-modal__closer`,role:`presentation`,onClick:n,children:(0,V.jsx)(Ze,{src:e,width:400,height:400,alt:t,onClick:s})}),(0,V.jsx)(`div`,{className:c,children:(0,V.jsx)(`div`,{className:`media-modal__buttons`,children:(0,V.jsx)(F,{className:`media-modal__close`,t
14itle:r.formatMessage(Ln.close),icon:`times`,iconComponent:p,onClick:n})})})]})},zn=({loading:e,onClose:t,onRetry:n})=>{let r=(0,B.useCallback)(()=>{t(void 0,!1)},[t]),a=(0,B.useCallback)(()=>{n&&n()},[n]);return(0,V.jsx)(`div`,{className:`modal-root__modal modal-placeholder`,"aria-busy":e,children:e?(0,V.jsx)(ze,{}):(0,V.jsxs)(`div`,{className:`modal-placeholder__error`,children:[(0,V.jsx)(tt,{src:`/oops.gif`,staticSrc:`/oops.png`,className:`modal-placeholder__error__image`}),(0,V.jsxs)(`div`,{className:`modal-placeholder__error__message`,children:[(0,V.jsx)(`p`,{children:(0,V.jsx)(i,{id:`bundle_modal_error.message`,defaultMessage:`Something went wrong while loading this screen.`})}),(0,V.jsxs)(`div`,{className:`modal-placeholder__error__message__actions`,children:[(0,V.jsx)(N,{onClick:a,children:(0,V.jsx)(i,{id:`bundle_modal_error.retry`,defaultMessage:`Try again`})}),(0,V.jsx)(N,{onClick:r,className:`button button-secondary`,children:(0,V.jsx)(i,{id:`bundle_modal_error.close`,defaultMessage:`Close`})})]})]})]})})},Bn=(e,{statusId:t})=>({status:e.getIn([`statuses`,t])}),Vn=class extends lt{componentDidMount(){let{media:e,onChangeBackgroundColor:t}=this.props,n=$e(e.get(`blurhash`));n&&t(n)}componentWillUnmount(){this.props.onChangeBackgroundColor(null)}render(){let{media:e,status:t,onClose:n}=this.props,r=this.props.options||{},i=t.getIn([`translation`,`language`])||t.get(`language`),a=e.getIn([`translation`,`description`])||e.get(`description`);return(0,V.jsxs)(`div`,{className:`modal-root__modal video-modal`,children:[(0,V.jsx)(`div`,{className:`video-modal__container`,children:(0,V.jsx)(qe,{preview:e.get(`preview_url`),frameRate:e.getIn([`meta`,`original`,`frame_rate`]),blurhash:e.get(`blurhash`),src:e.get(`url`),startTime:r.startTime,startPlaying:r.autoPlay,startVolume:r.defaultVolume,onCloseVideo:n,autoFocus:!0,detailed:!0,alt:a,lang:i})}),(0,V.jsx)(`div`,{className:`media-modal__overlay`,children:t&&(0,V.jsx)(Qe,{statusId:t.get(`id`),withOpenButton:!0,onClose:n})})]})}};k(Vn,`propTypes`,{media:mn.default.map.isRequired,statusId:X.default.string,status:mn.default.map,options:X.default.shape({startTime:X.default.number,autoPlay:X.default.bool,defaultVolume:X.default.number}),onClose:X.default.func.isRequired,onChangeBackgroundColor:X.default.func.isRequired});var Hn=v(Bn,null,null,{forwardRef:!0})(Vn);function Un(e){return[`public`,`followers`,`nobody`].includes(e)}function Wn(e){return[`public`,`unlisted`,`private`,`direct`].includes(e)}var Gn=({disabled:e,items:t,current:n,onChange:r,labelId:i,descriptionId:o,classPrefix:s,className:c,id:l,...u})=>{let d=a(),[f,p]=(0,B.useState)(null),m=(0,B.useId)(),h=l??`${m}-button`,g=`${m}-listbox`,[_,v]=(0,B.useState)(!1),y=(0,B.useCallback)(()=>{e||v(e=>(f?.focus(),!e))},[f,e]),b=(0,B.useCallback)(()=>{v(!1),f?.focus()},[f]),x=(0,B.useMemo)(()=>t.find(e=>e.value===n)?.text??d.formatMessage({id:`dropdown.empty`,defaultMessage:`Select an option`}),[n,d,t]);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`button`,{type:`button`,...u,id:h,"aria-labelledby":`${i} ${h}`,"aria-describedby":o,"aria-expanded":_,"aria-controls":g,onClick:y,disabled:e,className:(0,U.default)(`${s}__button`,{active:_,disabled:e},c),ref:p,children:[x,(0,V.jsx)(P,{id:`unfold-icon`,icon:dt,className:`${s}__icon`})]}),(0,V.jsx)(Ve,{matchReferenceWidth:!0,isOpen:_,placement:`bottom-start`,onClose:b,reference:f,children:({props:e,placement:i})=>(0,V.jsx)(`div`,{...e,className:`${s}__overlay`,children:(0,V.jsx)(`div`,{className:(0,U.default)(`dropdown-animation`,`${s}__dropdown`,i),id:g,children:(0,V.jsx)(_t,{items:t,value:n,onClose:b,onChange:r,classNamePrefix:s})})})})]})},Z=s({close:{id:`lightbox.close`,defaultMessage:`Close`},buttonTitle:{id:`visibility_modal.button_title`,defaultMessage:`Set visibility`},quotePublic:{id:`visibility_modal.quote_public`,defaultMessage:`Anyone`},quoteFollowers:{id:`visibility_modal.quote_followers`,defaultMessage:`Followers only`},quoteNobody:{id:`visibility_modal.quote_nobody`,defaultMessage:`Just me`}}),Kn=me([e=>e.statuses,(e,t)=>t,e=>e.compose.get(`quote_policy`)],(e,t,n)=>{if(!t)return n;let r=e.get(t);if(!r)return`public`;let i=r.getIn([`quote_approval`,`automatic`,0])||`nobody`,a=r.get(`visibility`);return a===`private`||a===`direct`?`nobody`:Un(i)?i:a===`unlisted`?`followers`:`public`}),qn=me([e=>e.statuses,(e,t)=>!!t,e=>e.compose.get(`quoted_status_id`)],(e,t,n)=>{if(t||!n)return!1;let r=e.get(n);return r?r.get(`visibility`)===`private`:!1}),Jn=(0,B.forwardRef)(({onClose:e,onChange:t,statusId:n},r)=>{let o=a(),s=j(e=>
14n?e.statuses.getIn([n,`visibility`],`public`)??`public`:e.compose.get(`privacy`)),c=j(e=>Kn(e,n)),[l,u]=(0,B.useState)(s),[d,f]=(0,B.useState)(c),m=!!n,h=l===`private`||l===`direct`,g=j(qn),_=j(e=>e.compose.get(`quoted_status_id`)!==null),v=(0,B.useMemo)(()=>{let e=[{value:`private`,text:o.formatMessage(R.private_short),meta:o.formatMessage(R.private_long),icon:`lock`,iconComponent:at},{value:`direct`,text:o.formatMessage(R.direct_short),meta:o.formatMessage(R.direct_long),icon:`at`,iconComponent:nt}];return g||e.unshift({value:`public`,text:o.formatMessage(R.public_short),meta:o.formatMessage(R.public_long),icon:`globe`,iconComponent:ct},{value:`unlisted`,text:o.formatMessage(R.unlisted_short),meta:o.formatMessage(R.unlisted_long),icon:`unlock`,iconComponent:ut}),e},[o,g]),y=(0,B.useMemo)(()=>[{value:`public`,text:o.formatMessage(Z.quotePublic)},{value:`followers`,text:o.formatMessage(Z.quoteFollowers)},{value:`nobody`,text:o.formatMessage(Z.quoteNobody)}],[o]),b=(0,B.useCallback)(e=>{Wn(e)&&u(e)},[]),x=(0,B.useCallback)(e=>{Un(e)&&f(e)},[]),S=(0,B.useCallback)(()=>{t(l,d),e()},[t,e,l,d]),C=(0,B.useId)(),w=`${C}-visibility-label`,T=`${C}-visibility-desc`,E=`${C}-quote-label`,D=`${C}-quote-desc`;return(0,V.jsxs)(`div`,{className:`modal-root__modal dialog-modal visibility-modal`,children:[(0,V.jsxs)(`div`,{className:`dialog-modal__header`,children:[(0,V.jsx)(F,{className:`dialog-modal__header__close`,title:o.formatMessage(Z.close),icon:`times`,iconComponent:p,onClick:e}),(0,V.jsx)(Oe,{as:`h1`,className:`dialog-modal__header__title`,children:(0,V.jsx)(i,{id:`visibility_modal.header`,defaultMessage:`Visibility and interaction`})})]}),(0,V.jsxs)(`div`,{className:`dialog-modal__content`,children:[(0,V.jsx)(`div`,{className:`dialog-modal__content__description`,children:(0,V.jsx)(i,{id:`visibility_modal.instructions`,defaultMessage:`Control who can interact with this post. You can also apply settings to all future posts by navigating to <link>Preferences > Posting defaults</link>.`,values:{link:e=>(0,V.jsx)(`a`,{href:`/settings/preferences/posting_defaults`,children:e})},tagName:`p`})}),(0,V.jsxs)(`div`,{className:`dialog-modal__content__form`,children:[(0,V.jsxs)(`div`,{className:(0,U.default)(`visibility-dropdown`,{disabled:m}),children:[(0,V.jsx)(`label`,{className:`visibility-dropdown__label`,id:w,children:(0,V.jsx)(i,{id:`visibility_modal.privacy_label`,defaultMessage:`Visibility`})}
14),(0,V.jsx)(Gn,{items:v,current:l,onChange:b,labelId:w,descriptionId:T,classPrefix:`visibility-dropdown`,disabled:m}),!!n&&(0,V.jsx)(`p`,{className:`visibility-dropdown__helper`,id:`visibilityDescriptionId`,children:(0,V.jsx)(i,{id:`visibility_modal.helper.privacy_editing`,defaultMessage:`Visibility can't be changed after a post is published.`})}),!n&&g&&(0,V.jsx)(`p`,{className:`visibility-dropdown__helper`,id:`visibilityDescriptionId`,children:(0,V.jsx)(i,{id:`visibility_modal.helper.privacy_private_self_quote`,defaultMessage:`Self-quotes of private posts cannot be made public.`})})]}),(0,V.jsxs)(`div`,{className:(0,U.default)(`visibility-dropdown`,{disabled:h}),children:[(0,V.jsx)(`label`,{className:`visibility-dropdown__label`,id:E,children:(0,V.jsx)(i,{id:`visibility_modal.quote_label`,defaultMessage:`Who can quote`})}),(0,V.jsx)(Gn,{items:y,current:h?`nobody`:d,onChange:x,labelId:E,descriptionId:D,classPrefix:`visibility-dropdown`,disabled:h}),(0,V.jsx)(Yn,{policy:d,visibility:l,className:`visibility-dropdown__helper`,id:D})]}),_&&l===`direct`&&(0,V.jsxs)(`div`,{className:`visibility-modal__quote-warning`,children:[(0,V.jsx)(i,{id:`visibility_modal.direct_quote_warning.title`,defaultMessage:`Quotes can't be embedded in private mentions`,tagName:`h3`}),(0,V.jsx)(i,{id:`visibility_modal.direct_quote_warning.text`,defaultMessage:`If you save the current settings, the embedded quote will be converted to a link.`,tagName:`p`})]})]}),(0,V.jsxs)(`div`,{className:`dialog-modal__content__actions`,children:[(0,V.jsx)(N,{onClick:e,secondary:!0,children:(0,V.jsx)(i,{id:`confirmation_modal.cancel`,defaultMessage:`Cancel`})}),(0,V.jsx)(N,{onClick:S,children:(0,V.jsx)(i,{id:`visibility_modal.save`,defaultMessage:`Save`})})]})]})]})});Jn.displayName=`VisibilityModal`;var Yn=({policy:e,visibility:t,...n})=>{let r;return t===`unlisted`&&e!==`nobody`&&(r=(0,V.jsx)(i,{id:`visibility_modal.helper.unlisted_quoting`,defaultMessage:`When people quote you, their post will also be hidden from trending timelines.`})),t===`private`&&(r=(0,V.jsx)(i,{id:`visibility_modal.helper.private_quoting`,defaultMessage:`Follower-only posts authored on Mastodon can't be quoted by others.`})),t===`direct`&&(r=(0,V.jsx)(i,{id:`visibility_modal.helper.direct_quoting`,defaultMessage:`Private mentions authored on Mastodon can't be quoted by others.`})),r?(0,V.jsx)(`p`,{...n,children:r}):null},Xn={checkbox_wrapper:`_comp_confirmation_modals__checkbox_wrapper`},Q=s({title:{id:`confirmations.private_quote_notify.title`,defaultMessage:`Share with followers and mentioned users?`},message:{id:`confirmations.private_quote_notify.message`,defaultMessage:`The person you are quoting and other mentions will be notified and will be able to view your post, even if they're not following you.`},confirm:{id:`confirmations.private_quote_notify.confirm`,defaultMessage:`Publish post`},cancel:{id:`confirmations.private_quote_notify.cancel`,defaultMessage:`Back to editing`}}),Zn=(0,B.forwardRef)(({onClose:e},t)=>{let n=a(),[r,o]=(0,B.useState)(!1),s=(0,B.useCallback)(()=>{o(e=>!e)},[]),c=A(),l=(0,B.useCallback)(()=>{c(O()),r&&c(y([`dismissed_banners`,w],!0))},[r,c]);return(0,V.jsx)(z,{title:n.formatMessage(Q.title),message:n.formatMessage(Q.message),confirm:n.formatMessage(Q.confirm),cancel:n.formatMessage(Q.cancel),onConfirm:l,onClose:e,extraContent:(0,V.jsxs)(`label`,{className:Xn.checkbox_wrapper,children:[(0,V.jsx)(Ct,{value:`hide`,checked:r,onChange:s}),` `,(0,V.jsx)(i,{id:`confirmations.private_quote_notify.do_not_show_again`,defaultMessage:`Don't show me this message again`})]})})});Zn.displayName=`PrivateQuoteNotify`;var Qn={MEDIA:()=>Promise.resolve({default:et}),VIDEO:()=>Promise.resolve({default:Hn}),AUDIO:()=>Promise.resolve({default:Rt}),IMAGE:()=>Promise.resolve({default:Rn}),BOOST:()=>Promise.resolve({default:Bt}),FAVOURITE:()=>Promise.resolve({default:In}),DOODLE:()=>Promise.resolve({default:Pn}),CONFIRM:()=>Promise.resolve({default:z}),CONFIRM_DELETE_STATUS:()=>Promise.resolve({default:Vt}),CONFIRM_DELETE_LIST:()=>Promise.resolve({default:Ht}),CONFIRM_DELETE_COLLECTION:()=>Promise.resolve({default:Ut}),CONFIRM_REPLY:()=>Promise.resolve({default:Jt}),CONFIRM_EDIT_STATUS:()=>Promise.resolve({default:Yt}),CONFIRM_UNBLOCK:()=>Promise.resolve({default:tn}),CONFIRM_UNFOLLOW:()=>Promise.resolve({default:$t}),CONFIRM_WITHDRAW_REQUEST:()=>Promise.resolve({default:Zt}),CONFIRM_CLEAR_NOTIFICATIONS:()=>Promise.resolve({default:rn}),CONFIRM_LOG_OUT:()=>Promise.resolve({default:sn}),CONFIRM_FOLLOW_TO_LIST:()=>Promise.resolve({default:ln}),CONFIRM_MISSING_ALT_TEXT:()=>Promise.resolve({default:un}),CONFIRM_PRIVATE_QUOTE_NOTIFY:()=>Promise.resolve({default:Zn}),CONFIRM_REVOKE_QUOTE:()=>Promise.resolve({default:fn}),CONFIRM_QUIET_QUOTE:()=>Promise.resolve({default:pn}),MUTE:Se,BLOCK:De,DOMAIN_BLOCK:je,REPORT:Ee,REPORT_COLLECTION:ve,COLLECTION_ADDER:()=>c(()=>import(`./collection_adder-C9aHBnjb.js`).then(e=>({default:e.CollectionAdder})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128]),import.meta.url),SHARE_COLLECTION:()=>c(()=>import(`./share_modal-CfcmGJNS.js`).then(e=>({default:e.CollectionShareModal})),__vite__mapDeps([129,1,2,3,12,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,126,58,53,54,59,60,61,62,63,64,65,66,67,68,69,70,71,72,130]),import.meta.url),REVOKE_COLLECTION_INCLUSION:()=>c(()=>
14import(`./revoke_collection_inclusion_modal-Cd9XmzjY.js`).then(e=>e.t).then(e=>({default:e.RevokeCollectionInclusionModal})),__vite__mapDeps([125,1,2,3,12,10,5,11,13,14,6,7,8,9,15,16,17,18,19,20,21,22,23,24,25,126,4,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48]),import.meta.url),SETTINGS:Te,DEPRECATED_SETTINGS:()=>Promise.resolve({default:vn}),ACTIONS:()=>Promise.resolve({default:Lt}),EMBED:ke,FOCAL_POINT:()=>Promise.resolve({default:It}),LIST_ADDER:we,COMPARE_HISTORY:Ce,FILTER:Ae,SUBSCRIBED_LANGUAGES:be,INTERACTION:Ie,CLOSED_REGISTRATIONS:Me,IGNORE_NOTIFICATIONS:Fe,ANNUAL_REPORT:xe,COMPOSE_PRIVACY:()=>Promise.resolve({default:Jn}),ACCOUNT_NOTE:()=>c(()=>import(`./note_modal-DJZqWVLs.js`).then(e=>({default:e.AccountNoteModal})),__vite__mapDeps([131,1,2,3,10,5,11,12,13,14,6,7,8,9,15,16,17,18,19,20,21,22,23,24,25,29,30,4,27,28,31,32,33,34,35,126,26,36,37,38,39,40,41,42,43,44,45,46,47,48,109,65,66,110,58,53,54,59,60,61,62,63,64,67,68,69,70,71,72,132,133]),import.meta.url),ACCOUNT_FIELD_OVERFLOW:()=>c(()=>import(`./field_modal-jF-DeP37.js`).then(e=>({default:e.AccountFieldModal})),__vite__mapDeps([134,2,1,3,26,5,12,4,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,126,135,132,133]),import.meta.url),ACCOUNT_JOIN_DATE:()=>c(()=>import(`./join_modal-BS68Qslg.js`).then(e=>({default:e.AccountJoinModal})),__vite__mapDeps([136,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,126,112,73,132,133,137]),import.meta.url),ACCOUNT_EDIT_NAME:$(`NameModal`),ACCOUNT_EDIT_BIO:$(`BioModal`),ACCOUNT_EDIT_PROFILE_DISPLAY:$(`ProfileDisplayModal`),ACCOUNT_EDIT_VERIFY_LINKS:$(`VerifiedModal`),ACCOUNT_EDIT_FIELD_EDIT:$(`EditFieldModal`),ACCOUNT_EDIT_FIELD_DELET
14E:$(`DeleteFieldModal`),ACCOUNT_EDIT_FIELDS_REORDER:$(`ReorderFieldsModal`),ACCOUNT_EDIT_IMAGE_ALT:$(`ImageAltModal`),ACCOUNT_EDIT_IMAGE_DELETE:$(`ImageDeleteModal`),ACCOUNT_EDIT_IMAGE_UPLOAD:$(`ImageUploadModal`),ACCOUNT_HIDE_FEATURED_TAB:()=>c(()=>import(`./hide_featured_tab-DRrp5Vjv.js`).then(e=>({default:e.ConfirmHideFeaturedTabModal})),__vite__mapDeps([138,1,2,3,12,10,5,11,13,14,6,7,8,9,15,16,17,18,19,20,21,22,23,24,25,34,126,4,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,73]),import.meta.url)};function $(e){return()=>c(()=>import(`./modals-BwQ4CvdQ.js`).then(t=>({default:t[e]})),__vite__mapDeps([139,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,96,126,109,65,66,110,140,63,64,67,58,53,54,59,60,61,62,68,69,70,71,72,141,142,143,80,144,73,145,50,51,52,49,55,56,57,81,75,76,77,78,79,82,83,84,85,86,87,88,89,90,91,92,93,94,95,97,98,99,100,101,102,103,104,105,106,107,108,146,147,148,149,150]),import.meta.url)}var $n=class extends B.PureComponent{constructor(...e){super(...e),k(this,`state`,{backgroundColor:null}),k(this,`setBackgroundColor`,e=>{this.setState({backgroundColor:e})}),k(this,`renderLoading`,()=>{let{onClose:e}=this.props;return(0,V.jsx)(zn,{loading:!0,onClose:e})}),k(this,`renderError`,e=>{let{onClose:t}=this.props;return(0,V.jsx)(zn,{...e,onClose:t})}),k(this,`handleClose`,(e=!1)=>{let{onClose:t}=this.props,n=this._modal?.getCloseConfirmationMessage?.();t(n,e)}),k(this,`setModalRef`,e=>{this._modal=e}),k(this,`noop`,()=>{})}render(){let{type:e,props:t,ignoreFocus:n}=this.props,{backgroundColor:r}=this.state,i=!!e;return(0,V.jsx)(Ye,{backgroundColor:r,onClose:t&&t.noClose?this.noop:this.handleClose,noEsc:t?t.noEsc:!1,ignoreFocus:n,children:i&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(ye,{fetchComponent:Qn[e],loading:this.renderLoading,error:this.renderError,renderDelay:200,children:e=>(0,V.jsx)(e,{...t,onChangeBackgroundColor:this.setBackgroundColor,onClose:this.handleClose,ref:this.setModalRef})},e),(0,V.jsx)(he,{children:(0,V.jsx)(`meta`,{name:`robots`,content:`noindex`})})]})})}},er={},tr=v(e=>({ignoreFocus:e.getIn([`modal`,`ignoreFocus`]),type:e.getIn([`modal`,`stack`,0,`modalType`],null),props:e.getIn([`modal`,`stack`,0,`modalProps`],er)}),e=>({onClose(t,n=!1){e(t?_e({previousModalProps:t.props,modalType:`CONFIRM`,modalProps:{message:t.message,confirm:t.confirm,onConfirm:()=>e(M({modalType:void 0,ignoreFocus:n}))}}):M({modalType:void 0,ignoreFocus:n}))}}))($n);export{kt as n,Tt as r,tr as t};
15//# sourceMappingURL=modal_container-I2GjoOZF.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.