PageSourceSearch

https://www.atv.com/resources/combined/js/SB_D.d9363a02e4e6b1dcd0f4.bundle.js

js atv.com collected 2026-09-24 20:22:51 UTC 33,704 bytes, 1 lines download raw bytes

1(self.hometalkChunk=self.hometalkChunk||[]).push([["SB_D"],{21752(e,t,s){"use strict";s.r(t),s.d(t,{default:()=>R});var a=s(96540),i=s.n(a),o=s(54705),r=s(73323),n=s(70772),l=s(23500),c=s(10029),p=s(8509),h=s(40184),d=s(8356),u=s(29967);class m extends d.A{static getBreadcrumbCombination(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return m.getFromPath(m.apiPath,{level1:e,level2:t,level3:s})}static getPopularChildren(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return m.getFromPath("categories/children",{level1:e,level2:t,level3:s,num_posts_quality:u.A.MIN_NUM_POST})}static getPostsFeed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return m.getFromPath("posts",{level1:e,level2:t,level3:s,post_id:null,page_num:a})}static getBreadcrumbCombinationItem(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var a="levels[]="+e;return t&&(a+="&levels[]="+t),s&&(a+="&levels[]="+s),m.getFromPath("breadcrumbcombinations/unique",a)}static setDisplayInfo(e,t,s){return m.updateFromPath("breadcrumbcombinations/displayinfo",{},{breadcrumbs:e,field:t,value:s})}static get(){return m.getFromPath("popular_posts_by_category").then(e=>e?e.map(e=>({...e,items:e.posts.map(e=>new h.Ay(e))})):{})}static isMissingData(e){return!0}static getLayout(){return[{name:"projects",items:["posts_pq2","posts_pq2","posts_pq2","posts_pq2","posts_pq2","posts_pq2"],title:""}]}static updateContent(e,t){return m.updateFromPath("categories/:id",{id:e},t)}static getAdminContent(e){return this.getFromPath("categories/admin_content",e)}}(0,o.A)(m,"apiPath","categories");class g extends i().Component{constructor(e){super(e),(0,o.A)(this,"discussiontypes",h.Ay.getDiscussionTypesForAdminTool()),this.changeTopic=this.changeTopic.bind(this),this.state={discussionType:null,topic:null,mainTopics:[],subtopics:null,subtopic:null}}getMainTopics(){m.getPopularChildren().then(e=>{e=e.sort(this.sortFunction),this.setState({mainTopics:e})})}sortFunction(e,t){let s=e.name.toUpperCase(),a=t.name.toUpperCase();return s<a?-1:s>a?1:0}componentDidMount(){this.getMainTopics()}componentDidUpdate(e){(this.props.topic!==e.topic||this.props.topic&&!this.state.subtopics)&&this.changeTopic(this.props.topic)}changeTopic(e){this.props.changeState("validationMsg",null),this.props.changeState("topic",e),this.setSubtopic(e)}setSubtopic(e){var t=this.state.mainTopics.filter(t=>t.id==e).shift();t&&m.getPopularChildren(t.mod_rewrite).then(e=>{e.sort(this.sortFunction),this.setState({subtopics:e,subtopic:null})})}render(){return i().createElement("div",{className:"flexbox w100 flex-form-group row"},i().createElement("div",{className:"group-md"},i().createElement("div",{className:"select-styled "+(this.props.hasError&&!this.props.topic?"error-field":"")},i().createElement("select",{className:"sl-select-topic",name:"topic",onChange:e=>this.changeTopic(e.target.value),value:this.props.topic||"",required:!0},i().createElement("option",{value:""}," ",u.A.LANG.sharebox_discussion.choose_topic),this.state.mainTopics.map((e,t)=>i().createElement("option",{label:e.name,value:e.id,key:t},e.name))))),i().createElement("div",{className:"group-md"},i().createElement("div",{className:"select-styled "+(this.props.hasError&&!this.props.subtopic?"error-field":"")},i().createElement("select",{className:"sl-select-subtopic",value:this.props.subtopic||"",onChange:e=>{this.props.changeState("subtopic",e.target.value)},name:"subtopic",required:!0},i().createElement("option",{value:""}," ",u.A.LANG.sharebox_discussion.choose_subtopic),this.state.subtopics&&this.state.subtopics.map((e,t)=>i().createElement("option",{label:e.name,value:e.id,key:e.id},e.name))))),i().createElement("div",{className:"group-md"},i().createElement("div",{className:"select-styled "+(this.props.hasError&&!this.props.discussionType?"error-field":"")},i().createElement("select",{className:"sl-select-type",name:"type",onChange:e=>{this.props.handleChange("type",e.target)},value:this.props.discussionType,required:!0},i().createElement("option",{value:"",disabled:!0},u.A.LANG.sharebox_discussion.choose_type),this.discussiontypes.map((e,t)=>i().createElement("option",{label:e,value:e,key:t},e))))))}}const b=(0,c.g_)(g);var v=s(68441),f=s(17847),E=s(46894),_=s.n(E),x=s(75574),y=s(44171),A=s(8126),S=s(57908),N=s(90826),w=s(56848),C=s(98999),k=s(78338),L=s.n(k);function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const s=N.A.getState().user;(0,C.NO)(_()(s,{name:{$set:e}})),t()}function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};N.A.getState().user.has_name||L().get("prevent_prompt_lightbox")||s.e("lightbox-name").then(s.bind(s,81806)).then(s=>{const o=s.default;t(i().createElement(o,{onSuccess:e=>this.updateMember(e,a),type:e}),!0,null,this.updatePromptCookie)})}function M(){L().get("prevent_prompt_lightbox")||L().set("prevent_prompt_lightbox",1,{expires:86400})}var D=s(44169),F=s(52974),O=s(64861),I=s(71256);class q extends i().Component{constructor(e){var t;super(e),t=this,(0,o.A)(this,"submitDiscussion",function(){return t.setState({processing:!0}),t.saveItem(!1,"discussion").then(e=>{t.promptLightboxName("discussion",t.props.onLightBoxOpen,t.props.onLightBoxClose),t.setState({itemId:e.id})}).finally(()=>{t.setState({processing:!1},()=>{let e=t.isEdit?"edited post":"created post";(0,y.default)(e,{ask_origin:"Ask Button",post_type:"discussion",item_id:t.state.itemId,...t.props.trackData})}),"discussion-category"==t.shareboxType?w.XG.scrollTo("sharebox-category"):window.scrollTo(0,0)})}),(0,o.A)(this,"handleChange",(e,t)=>{this.setState({validationMsg:null,error:!1});let s=t.value;"summary"==e&&u.A.THEME.sharebox_title_limit&&s.length>70||(("summary"!==e||this.isEdit)&&this.setState({data:_()(this.state.data,{[e]:{$set:s}})}),"summary"!=e||this.isEdit||("?"===this.state.data.summary&&this.questionMarkInserted&&!s?(this.setState({data:_()(this.state.data,{[e]:{$set:""}})}),this.questionMarkInserted=!1):s?null!=s.match(/[?]$/)||this.questionMarkInserted?this.setState({data:_()(this.state.data,{[e]:{$set:s}})}):(this.questionMarkInserted=!0,this.setState({data:_()(this.state.data,{[e]:{$set:s+"?"}})},()=>{t.setSelectionRange(1,1)})):this.setState({data:_()(this.state.data,{[e]:{$set:s}})})))}),(0,o.A)(this,"handleAuthorChange",(e,t)=>{t&&this.setState({data:_()(this.state.data,{[e]:{$set:t.id}})}),this.setState({author:t})}),this.shareboxType=this.props.type,this.isEdit=Boolean(this.props.id),this.questionMarkInserted=!1,this.config={...O.d[u.A.THEME.name]},this.state={data:{},uploadQueue:[],uploadProgress:!1,success:!1,processing:!1,isFocus:!1,validationMsg:null,error:!1,topic:null,subtopic:null,isLoaded:!1,showCaptcha:!1,author:{},showSignup:!1},this.handleSubmit=this.handleSubmit.bind(this),this.promptLightboxName=P.bind(this),this.updateMember=T.bind(this),this.updatePromptCookie=M.bind(this),this.changeTopicState=this.changeTopicState.bind(this),this.media=n.YW.bind(this),this.initEmptyItem=n.Dy.bind(this,"discussion"),this.saveItem=n.VH.bind(this),this.setData=n.XO.bind(this)}componentWillMount(){(0,A.l)()}componentWillReceiveProps(e){e.page.prevUrl!==this.props.page.prevUrl&&this.clear()}componentDidMount(){(this.isEdit||this.props.isNotInline)&&this.props.member.loggedIn()&&!this.state.isFocus&&this.setState({isFocus:!0},this.initEmptyItem())}validateTitle(e){if(e&&/\S/.test(e))return!0}validate(){let e=this.state.data,t="";return this.validateTitle(e.summary)?!(this.state.topic&&(!this.state.subtopic||0==this.state.subtopic)&&this.props.member.permissionGranted("admin_discussion")&&(this.setState({validationMsg:u.A.
1LANG.sharebox_discussion.error_no_subtopic,error:!0}),(0,y.default)("Submit Discussion - Validation Error",{validation_error_field:"subtopic",...this.props.trackData}),1)):(t=u.A.LANG.sharebox_discussion.error_no_title,this.setState({validationMsg:t,error:!0}),(0,y.default)("Submit Discussion - Validation Error",{validation_error_field:"question title",validation_error_message:t,...this.props.trackData}),!1)}handleSubmit(e){this.validate()&&(1===parseInt((0,r.A)(this.props.member.features,"captcha.discussion"))?this.setState({showCaptcha:!0}):this.submitDiscussion())}createDiscussion(e){if(!this.props.member.loggedIn())return this.props.showSignup(),!1;this.state.isFocus||this.isEdit||!this.props.member.loggedIn()||(this.setState({isFocus:!0}),this.initEmptyItem())}closeDiscussionBox(){x.I.back()}changeTopicState(e,t){this.setState({[e]:t})}clear(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};this.setState({uploadProgress:!1,processing:!1,isFocus:!1,success:!1,data:{},validationMsg:null,showCaptcha:!1,error:!1},()=>e())}clearAndCreateDiscussion(){this.clear(()=>this.createDiscussion),(0,y.default)("Ask Another Question - Click Element",{element_type:"Ask Another Question",element_zone:"Discussion Sharebox"})}trackEvent(e){let t,s;"title"===e&&(t="Discussion Title Field",s="Discussion Title Field"),"description"===e&&(t="Discussion Description Field",s="Discussion Description Field"),(0,y.default)(t+"- Click Element",{element_type:s,...this.props.trackData})}render(){let e=this.state.data,t=this.state.author.id?this.state.author.profile_photo+"?size=50x50":this.props.member.id?this.props.member.profile_photo+"?size=50x50":u.A.B_HOST+"/resources/design/profile_imgs/profile_img_new3.png",s=u.A.THEME.sharebox_title_limit?70:"";return this.isEdit&&!this.state.author.id&&e.writer&&(t=e.writer.profile_photo+"?size=50x50"),(!this.isEdit||this.isEdit&&this.state.isLoaded)&&i().createElement("div",{className:"sharebox-responsive discussions-sharebox shadowBox flexbox w100 forms-revamped flex-column tr_zone sl-discussion-sharebox","data-tr_zone":"start_discussion_box_community",onFocus:e=>this.createDiscussion(e)},!this.state.success&&e&&i().createElement("div",{className:this.state.error?"formError sl-form-error":""},this.props.member.permissionGranted("set_author")&&i().createElement(I.A,{data:e,handleChange:this.handleAuthorChange,isEdit:this.isEdit,getAvatar:!0}),i().createElement("div",{className:"flexbox w100 row title-input "+((!e.summary||(0,S.e)(e.summary)<4)&&this.state.error?"error-field sl-error-outline":"")},i().createElement("div",{className:"avatar"},i().createElement("img",{src:t,nopin:"nopin",alt:""})),i().createElement("input",{value:e.summary||"",name:"summary",onChange:e=>this.handleChange("summary",e.target),onFocus:()=>this.trackEvent("title"),type:"text",className:"bordered sl-discussion-title counter-padding",autoComplete:"off",maxLength:s,placeholder:"phone"==this.props.view.platform?u.A.LANG.sharebox_discussion.title_placeholder_phone:u.A.LANG.sharebox_discussion.title_placeholder}),i().createElement("span",{className:"chubchik"}),!!s&&i().createElement("div",{className:"character-counter sl-character-count"},i().createElement("p",{className:"bold fs16"},e.summary?s-e.summary.length:s))),i().createElement("div",{className:"flexbox w100 row expanded-question"},i().createElement("div",{className:"edit-area",onFocus:()=>this.trackEvent("description")},!(0,F.Q)()&&i().createElement(l.default,{id:"discussbox",value:e.text||"",updateContent:e=>this.handleChange("text",{value:e}),className:"editableTextarea tr_zone sl-ql-editor-description",placeholder:u.A.LANG.sharebox_discussion.description_placeholder,style:{padding:0},quillId:"shareboxDiscussion"}))),this.props.member.permissionGranted("admin_discussion")&&i().createElement(b,{changeState:this.changeTopicState,handleChange:this.handleChange,topic:this.state.topic,subtopic:this.state.subtopic,discussionType:this.state.data.type,hasError:this.state.error}),this.state.uploadQueue.length>0&&i().createElement("div",{className:"flexbox w100 upload-image-section"},i().createElement("h2",{className:"fs16"},"Drag and drop photos and text areas to reorder them."),i().createElement("ul",{className:"uploaded-image w100"},this.state.uploadQueue.map((t,s)=>i().createElement("li",{key:s},!t.id&&this.state.uploadProgress?i().createElement("div",{className:"fileupload-queue-item bar-wrap"},i().createElement(f.A,null)):i().createElement(v.A,{file:t,media:this.media(),index:s,type:"discussion",isEdit:this.isEdit,stepNum:s,data:e}))))),i().createElement("div",{className:"flexbox w100 discussions-sharebox-footer"},i().createElement("div",{className:"upload-icons"},(this.state.data&&Object.keys(this.state.data).length||this.isEdit)&&i().createElement(i().Fragment,null,i().createElement("a",{className:"upload-button upload-image sl-discussion-ready"},i().createElement("label",{htmlFor:"photo"},i().createElement("i",{className:"ics-camera-outline"})),i().createElement(p.A,{className:"upload-input",onSuccess:this.media().uploadSuccess,onProgress:this.media().onProgress,onAdd:this.media().add,formData:this.media().formData,api:"posts/"+this.state.data.id+"/media",inputClassName:"fileupload sl-fileupload",onError:this.media().uploadError,trackData:this.props.trackData})))),!this.state.showCaptcha&&i().createElement("button",{className:"button primary-button large sl-post-discussion sl-post-btn","data-ht-track":JSON.stringify({action:"Start Discussion Submit",user_discussion_number:this.props.member.qa_count+1,...this.props.trackData}),disabled:this.state.processing,onClick:this.handleSubmit},this.isEdit?u.A.LANG.buttons.submit:u.A.LANG.buttons.ask),this.state.showCaptcha&&i().createElement(D.A,{executeFunction:this.submitDiscussion})),i().createElement("div",{className:"formErrorMsg sl-error-message flexbox w100 flex-justify-end"},i().createElement("p",null,this.state.validationMsg))),this.state.success&&i().createElement("div",{className:"success-message-box flexbox w100 sl-success"},i().createElement("h1",null,i().createElement("div",{className:"star-success"}),u.A.LANG.sharebox_discussion.success_title),i().createElement("div",{className:"success-text"},i().createElement("p",null,u.A.LANG.sharebox_discussion.success_text," ",i().createElement("a",{target:"_self",className:"sl-view-discussion sl-view-now",href:this.state.data.site_url},u.A.LANG.sharebox_discussion.here)),i().createElement("div",{className:"or"},u.A.LANG.sharebox_discussion.or),i().createElement("button",{className:"button primary-button large sl-ask-another",onClick:()=>this.clearAndCreateDiscussion()},u.A.LANG.sharebox_discussion.ask_another_question))))}}q.defaultProps={trackData:{element_zone:"Discussion Sharebox",page_type:"Discussion Sharebox"}};const G=(0,c.nT)((0,c.Tg)((0,c.g_)((0,c.vw)(q))));class B extends i().Component{constructor(e){super(e),this.isEdit=Boolean(this.props.id)}render(){return i().createElement("div",{className:"content-wrap"},i().createElement("div",{className:"main-page-wrap"},i().createElement("div",{className:"container-wrap innerwrap"},i().createElement("div",{className:"page-header-full"},i().createElement("header",null,i().createElement("h1",{className:"title"},this.isEdit?u.A.LANG.sharebox_discussion.edit_discussion:u.A.LANG.sharebox_discussion.sharebox_title))),i().createElement("div",{className:"page-header-full"},i().createElement(G,{id:this.props.id,isNotInline:!0,showSignup:this.props.showSignup})))))}}const R=B},28645(e,t,s){e.exports=s(91593)()},42610(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},44169(e,t,s){"use strict";s.d(t,{A:()=>u});var a=s(54705),i=s(96540),o=s.n(i),r=s(11252),n=s(29967),l=s(70533),c=s(44171),p=s(10029),h=s(98999);class d extends o().Component{constructor(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];super(e,...s),(0,a.A)(this,"onValid",e=>{l.Ay.get("validate-captcha",{token:e,type:"checkbox",shareboxType:this.props.shareboxType}).then(()=>{(0,c.default)("Captcha Passed",this.trackData),this.props.executeFunction(),(0,h.NO)({...this.props.member,passed_captcha:(new Date).toISOString()})}).catch(e=>{(0,c.default)("Captcha Failed",{error:e,...this.trackData})})}),this.state={load:!1},this.trackData={captcha_type:"checkbox"}}componentDidMount(){this.props.member.passed_captcha&&!n.A.THEME.force_sharebox_captcha_types.includes(this.props.shareboxType)?this.props.executeFunction():setTimeout(()=>{this.setState({load:!0}),(0,c.default)("Captcha Fired",this.trackData)})}render(){return o().createElement(o().Fragment,null,this.state.load&&o().createElement(r.A,{size:"normal",ref:e=>
1this.captcha=e,sitekey:n.A.CHECKBOX_CAPTCHA_SITE_KEY,onChange:this.onValid,onExpired:()=>{(0,c.default)("Captcha Failed",{error:"Expired",...this.trackData})}}))}}d.defaultProps={executeFunction:()=>{}};const u=(0,p.g_)(d)},68441(e,t,s){"use strict";s.d(t,{A:()=>E});var a=s(58168),i=s(54705),o=s(96540),r=s.n(o),n=s(23500),l=s(70772),c=s(31495),p=s(4211),h=s(10029),d=s(29967),u=s(8509),m=s(17847),g=s(79992),b=s(49014);const v=r().lazy(()=>s.e("amazon-product-search").then(s.bind(s,15086)));class f extends r().Component{constructor(e){super(e),(0,i.A)(this,"showImgLibraryButton",()=>d.A.THEME.show_image_library&&this.props.member&&this.props.member.permissionGranted(["image_library"])),(0,i.A)(this,"handleOpen",()=>{this.setState({isOpen:!0})}),(0,i.A)(this,"handleClose",()=>{this.setState({isOpen:!1})}),(0,i.A)(this,"handleClick",()=>{1==this.state.isOpen?this.handleClose():this.handleOpen()}),(0,i.A)(this,"updateContent",e=>{const t=this.isScrape?"formatted_text":"text";this.props.media.setText(this.props.file,t,e,this.props.type)}),(0,i.A)(this,"toggleSpinner",()=>{this.setState({showSpinner:!this.state.showSpinner})}),(0,i.A)(this,"replaceFromLibrary",e=>{this.props.media.replace(e,this.props.file),this.props.onLightBoxClose()}),(0,i.A)(this,"showImageLink",()=>{const{type:e,member:t}=this.props,s="structured_post"===e,a=t.permissionGranted(["seo_links"]);return s||a}),(0,i.A)(this,"addAmazonProduct",e=>{this.props.media.setText(this.props.file,"link",e.detailPageURL||"")}),this.updateContent=this.updateContent.bind(this),this.state={orientation:this.props.file.rotation,showTextArea:this.props.showTextArea||this.props.file.text&&this.props.file.text.length||!1,showCaption:!!this.props.file.title,isOpen:!1,showSpinner:!1,showMediaLink:this.props.showMediaLink||!1,uploadProgress:!1,amazonFillKey:0},this.isScrape=(0,p.Jt)(this.props,"data.fromScrape")}componentWillReceiveProps(e){e.file.id!=this.props.file.id&&this.setState({showCaption:!!e.file.title})}isPhoto(){return"photo"===this.props.file.type}isVideo(){return"video"===this.props.file.type}toggleTextArea(){this.setState(e=>({showTextArea:!e.showTextArea}))}getFileTitleLength(){return this.props.file.title?this.props.file.title.length:0}handleChange(e,t){e==t?this.props.handleChange("media_id",""):this.props.handleChange("media_id",e)}rotate(e){this.props.media.rotate(e)}render(){const{file:e,data:t,media:s,editCoverPhoto:i,editCaption:o,stepNum:h}=this.props;let f="";e&&(0,p.Jt)(e,"source")&&!e.source.endsWith(".")&&(f=-1!==e.source.indexOf("?")?`${e.source}&size=720x845&nocrop=1`:`${e.source}?size=720x845&nocrop=1`);let E={};"desktop"!==this.props.platform?E.onClick=()=>this.handleClick():(E.onMouseEnter=()=>this.handleOpen(),E.onMouseLeave=()=>this.handleClose());let _=(0,p.Jt)(this.props,"index",e.order);return r().createElement(r().Fragment,null,r().createElement("span",{className:"share-box-item relative sl-upload-media-item"},this.isVideo()&&r().createElement("div",{className:"video-label"},r().createElement("div",{className:"ics-video-outline"})," VIDEO"),r().createElement("div",{className:"editing-icons sl-editing-icons"},i&&r().createElement("span",{className:"button float-button edit-button bordered relative"},r().createElement("div",{className:"cover-select"},r().createElement("input",{type:"radio",id:`cover_select_${e.id}`,value:e.id,"data-ht-logger":"{action:'click_select_post_cover_star'}",checked:t.media_id==e.id,readOnly:!0}),r().createElement("label",{htmlFor:`cover_select_${e.id}`,onClick:()=>this.handleChange(e.id,t.media_id),className:"sl-select-post-cover"}))),this.isPhoto()&&r().createElement(r().Fragment,null,r().createElement("a",{className:"button float-button edit-button",onClick:()=>this.rotate(e)},r().createElement("i",{className:"ics-rotate"})),!this.props.isDragging&&r().createElement("a",{className:"button float-button edit-button upload-button relative","aria-label":"Re-upload Photo"},r().createElement("i",{className:"ics-upload"}),r().createElement(u.A,{onError:s.uploadError,api:`posts/${t.id}/media`,multiple:!1,onSuccess:t=>s.replace(t,e),inputClassName:`fileupload sl-file-replace-${_}`,formData:()=>({uploadOptions:"check_min_size"}),onProcessStarts:this.toggleSpinner,onProcessEnds:this.toggleSpinner})),this.showImgLibraryButton()&&r().createElement("a",{className:`button float-button edit-button img-library-button sl-replace-image-library-${_}`,onClick:()=>this.props.onLightBoxOpen(r().createElement(b.A,{singleSelect:!0,itemId:t.id,onSuccess:this.replaceFromLibrary,onProcessStarts:this.toggleSpinner,onProcessEnds:this.toggleSpinner})),"aria-label":"Image Library",title:"Replace from Library"},r().createElement(g.A,null))),r().createElement("a",{className:"button float-button edit-button  delete-not-sortable sl-delete-media",onClick:()=>{this.props.media.remove(e)},"data-ht-track":JSON.stringify({action:"Delete Media",element_zone:"Post Lightbox"})}
1,r().createElement("i",{className:"ics-trash"}))),i&&t.media_id==e.id&&r().createElement("div",{className:"cover-selected nowrap fs16 sl-cover-selected"},r().createElement("span",{className:"dib color-primary fs22"},"★")," ",d.A.LANG.sharebox.media_cover_photo),this.isVideo()&&!f?r().createElement("div",{className:"image-wrapper centered"},r().createElement(c.A,{width:"634",height:"250"})):r().createElement("div",(0,a.A)({className:"image-wrapper sl-photo"},e.is_processing&&{"data-placeholder":"Image Loading..."}),r().createElement("img",{className:`image deg-${e.cssRotation||0}`,name:"image",src:f}),this.state.showSpinner?r().createElement(m.A,null):null),!this.isVideo()&&o&&!this.state.showCaption&&r().createElement("span",{className:"caption-trigger"},r().createElement("a",{className:"button neutral-button small",onClick:()=>{this.setState({showCaption:!0})}},d.A.LANG.sharebox.media_add_caption)),!this.isVideo()&&o&&this.state.showCaption&&r().createElement("div",{className:"caption-box flexbox row flex-align-center"},r().createElement("input",{type:"text",placeholder:d.A.LANG.sharebox.media_add_caption+"...",value:e.title,name:"caption",maxLength:(0,l.FL)(t),onChange:t=>s.setText(e,"title",t.target.value)}),r().createElement("div",{className:"character-counter"},r().createElement("p",{className:"bold fs16"},(0,l.FL)(t)-this.getFileTitleLength())))),this.isPhoto()&&this.showImageLink()&&r().createElement("div",{className:"small-toggle-pile w100 row image-link"},this.state.showMediaLink||"string"==typeof e.link&&e.link.length>0?r().createElement(r().Fragment,null,r().createElement("input",{type:"text",name:"",className:"bordered sl-media-url",value:(0,p.Jt)(e,"link")||"",placeholder:d.A.LANG.sharebox.add_link+" (optional)",onChange:e=>s.setText(this.props.file,"link",e.target.value)}),this.props.member.permissionGranted(["slideshow_amazon"])&&r().createElement("div",{style:{width:"100%",maxWidth:"720px",marginInline:"auto",marginBlock:"45px 10px"}},r().createElement("div",{className:"su-wrapper",style:{marginBlock:"10px -10px"}},r().createElement("div",{className:"orlabel styled"},"or")),r().createElement(r().Suspense,{fallback:null},r().createElement(v,{onSelect:this.addAmazonProduct,isUploading:this.state.uploadProgress,placeholder:"Select Amazon product link..."})))):r().createElement("a",{className:"button neutral-button large relative sl-add-link",onClick:()=>{this.setState({showMediaLink:!0})}},d.A.LANG.sharebox.add_link)),!this.props.disableText&&r().createElement(r().Fragment,null,this.state.showTextArea?r().createElement("div",{className:"add-image-text"},r().createElement(n.default,{fileId:e.id,placeholder:d.A.LANG.sharebox.media_description_placeholder,id:`shareBoxDiscussion${h+1}`,value:(this.isScrape?e.formatted_text:e.text)||"",updateContent:e=>this.updateContent(e),className:`image-text-editor sl-ql-editor-media-${h+1}`,style:{padding:0},quillId:"shareboxUploader_"+h,shareboxType:this.props.type,reorderingItems:this.props.reorderingItems,allowLinks:!!this.props.general_settings&&this.props.general_settings.allow_links,mediaApi:(t||{}).id?`posts/${t.id}/media`:"",media:this.props.media}),r().createElement("a",{className:"exit-edit-text",onClick:()=>{this.toggleTextArea(),this.updateContent("")}},r().createElement("i",{className:"ics-subtract fs20 fr"}))):r().createElement("button",{onClick:()=>this.toggleTextArea(),className:"button neutral-button large sl-add-text"},d.A.LANG.sharebox.media_add_text)))}}f.defaultProps={disableText:!1,editCoverPhoto:!1,editCaption:!1,type:"post",general_settings:null,saveDraft:()=>{}};const E=(0,h.g_)((0,h.Tg)((0,h.ft)(f)))},71256(e,t,s){"use strict";s.d(t,{A:()=>g});var a=s(54705),i=s(96540),o=s.n(i),r=s(62243),n=s.n(r),l=s(6686),c=s(46894),p=s.n(c),h=s(4211);class d extends o().Component{constructor(e){super(e),(0,a.A)(this,"requestSuggestions",e=>{let{value:t}=e;t.length>1&&l.A.get("",{filter:t}).then(e=>{this.setState({suggestions:e})})}),(0,a.A)(this,"onSuggestionsClearRequested",()=>{this.setState({suggestions:[]})}),(0,a.A)(this,"getSuggestionValue",e=>e.mod_rewrite?`${e.name} (${e.mod_rewrite})`:e.name||""),(0,a.A)(this,"renderSuggestion",e=>o().createElement("span",{style:{display:"block",color:"#333"}},e.name," (",e.mod_rewrite,")")),(0,a.A)(this,"onAutosuggestChange",(e,t)=>{let{newValue:s}=t;this.setState({author:p()(this.state.author,{name:{$set:s},id:{$set:null}}),showApproveBtn:!1})}),(0,a.A)(this,"onBlur",()=>{!this.state.author.id&&this.state.author.name&&l.A.get(this.state.author.name,{suggest:!0}).then(e=>{this.setState({author:e,showApproveBtn:!0}),this.props.onSelect(e)}).catch(()=>{this.setState({author:{}})})}),(0,a.A)(this,"onSuggestionSelected",(e,t)=>{let{suggestion:s}=t;s.id&&(this.setState({author:s,showApproveBtn:!0}),this.props.onSelect(s))}),(0,a.A)(this,"approveMember",()=>{l.A.approveMember(this.state.author.id).then(e=>{this.setState({showApproveBtn:"Member was approved"!==e.message,approveMessage:e.message}),setTimeout(()=>this.setState({approveMessage:""}),3e3)})}),this.state={author:e.initialMember||{},suggestions:[],showApproveBtn:!1,approveMessage:""},this.requestSuggestions=(0,h.sg)(this.requestSuggestions.bind(this),200)}render(){const{placeholder:e,inputClassName:t,theme:s}=this.props,{author:a,suggestions:i,showApproveBtn:r,approveMessage:l}=this.state,c={placeholder:e,value:a.name||"",className:t,onChange:this.onAutosuggestChange,onBlur:this.onBlur},p={suggestionsContainer:"autocomplete dropdown-menu",container:"w100 row relative",suggestion:"autocomplete-suggestion-li sl-author-suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"active",...s};return o().createElement("div",{className:"w100 layout-block"+(a.id?" sl-author-loaded":"")},o().createElement(n(),{suggestions:i,onSuggestionsFetchRequested:this.requestSuggestions,onSuggestionsClearRequested:this.onSuggestionsClearRequested,getSuggestionValue:this.getSuggestionValue,render
1Suggestion:this.renderSuggestion,inputProps:c,onSuggestionSelected:this.onSuggestionSelected,theme:p}),r&&!a.approved&&o().createElement("div",{className:"w100 row relative"},o().createElement("a",{onClick:this.approveMember,className:"sl-approve-author-btn"},o().createElement("span",{className:"button neutral-button small"},"Approve: ",a.name))),l&&o().createElement("div",{className:`w100 row relative fs14 ${"Member was approved"===l?"greenLight2":"error-it"} sl-approve-author-message`},l))}}(0,a.A)(d,"defaultProps",{placeholder:"Search by username…",inputClassName:"",theme:{},initialMember:null});const u=d;class m extends o().Component{constructor(){super(...arguments),(0,a.A)(this,"handleSelect",e=>{const t=this.props.getAvatar?e:e.id;this.props.handleChange("writer_id",t)})}render(){var e;return o().createElement(u,{placeholder:"Select an author (or enter an id/mod_rewrite)",inputClassName:"sl-author",onSelect:this.handleSelect,initialMember:this.props.isEdit?null===(e=this.props.data)||void 0===e?void 0:e.writer:null})}}const g=m},81420(e,t,s){e.exports=s(81528)},81528(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var s=0;s<t.length;s++){var a=t[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,s,a){return s&&e(t.prototype,s),a&&e(t,a),t}}(),i=s(96540),o=n(i),r=n(s(28645));function n(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return s.scrollListener=s.scrollListener.bind(s),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new 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)}
1(t,e),a(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("scroll",this.scrollListener,this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.props.useCapture)}},{key:"attachScrollListener",value:function(){if(this.props.hasMore){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.addEventListener("mousewheel",this.mousewheelListener,this.props.useCapture),e.addEventListener("scroll",this.scrollListener,this.props.useCapture),e.addEventListener("resize",this.scrollListener,this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1===e.deltaY&&e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,s=void 0;if(this.props.useWindow){var a=document.documentElement||document.body.parentNode||document.body,i=void 0!==t.pageYOffset?t.pageYOffset:a.scrollTop;s=this.props.isReverse?i:this.calculateTopPosition(e)+(e.offsetHeight-i-window.innerHeight)}else s=this.props.isReverse?e.parentNode.scrollTop:e.scrollHeight-e.parentNode.scrollTop-e.parentNode.clientHeight;s<Number(this.props.threshold)&&(this.detachScrollListener(),"function"==typeof this.props.loadMore&&this.props.loadMore(this.pageLoaded+=1))}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.props,s=t.children,a=t.element,i=t.hasMore,r=(t.initialLoad,t.isReverse),n=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,function(e,t){var s={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=e[a]);return s}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var p=[s];return i&&(n?r?p.unshift(n):p.push(n):this.defaultLoader&&(r?p.unshift(this.defaultLoader):p.push(this.defaultLoader))),o.default.createElement(a,c,p)}}]),t}(i.Component);l.propTypes={children:r.default.node.isRequired,element:r.default.string,hasMore:r.default.bool,initialLoad:r.default.bool,isReverse:r.default.bool,loader:r.default.node,loadMore:r.default.func.isRequired,pageStart:r.default.number,ref:r.default.func,threshold:r.default.number,useCapture:r.default.bool,useWindow:r.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null},t.default=l,e.exports=t.default},91593(e,t,s){"use strict";var a=s(59395),i=s(90646),o=s(42610);e.exports=function(){function e(e,t,s,a,r,n){n!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var s={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return s.checkPropTypes=a,s.PropTypes=s,s}}}]);

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.