PageSourceSearch

https://atomicpoet.org/packs/js/features/chats/components/chat_panes-f06b51cf6c230f94be79.chunk.js

js atomicpoet.org collected 2026-10-04 02:43:04 UTC 3,679 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkmangane_fe=self.webpackChunkmangane_fe||[]).push([[22],{1205:function(t,e,n){n.r(e),n.d(e,{default:function(){return L}});var a=n(1855),i=n(308),c=n(0),o=n(1841),s=n(1842),u=n(1871),d=n(1865),r=n(46),l=n(54),f=n(16),h=n(927),v=n(2),g=n(6),Z=n(150),m=n(3),_=(0,o.vU)({switchOn:{id:"chats.audio_toggle_on",defaultMessage:"Audio notification on"},switchOff:{id:"chats.audio_toggle_off",defaultMessage:"Audio notification off"}}),p=function(t){var e=t.showLabel,n=(0,g.I0)(),i=(0,s.Z)(),c=(0,m.CG)((function(t){return!!(0,f.Gw)(t).getIn(["chats","sound"])})),o="chats-audio-toggle",u=i.formatMessage(c?_.switchOff:_.switchOn);return(0,a.Z)("div",{className:"audio-toggle react-toggle--mini"},void 0,(0,a.Z)("div",{className:"setting-toggle","aria-label":u},void 0,(0,a.Z)(Z.Z,{id:o,checked:c,onChange:function(){n((0,f.oz)(["chats","sound"],!c))}}),e&&(0,a.Z)("label",{htmlFor:o,className:"setting-toggle__label"},void 0,u)))},w=n(892),C=n(1870),N=n(75),k=n(133),b=n(55),I=n(9),G=n(53),M=n(94),S=n(893),x=(0,I.dq)(),P=function(t){var e=t.idx,i=t.chatId,o=t.windowState,s=(0,m.TL)(),u=(0,m.CG)(M.$X),d=(0,m.CG)((function(t){var e=t.chats.items.get(i);return e?x(t,e.toJS()):void 0})),r=(0,c.useRef)(null);if((0,c.useEffect)((function(){var t;"open"===o&&(null===(t=r.current)||void 0===t||t.focus())}),[o]),!d)return null;var f=d.account,h=285*(e+1)+20,g=d.unread,Z=(0,a.Z)("div",{className:"mr-2 flex-none"},void 0,(0,a.Z)(v.AT,{count:g})),_=(0,a.Z)(k.ZP,{accountId:f.id},void 0,(0,a.Z)(C.rU,{to:"/@".concat(f.acct)},void 0,(0,a.Z)(N.Z,{account:f,size:18})));return(0,a.Z)("div",{className:"pane pane--".concat(o),style:{right:"".concat(h,"px")}},void 0,(0,a.Z)(v.Ug,{space:2,className:"pane__header"},void 0,g>0?Z:_,(0,a.Z)("button",{className:"pane__title",onClick:function(t){return function(){s((0,l.w2)(t))}}(d.id)},void 0,"@",(0,G.F7)(f,u)),(0,a.Z)("div",{className:"pane__close"},void 0,(0,a.Z)(b.Z,{src:n(26),title:"Close chat",onClick:function(t){return function(){s((0,l.wt)(t))}}(d.id)}))),(0,a.Z)("div",{className:"pane__content"},void 0,(0,a.Z)(S.Z,{chatId:d.id,onSetInputRef:function(t){r.current=t}})))},U=(0,o.vU)({searchPlaceholder:{id:"chats.search_placeholder",defaultMessage:"Start a chat with…"}}),A=(0,r.P1)([function(t){return t.chats.items},function(t){return(0,f.Gw)(t).getIn(["chats","panes"])}],(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,i.List)();return e.filter((function(e){return t.get(e.get("chat_id"))}))})),L=function(){var t=(0,s.Z)(),e=(0,m.TL)(),n=(0,d.k6)(),i=(0,m.CG)((function(t){return A(t)})),o=(0,m.rV)().getIn(["chats","mainWindow"]),r=(0,m.CG)((function(t){return function(t){return t.chats.items.reduce((function(t,e){return t+Math.min(e.get("unread",0),1)}),0)}(t)})),f="open"===o,g=(0,a.Z)("div",{className:"pane pane--main pane--".concat(o)},void 0,(0,a.Z)("div",{className:"pane__header"},void 0,r>0&&(0,a.Z)("div",{className:"mr-2 flex-none"},void 0,(0,a.Z)(v.AT,{count:r})),(0,a.Z)("button",{className:"pane__title",onClick:function(){e((0,l.wv)())}},void 0,(0,a.Z)(u.Z,{id:"chat_panels.main_window.title",defaultMessage:"Chats"})),(0,a.Z)(p,{})),(0,a.Z)("div",{className:"pane__content"},void 0,f&&c.createElement(c.Fragment,null,(0,a.Z)(w.Z,{onClickChat:function(t){e((0,l.WB)(t.id))}}),(0,a.Z)(h.Z,{placeholder:t.formatMessage(U.searchPlaceholder),onSelected:function(t){e((0,l.aU)(t,n))},resultsPosition:"above"}))));return(0,a.Z)("div",{className:"chat-panes"},void 0,g,i.map((function(t,e){return(0,a.Z)(P,{idx:e,chatId:t.get("chat_id"),windowState:t.get("state")},t.get("chat_id"))})))}}}]);
2//# sourceMappingURL=chat_panes-f06b51cf6c230f94be79.chunk.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.