1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="30329ddb-8b42-501f-be65-299ca92d454f")}catch(e){}}(); 3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6175],{14298:(e,t,a)=>{"use strict";a.d(t,{ES:()=>p,Pz:()=>m,RZ:()=>r,YT:()=>l,oc:()=>h});var i=a(55745),o=a.n(i),s=a(816),n=a(63);let r=(e,t)=>encodeURIComponent(JSON.stringify({postId:e,recommendedHashtags:t.recommendedHashtags})),l="â -â¿ã-ã¿ãã·-ãºï¼-ï¼ï¼-ï¼ ï¼»-ï½ï½-ï½ï¼-ï¼",c=RegExp(`#[${s.default.ALLOWED_MENTION_CHARS}${l}]+`,"g"),d=/https?:\/\/[^\s]+/g,p=e=>{let t=[],a=0;for(let i of e.ops)if(void 0!==i.insert){if("string"!=typeof i.insert){a+=1;continue}if(!i.attributes?.link){let e=[...i.insert.matchAll(d)].map(e=>({start:e.index??0,end:(e.index??0)+e[0].length}));for(let o of i.insert.matchAll(c)){let i=o.index??0,s=i+o[0].length;if(e.some(e=>i>=e.start&&s<=e.end))continue;let n=o[0].slice(1);n.length>255||t.push({index:a+i,length:o[0].length,value:n})}}a+=i.insert.length}return t},h=(e,t)=>{if(!t)return e;let a=t.index,i=t.index+t.length;return e.filter(e=>{let t=e.index,o=e.index+e.length;return i<t||o<a})},m=(e,t)=>{let a=new(o()),i=0;for(let o of[...e].sort((e,t)=>e.index-t.index)){let e=t.get(o.value);void 0!==e&&(a.retain(o.index-i),a.delete(o.length),a.insert((0,n.s6)({id:e,name:o.value})),i=o.index+o.length)}return a}},38356:(e,t,a)=>{var i=a(11158),o=0;e.exports=function(e){var t=++o;return i(e)+t}},43719:(e,t,a)=>{"use strict";a.d(t,{D2:()=>o,FW:()=>s,do:()=>i});let i=["video/*"],o=["image/jpeg","image/png","image/gif","image/heif","image/heic",".heif",".heic"],s=["application/pdf","text/csv,application/octet-stream","application/zip,application/octet-stream,application/x-zip-compressed,multipart/x-zip","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]},58367:(e,t,a)=>{"use strict";a.d(t,{Ae:()=>i,Al:()=>n,RG:()=>o,tN:()=>s});class i{static{this.TITLE="temporaryPostTitle"}static{this.BODY="temporaryPostBody"}static{this.IS_TWEET="temporaryPostIsTweet"}static{this.URL_PREVIEW="temporaryUrlPreview"}static store(e,t,a){sessionStorage.setItem(this.TITLE,e),sessionStorage.setItem(this.BODY,t),this.storeIsTweet(a)}static storePreview(e){sessionStorage.setItem(this.URL_PREVIEW,JSON.stringify(e))}static storeTitle(e){sessionStorage.setItem(this.TITLE,e)}static storeBody(e){sessionStorage.setItem(this.BODY,e)}static storeIsTweet(e){void 0!==e&&localStorage.setItem(this.IS_TWEET,`${e}`)}static getTitle(){return sessionStorage.getItem(this.TITLE)||""}static getBody(){return sessionStorage.getItem(this.BODY)||""}static getIsTweet(){return"true"===localStorage.getItem(this.IS_TWEET)}static clearSessionStorage(){sessionStorage.removeItem(this.TITLE),sessionStorage.removeItem(this.BODY)}}class o{static{this.BODY="temporaryCommentBody"}static storeBody(e){sessionStorage.setItem(this.BODY,e)}static getBody(){return sessionStorage.getItem(this.BODY)||""}static clearSessionStorage(){sessionStorage.removeItem(this.BODY)}}let s={URL:"temporaryReferrerURL",storeURL:e=>{sessionStorage.setItem(s.URL,void 0===e?"undefined":e)},popURL:()=>{let e=sessionStorage.getItem(s.URL)||"";return sessionStorage.removeItem(s.URL),"undefined"===e?"":e}},n=(e,t)=>{let a=()=>{let a=Number(localStorage.getItem(e));if(!a)return!1;let i=Date.now()-a;return i>=0&&i<t};return{isAvailable:()=>{try{return!a()}catch{return!1}},tryConsume:()=>{try{if(a())return!1;return localStorage.setItem(e,String(Date.now())),!0}catch{return!1}},clear:()=>{try{localStorage.removeItem(e)}catch{return}}}}},67611:(e,t,a)=>{"use strict";a.d(t,{T:()=>p});var i=a(45023),o=a(25008),s=a.n(o),n=a(27570),r=a(68193),l=a(85121),c=a(78201);let d=(0,c.n9)()({chipContainer:{display:"inline-grid",maxWidth:"inherit"},chip:{display:"inline-flex",borderRadius:`${n.TI[3]}`,padding:`${n.Kz[3]} ${n.Kz[5]}`,border:`1px solid ${n.Q1.user.border.default}`,background:`${n.Q1.user.background.white}`,cursor:"pointer",textAlign:"left",verticalAlign:"middle",fontSize:`${n.Z4[300]}`,margin:`0 ${n.Kz[5]} ${n.Kz[5]} 0`,maxWidth:"206px","&:hover":{color:`${n.Q1.user.foreground.textGray}`}},hash:{color:`${n.Q1.user.foreground.hashGray}`}});function p(e){let{name:t,onClick:a}=e,{classes:o}=d();return(0,i.Y)(c.az,{className:o.chipContainer,children:(0,i.Y)(c.az,{onClick:a,className:s()(o.chip,l.B_),"data-cy":"hashtag-chip",children:(0,i.FD)(r.m,{children:[(0,i.Y)("span",{className:o.hash,children:"#"}),t]})})})}},68193:(e,t,a)=>{"use strict";a.d(t,{m:()=>
3o});var i=a(45023);function o({children:e}){return(0,i.Y)("div",{css:s,children:e})}a(36439);let s=(0,a(30915).AH)("text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%;")},81308:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>A});var i=a(45023),o=a(51949),s=a.n(o),n=a(41471),r=a(27802),l=a(816),c=a(90524);let d=({onClick:e})=>(0,i.Y)("button",{type:"button",onClick:e,style:{outline:"none"},children:(0,i.Y)("i",{className:"fas fa-poll-h","data-cy":"enquete-icon-in-toolbar"})});var p=a(36439),h=a(28317),m=a(92362),u=a(84303),g=a(43719);let f=[...g.D2,...g.FW],b=e=>Object.assign(e,{preview:URL.createObjectURL(e)}),v=({acceptVideo:e,iconStyle:t,iconSize:a,children:o,onAttach:s})=>{let n=e?[...f,...g.do]:f,r={...t,outline:"none"};return(0,i.Y)("button",{type:"button",style:r,children:(0,i.FD)("label",{children:[(0,i.Y)("input",{type:"file",accept:n.join(","),onChange:e=>{let t=e.target.files;null===t||s(Array.from(t).map(e=>{let t;return t=(e,t)=>new File([e],e.name,{type:t}),e.name.endsWith(".csv")?t(e,"text/csv"):e.name.endsWith(".zip")?t(e,"application/zip"):e}).map(b))},hidden:!0,"data-cy":"attach-file-input-in-toolbar"}),(0,i.Y)(u.A,{fontSize:a,style:{cursor:"pointer",display:"block"},"data-cy":"attach-file-icon-in-toolbar"}),o]})})};var y=a(87512),Y=a(20251);class I extends p.Component{preSaveVideos(e){let t=e.filter(e=>e.type&&e.type.startsWith("video/"));if((0,Y.I)(t))return!1;this.props.onFileUploading(!0);let a=t=>{let a=e.map(e=>{let a=t.findIndex(t=>t.name===e.name);return -1!==a&&(e.thumbnail=t[a].thumbnail,e.video=t[a].video,e.tmpVideo=t[a].tmpVideo),e});a=a.filter(e=>this.props.files.some(t=>t.name===e.name)),this.props.onChange(a),this.props.onFileUploading(!1)},i=()=>{this.props.onFileUploading(!1)};return this.props.dispatch(y.iG.request({successCb:a,errorCb:i,videos:t})),!0}preSaveImages(e){let t=e.filter(e=>(!e.type||!!e.type.startsWith("image/"))&&!(e.preview&&e.preview&&e.preview.startsWith("https://")));if((0,Y.I)(t))return!1;this.props.onFileUploading(!0);let a=t=>{let a=e.map(e=>{let a=t.findIndex(t=>t.name===e.name);return -1!==a&&(e.preview=t[a].preview),e});this.props.onChange(a),this.props.onFileUploading(!1)},i=()=>{this.props.onFileUploading(!1)};return this.props.dispatch(y.Sp.request({successCb:a,errorCb:i,images:t})),!0}render(){return(0,i.Y)(p.Fragment,{children:(0,i.Y)(v,{...this.props,acceptVideo:void 0===this.props.acceptVideo||this.props.acceptVideo,onAttach:this.onAttach})})}constructor(...e){super(...e),this.onAttach=e=>{let{maxUploadFiles:t,t:a}=this.props,i=a("This file is too large to upload. It should be less than 100MB. File:");e=e.filter(e=>{let t=e.size<l.default.MAX_UPLOAD_FILE_SIZE;return t||this.props.dispatch((0,m.mO)(i+e.name)),t});
3let o=this.props.files.concat(e);o.length>t&&(o=o.slice(0,t));let s=this.preSaveVideos(o),n=this.preSaveImages(o);this.props.onChange(o),s||n||this.props.onFileUploading(!1)}}}let x=(0,n.connect)()((0,h.C)(["components/molecules"])(I));function S({onChange:e,onFileUploading:t,files:a,isAdmin:o,onClick:s,attachingFileEnabled:n,forTemplate:r}){let{t:p}=(0,c.B)(["components/organisms/quill"]);return(0,i.Y)(i.FK,{children:(0,i.FD)("div",{id:"toolbar",children:[!r&&n&&(0,i.FD)(i.FK,{children:[(0,i.Y)("button",{className:"ql-image","aria-label":p("Add image"),"data-cy":"toolbar-image"}),(0,i.Y)(x,{files:a,onChange:e,onFileUploading:t,maxUploadFiles:l.default.MAX_UPLOAD_FILES_BY_POST,iconSize:"small"})]}),!r&&(0,i.Y)(d,{onClick:s}),(0,i.FD)("span",{children:[(0,i.FD)("select",{className:"ql-size",children:[(0,i.Y)("option",{value:"small"}),(0,i.Y)("option",{selected:!0}),(0,i.Y)("option",{value:"large"}),(0,i.Y)("option",{value:"huge"})]}),(0,i.Y)("button",{className:"ql-bold","aria-label":p("Bold"),"data-cy":"toolbar-bold"}),(0,i.Y)("button",{className:"ql-italic","aria-label":p("Italic"),"data-cy":"toolbar-italic"}),(0,i.Y)("button",{className:"ql-underline","aria-label":p("Underline"),"data-cy":"toolbar-underline"}),(0,i.Y)("button",{className:"ql-strike","aria-label":p("Strikethrough"),"data-cy":"toolbar-strike"})]}),(0,i.FD)("span",{children:[(0,i.Y)("select",{className:"ql-color"}),(0,i.Y)("select",{className:"ql-background"})]}),(0,i.FD)("select",{className:"ql-align",children:[(0,i.Y)("option",{selected:!0}),(0,i.Y)("option",{value:"center"}),(0,i.Y)("option",{value:"right"})]}),(0,i.FD)("span",{children:[(0,i.Y)("button",{className:"ql-list",value:"ordered","aria-label":p("Numbered list"),"data-cy":"toolbar-ordered-list"}),(0,i.Y)("button",{className:"ql-list",value:"bullet","aria-label":p("Bulleted list"),"data-cy":"toolbar-bullet-list"})]}),(0,i.FD)("span",{children:[(0,i.Y)("button",{className:"ql-blockquote","aria-label":p("Quote"),"data-cy":"toolbar-blockquote"}),(0,i.Y)("button",{className:"ql-code-block","aria-label":p("Code"),"data-cy":"toolbar-code-block"})]}),(0,i.Y)("span",{children:(0,i.Y)("button",{className:"ql-link","aria-label":p("Link"),"data-cy":"toolbar-link"})}),!r&&o&&(0,i.Y)("span",{children:(0,i.Y)("button",{className:"ql-video","aria-label":p("Add video"),"data-cy":"toolbar-video"})})]})})}var T=a(60257),F=a(96058),N=a(21735);let A=e=>{let t=(0,n.useDispatch)(),{isAdmin:a,attachingFileEnabled:o}=(0,n.useSelector)(e=>({isAdmin:e.user.roleId>=r.RoleId.AdminGuest,attachingFileEnabled:(0,F.ND)(e)})),l=(0,i.FD)(i.FK,{children:[(0,i.FD)("div",{className:"jsx-3bfefae1e74a8b65 toolbar-container",children:[e.renderToolbarExtensions&&(0,i.Y)("div",{className:"jsx-3bfefae1e74a8b65 toolbar-extensions",children:e.renderToolbarExtensions}),(0,i.Y)(S,{onChange:e.onChange,onFileUploading:e.onFileUploading,files:e.files,onClick:e.onClick,isAdmin:a,attachingFileEnabled:o,forTemplate:e.forTemplate})]}),(0,i.Y)(s(),{id:"3bfefae1e74a8b65",children:".toolbar-container.jsx-3bfefae1e74a8b65{position:sticky;top:0;z-index:1}.toolbar-extensions.jsx-3bfefae1e74a8b65{float:left;position:relative;z-index:2;padding-top:8px;padding-left:8px;display:flex;align-items:center}"})]});return(0,i.Y)(N.A,{showPopularHashtags:!0,dispatch:t,onContentsUpdate:e.onContentsUpdate,contentsForUpdate:e.contentsForUpdate,initialContents:e.initialContents,mention:{boxId:e.boxId,categoryIndex:e.categoryIndex},customToolbar:{id:"#toolbar",toolbar:l},placeholder:e.placeholder,scrollingContainer:`#${T.Y}`,"data-cy":e["data-cy"],"ug-id":e["ug-id"],isAdmin:a,imageDropAndPaste:!e.forTemplate,renderAfterEditor:e.renderAfterEditor})}},84303:(e,t,a)=>{"use strict";var i=a(3396);t.A=void 0;var o=i(a(18969)),s=a(2183);t.A=(0,o.default)((0,s.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile")},89964:(e,t,a)=>{"use strict";a.d(t,{Y:()=>h});var i=a(45023),o=a(36439),s=a(81882),n=a(90524),r=a(66337),l=a(67611),c=a(70442),d=a(78201);let p=(0,d.n9)()({header:{color:r.A.ANNOTATION_TEXT,fontSize:"0.8rem"},container:{paddingTop:"0.6rem"}});function h({boxId:e,categoryIndex:t,onClick:a}){let{t:r}=(0,n.B)(["components/organisms"]),{data:m}=(0,c.s3)(`/hashtag/popular?${s.stringify({boxId:e,categoryIndex:t})}`),{classes:u}=p();return(0,i.FD)(o.Fragment,{children:[(0,i.Y)(d.az,{className:u.header,children:r("Create a new hashtag with â#â and mention other users with â@usernameâ.")}),(0,i.Y)(d.az,{className:u.container,children:m?.map((e,t)=>(0,i.Y)(l.T,{name:e.name,onClick:a(e)},t))})]})}}}]); 4//# sourceMappingURL=6175.393850a65e0daace.js.map 5//# debugId=30329ddb-8b42-501f-be65-299ca92d454f
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.