Files
004_comission/_utils/_comment_backup/louis coding's Reviews on Carousell Hong Kong_files/291a7d41a6d21c26.min.js.download
louiscklaw 6c60a73f30 update,
2025-01-31 19:15:17 +08:00

6 lines
12 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9b5c59a9-3428-5a36-a4c1-2025d32eab57")}catch(e){}}();
(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[60],{777:(e,n,t)=>{t.d(n,{Z:()=>r});var s=t(9),l=t.n(s),o=(t(0),t(1));const r=({children:e,className:n,direction:t})=>{const s=l()("D_Sr",n,{D_Ss:["bottom","bottomCenter","bottomLeft","bottomRight"].includes(t),D_Sy:"bottomCenter"===t,D_Sw:["bottom","bottomLeft"].includes(t),D_Sx:"bottomRight"===t,D_St:["topCenter","topLeft","topRight"].includes(t),D_Sz:"topCenter"===t,D_Su:"topLeft"===t,D_Sv:"topRight"===t,D_S_:["left","leftTop","leftCenter","leftBottom"].includes(t),D_SA:["left","leftTop"].includes(t),D_SB:"leftCenter"===t,D_SC:"leftBottom"===t,D_SE:["right","rightTop","rightCenter","rightBottom"].includes(t),D_SF:["right","rightTop"].includes(t),D_SG:"rightCenter"===t,D_SH:"rightBottom"===t});return(0,o.jsx)("div",{className:s,children:e})}},758:(e,n,t)=>{t.d(n,{Z:()=>C});var s=t(9),l=t.n(s),o=t(0),r=t(10),i=t(398),a=t(399),c=t(731),u=t(746),d=t(72),p=t(729),m=t(397),h=t(101),_=t(8),x=t(21),g=t(18),D=t(770),v=t(1);const f=function(e){const{iconUrl:n=null,type:t}=e,s="primary"===t?"D_atP":"D_atQ",o=l()(s,"D_atS");return(0,v.jsx)(a.Z,{className:o,forceSquare:!0,loadingClassName:"D_atR",src:n||D})};var j=t(778),N="D_pF";const b=({disabled:e,isDesktop:n,hovered:t=!1,onSelect:s,option:o,selected:r,renderOptionInSingleLine:i=!0,renderOptionMaxLine:c,role:u="option",showCheckMark:p})=>{const m=(0,h.Fg)(),_=l()("D_pO",{D_pQ:t,D_pP:!e&&n,D_pR:r,D_pS:r&&n,D_pY:!!o.iconUrl,D_pZ:!!o.iconGroup&&o.iconGroup.length>0}),x=()=>{const n=o.subtext?"s":"m";return(0,v.jsxs)("div",{className:"D_qc",children:[o.colorHexCode?(0,v.jsx)("div",{className:"D_qe",style:{background:o.colorHexCode}}):null,(0,v.jsxs)("div",{children:[(0,v.jsx)(d.Z,{colorToken:e?m.ContentSubdued:void 0,maxLines:c,singleline:i,size:n,children:o.text}),o.subtext?(0,v.jsx)(d.Z,{colorToken:e?m.ContentSubdued:m.ContentSecondary,maxLines:c,singleline:i,size:"xs",children:o.subtext}):null]})]})};return(0,v.jsxs)("div",{className:_,"data-testid":o.text,onClick:e=>{s(o)},role:u,children:[o.iconUrl?(0,v.jsx)(a.Z,{className:"D_qa",loadingClassName:"D_qb",src:o.iconUrl}):null,o.iconGroup&&o.iconGroup.length>0?(0,v.jsxs)("div",{className:"D_pW",children:[(0,v.jsx)(f,{iconUrl:o.iconGroup[0],type:"primary"}),(0,v.jsxs)("div",{className:"D_pX",children:[(0,v.jsx)(f,{iconUrl:o.iconGroup[1],type:"secondary"}),(0,v.jsx)(f,{iconUrl:o.iconGroup[2],type:"secondary"})]})]}):null,o.iconGroup?(0,v.jsx)("div",{children:x()}):x(),p&&r&&(0,v.jsx)(a.Z,{className:"D_pV",crossOrigin:!1,src:j})]})},C=({allowNoOptions:e=!1,className:n="",classNameDropdown:t="",classNameDropdownPopover:s="",classNameSelector:D="",classNameSelectorActive:f="",description:j,disabled:C,dropdownTextMultiple:y=!1,dropdownTextPrefix:S="",error:Z,iconLeftURL:k,keepOpenOnTargetClick:w=!0,label:L,limit:O,maxOptionCellsWithoutOverflow:T=5,multiple:R=!1,onFocus:A,onOptionHide:F,onOptionSelect:q,onQueryChange:z,options:E,renderOptionInSingleLine:U,renderOptionMaxLine:G,placeholder:B,query:M,searchable:H,testId:I,value:P})=>{const Y=(0,h.Fg)(),$=(0,r.v9)(_.Y6),W=(0,r.v9)(x.l$),[V,K]=(0,o.useState)(null),[J,Q]=(0,o.useState)(!1),X=(0,o.useRef)(null),ee=(0,o.useRef)(null),ne=(0,o.useRef)(null),te=e=>{Q(!J),"function"==typeof A&&A()},se=e=>{R||Q(!1),(de(e)||0!==ce())&&(z&&z(""),q(e))},le=e=>{z&&z(e.currentTarget.value)},oe=()=>{Q(!0),"function"==typeof A&&A()},re=()=>{F&&F(),document.activeElement!==ne.current?.input&&(z&&z(""),Q(!1))},ie=()=>{K(null)},ae=e=>{const{key:n}=e;"ArrowUp"===n?null!=V&&V>0&&K(V-1):"ArrowDown"===n?null!=V&&V<E.length-1?K(V+1):K(0):"Enter"===n?null!=V&&(se(E[V]),R||(ne.current?.input?.blur(),K(null))):"Escape"===n&&(ne.current?.input?.blur(),K(null),Q(!1),z&&z(""))},ce=()=>{if(R&&O&&!(O<1)&&Array.isArray(P))return O-P.length},ue=()=>{const n=E.filter(de);if(e&&0===E.length&&P){if(Array.isArray(P))return P.join(", ");if("object"==typeof P&&P.text)return P.text;if("string"==typeof P)return P}if(0===n.length)return B||W((0,g.ZP)("Select"));if(R){const e=n.map((e=>e.text)).join(", ");return S?`${S} ${e}`:e}return n[0].text},de=e=>"string"==typeof P?P===e.value:Array.isArray(P)?P.filter((n=>n===e.value)).length>=1:"object"==typeof P&&null!=P&&P.value===e.value,pe=(e,n,t)=>(0,v.jsx)(d.Z,{className:"D_pL",colorToken:n,inline:!0,singleline:t,size:"s",children:e}),me=e=>{const n=ce();return(0,v.jsxs)(u.Z,{className:l()("D_pK",s),container:X.current,customStyles:{maxHeight:49*T+"px"},horizontalAlign:"left",keepOpenOnTargetClick:w,onHide:re,onMouseOver:ie,show:J,target:e,children:[void 0!==n&&(0,v.jsx)(d.Z,{className:"D_pM",colorToken:Y.ContentSecondary,size:"s",children:n>0?(0,v.jsx)(m.Z,{id:(0,g.ZP)("You can add %{remaining} more selection(s)."),options:{remaining:n}}):(0,v.jsx)(m.Z,{id:(0,g.ZP)("Youve reached the maximum number of selections.")})}),E.length>0&&(0,v.jsx)("div",{className:`D_pN ${t}`,children:E.map(((e,t)=>he(e,t,n)))})]})},he=(e,n,t)=>{const s=de(e),l=!s&&0===t;return(0,v.jsx)(b,{disabled:l,hovered:n===V,isDesktop:$,onSelect:se,option:e,renderOptionInSingleLine:U,renderOptionMaxLine:G,selected:s,showCheckMark:R},n)};return(0,v.jsxs)("div",{className:`D_pC ${n}`,"data-testid":I,ref:X,role:"listbox",children:[H?(()=>{const e=l()(D,{[N]:Boolean(Z)});return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(c.Z,{classNameInputContainer:e,disabled:C,iconLeftURL:k,label:L,onChange:le,onFocus:oe,onKeyDown:ae,placeholder:B,ref:ne,value:J?M||"":ue()}),me(ne.current?.container||null)]})})():(()=>{const e=l()("D_pE",{[N]:Boolean(Z)},{D_pJ:J},D,{[f]:J}),n=l()("D_pT",{D_pU:Boolean(k)});return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(i.Z,{className:e,disabled:C,onClick:te,ref:ee,type:"outline",children:[L&&(0,v.jsx)(d.Z,{className:n,inline:!0,singleline:!0,size:"s",textAlign:"left",children:L}),k&&(0,v.jsx)(a.Z,{className:"D_pI",src:k}),(0,v.jsx)("div",{className:"D_pG",children:(0,v.jsx)(d.Z,{className:"D_pH",colorToken:J?Y.ContentSecondary:Y.ContentPrimary,inline:!0,singleline:!y,children:ue()})}),(0,v.jsx)(p.Z,{direction:J?"up":"down",size:24,useTransition:!0})]}),me(ee.current)]})})(),Z?pe(Z,Y.ContentNegative,!0):j&&pe(j,Y.ContentSecondary,!1)]})}},747:(e,n,t)=>{t.d(n,{Z:()=>d});var s=t(9),l=t.n(s),o=t(0),r=t(399),i=t(783),a=t(72),c=t(1),u=t(32);const d=({checked:e,className:n,classNameText:t,classNameSubText:s,error:d,iconUrl:p,label:m,name:h,onChange:_,onChangeWhenChecked:x=!1,subLabel:g,textSize:D="m",textWeight:v="regular",value:f,disabled:j})=>{const[N,b]=(0,o.useState)(!1),C=l()("D_qs",n,d&&u.env.JEST_WORKER_ID?"inputError":null,e&&u.env.JEST_WORKER_ID?"checked":null),y=l()("D_q_",s);return(0,c.jsxs)("label",{className:C,children:[(0,c.jsx)("input",{checked:e,className:"D_qv",disabled:j,name:h,onBlur:function(){b(!1)},onChange:_,onClick:x?n=>{e&&_(n)}:void 0,onFocus:function(){b(!0)},type:"radio",value:f}),(0,c.jsxs)("div",{className:"D_qt",children:[(0,c.jsx)("div",{className:"D_qu",children:(0,c.jsx)(i.Z,{error:d,focus:N,selected:e,size:20})}),(0,c.jsxs)("div",{className:"D_qw",children:[p&&(0,c.jsx)(r.Z,{className:"D_qx",loadingClassName:"D_qy",src:p}),(0,c.jsxs)("div",{className:"D_qz",children:[(0,c.jsx)(a.Z,{className:t,inline:!0,size:D,weight:v,children:m}),g?(0,c.jsx)(a.Z,{className:y,inline:!0,size:"s",children:g}):null]})]})]})]})}},783:(e,n,t)=>{t.d(n,{Z:()=>a});var s=t(9),l=t.n(s),o=t(0),r=t(1);function i(e){const n=e.size,t=n+8,s=.1*n,o=.3*n,i=t/2,a=`${-i} ${-i} ${t} ${t}`,c=e.error?"D_Vj":e.selected?"D_Vi":"D_Vh";return(0,r.jsxs)("svg",{"aria-hidden":!0,className:l()("D_Vf",e.className),height:t,viewBox:a,width:t,xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("circle",{className:c,r:n/2-s/2,strokeWidth:s}),(0,r.jsx)("circle",{className:"D_Vg",fillOpacity:e.selected?"1":"0",r:o}),e.focus?(0,r.jsx)("circle",{className:"D_Vk",r:n/2+2,strokeWidth:4}):null]})}const a=(0,o.memo)(i)},798:(e,n,t)=>{t.d(n,{Z:()=>p});var s=t(9),l=t.n(s),o=t(180),r=t.n(o),i=t(0),a=t(10),c=t(777),u=t(8),d=t(1);const p=({children:e,className:n,content:t,direction:s="bottomLeft",hideTooltipCover:o=!1,tooltipClassName:p})=>{const m=(0,a.v9)(u.Y6),[h,_]=(0,i.useState)(!1),x=l()("D_afu",n),g=l()("D_afv",p,{D_afx:"topLeft"===s||"topRight"===s||"topCenter"===s,D_afy:"bottomLeft"===s||"bottomRight"===s||"bottomCenter"===s}),D=()=>{m||_((e=>!e))},v=r()((()=>{m&&_(!0)}),100),f=r()((()=>{m&&_(!1),!m&&o&&_(!1)}),100);return(0,d.jsxs)("div",{className:x,onMouseEnter:v,onMouseLeave:f,children:[(0,d.jsx)("div",{onClick:D,children:e}),h&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c.Z,{className:g,direction:{bottomCenter:"topCenter",bottomLeft:"topLeft",bottomRight:"topRight",topCenter:"bottomCenter",topLeft:"bottomLeft",topRight:"bottomRight"}[s],children:t}),!m&&!o&&(0,d.jsx)("div",{className:"D_afw",onClick:D})]})]})}},962:(e,n,t)=>{t.d(n,{Z:()=>u});var s=t(0),l=t(731),o=t(72),r=t(104),i=t(769),a=t(1);const c=e=>{const{className:n,error:t,field:i,onChange:c,value:u=""}=e,{trackFieldTapped:d}=(0,s.useContext)(r.P_),p=e=>{c&&c(e.currentTarget.value)};if("string"!=typeof u)return null;const m=()=>{d?.(i.id)};if("year_start"===i.ui_rules.date_type||"year_end"===i.ui_rules.date_type)return(0,a.jsx)(l.Z,{className:n,error:t,label:i.ui_rules.label,max:2500,min:1900,onChange:p,onFocus:m,placeholder:i.ui_rules.placeholder,type:"number",value:u});{const e=u.slice(0,10),s=i.ui_rules.max_date_timestamp?new Date(1e3*i.ui_rules.max_date_timestamp).toISOString().slice(0,10):"2500-12-31",r=i.ui_rules.min_date_timestamp?new Date(1e3*i.ui_rules.min_date_timestamp).toISOString().slice(0,10):"1900-01-01";return(0,a.jsxs)("label",{children:[(0,a.jsx)(o.Z,{children:i.ui_rules.label}),(0,a.jsx)(l.Z,{className:n,error:t,max:s,min:r,onChange:p,onFocus:m,placeholder:"YYYY-MM-DD",type:"date",value:e})]})}},u=(0,i.p)((0,s.memo)(c))},1059:(e,n,t)=>{t.d(n,{Z:()=>x}),t(0);var s=t(753),l=t(747),o=t(72),r=t(104),i=t(769),a=t(723),c=t(173),u="D_axF",d="D_axG",p=t(1);const m=({optionGroup:e,field:n,journey:t,onChange:s,value:l})=>{const i=(0,c.Z)(),d=(0,a.c)("bx-6710-new-filter-web"),m=i&&"search"===t&&d,x=m?"l":"s",g=e.options.map(r.D2).map((e=>{const t={field:n,key:e.value,onChange:s,option:e,value:l};return n.ui_rules.is_multi_select?(0,p.jsx)(h,{...t}):(0,p.jsx)(_,{...t})}));return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(o.Z,{className:u,size:x,weight:"semibold",children:e.option_group_header}),m?(0,p.jsx)("div",{className:"D_axH",children:g}):g]})},h=({field:e,option:n,value:t,onChange:l})=>{const o=Array.isArray(t)?t:"string"==typeof t?t.split(","):[];return(0,p.jsx)(s.Z,{checked:o.includes(n.value),className:d,label:n.text,name:e.id,onChange:e=>{const n=e.currentTarget.value;let t;t=o.includes(n)?o.filter((e=>e!==n)):[...o,n],l(t)},singleline:!0,value:n.value})},_=({option:e,value:n,onChange:t})=>(0,p.jsx)(l.Z,{checked:n===e.value,className:d,label:e.text,onChange:e=>{const n=e.currentTarget.value;t(n)},value:e.value}),x=(0,i.p)((({field:e,journey:n,onChange:t,value:s=[]})=>{const l=(0,c.Z)(),r=(0,a.c)("bx-6710-new-filter-web"),{option_groups:i,label:d}=e.ui_rules,h=!(l&&"search"===n&&r);return(0,p.jsxs)(p.Fragment,{children:[h&&(0,p.jsx)(o.Z,{className:u,children:d}),i.map((l=>(0,p.jsx)(m,{field:e,journey:n,onChange:t,optionGroup:l,value:s},l.option_group_id)))]})}))},778:e=>{e.exports="https://mweb-cdn.karousell.com/build/check-124bb045a7.svg"}}]);
//# sourceMappingURL=https://mdev.llesuorac.com/01857052a1fbff6c7926249973b6164fd2b19d8b/291a7d41a6d21c26.min.js.map
//# debugId=9b5c59a9-3428-5a36-a4c1-2025d32eab57