PageSourceSearch

https://assets.omnisegment.com/a8c43eaa6c/assets/index-COLRgcR9.js

js omnisegment.com collected 2026-10-07 15:21:18 UTC 12,298 bytes, 5 lines download raw bytes

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]="450e4121-d190-5ce9-bee4-b476d85e4aa1")}catch(e){}}();
3import{j as t,e as d,r as g}from"./index.modern-Bk2HkT0W.js";import{aO as I,aP as C,aU as _,bs as M,ar as v,T as P,b3 as R}from"./i18next-CszFfP19.js";import{a as x,O as j}from"./index-M-PNOqPT.js";import{S as D,T as L}from"./index-Dd5yBUji.js";import{u as S}from"./useMultiHighlightColumnSearchProps-BVLImr4Y.js";import{I as T,S as E,K as U,s as O,E as $,a2 as q,Q as z}from"./main-LStdChlz.js";import{M as K}from"./MaUploadContactModal-CIO51M7p.js";import"./SearchColumnDropdown-B0bsFa8L.js";import{b,B as p}from"./index-BQ2d9Nl-.js";import{C as w}from"./index-D-ik_bUf.js";import{T as F,P as W}from"./Table-BLuy6k3H.js";import{E as B}from"./ExportOutlined-Dz-Jg5Ud.js";import{A as H}from"./ArrowRightOutlined-BT6q6IGb.js";import{L as V}from"./index-DL-WLzNv.js";import{P as G}from"./PlusCircleFilled-r35gX_Ww.js";import{F as Q}from"./FontSizeOutlined-rIwmmemw.js";import{D as Z}from"./DeleteOutlined-BagnrRyR.js";import"./moment-DdbtTH-v.js";import"./utils-CSAAr35u.js";import"./useFlexGapSupport-jkLCp-NU.js";import"./index-AwK2lYAB.js";import"./useForceUpdate-CMpVYnmX.js";import"./DownloadOutlined-1rVSR8g9.js";import"./index-D_yrCVzT.js";import"./Compact-PbnmyqLK.js";import"./react-router-dom-DXdvtoRG.js";import"./hoist-non-react-statics.cjs-B15GkqZC.js";import"./react-error-boundary.esm-hP1M-t7m.js";import"./omit-D_5uR4aN.js";import"./Modal-DC9nk9mf.js";import"./htmlPropsUtils-CJ5Ylz3D.js";import"./reduce-CpBSza1e.js";import"./Label-Ks5-xyFy.js";import"./_baseSet-B5zHM4Uu.js";import"./Button-BFLYUsvG.js";import"./IframeProvider-vVUS8qNT.js";import"./ShowConfirmModal-DicafaA2.js";import"./useDataCategory-DEjYqMkv.js";import"./SpecifiedEventPlatform-B9h0Nb1l.js";import"./index-Esn6J2e9.js";import"./PlaceholderConditionFieldList-mPMYO8bp.js";import"./LogicDisplay-Bhnm8lxr.js";import"./TransText-Bwe-759-.js";import"./SiteSelect-BwVnBs_C.js";import"./navigationStore-B5vOcQ0r.js";import"./Dropdown-BOSA1e0C.js";import"./Path-Ua_Gp91t.js";import"./G-CcHRxzW0.js";import"./ConstraintForm-C74W52MH.js";import"./constants-aiCedAsw.js";import"./index-DdhsUcq7.js";import"./useQuery-Bu9IAIDW.js";import"./utils-Td84NrFk.js";import"./index-CREkANFA.js";import"./index-BCmZ69Bt.js";import"./UploadOutlined-Eo9-Qidj.js";import"./css-CG3sgCP8.js";import"./index-BblopUiD.js";import"./CaretDownOutlined-BYd2v7Ye.js";const{Text:J}=b;var X=d(J).withConfig({displayName:"ContentForm___StyledText",componentId:"sc-dkygcs-0"})(["color:#8c8c8c;flex:0 0 20%;max-width:20%;"]);function Y({form:e,onFinish:c}){const{t:o}=I(),s=x.useWatch("target_url",e),[{data:h,loading:m}]=C("/ma_ads/brand/");return t.jsxs(x,{form:e,layout:"vertical",onFinish:c,children:[t.jsx(x.Item,{name:"name",rules:[{required:!0}],label:o("all.name"),children:t.jsx(T,{maxLength:50,placeholder:o("all.pleaseInput")})}),t.jsx(x.Item,{name:"brand",label:o("adAudienceIntegration.brand"),rules:[{required:!0}],children:t.jsx(E,{loading:m,placeholder:o("all.pleaseSelect"),style:{width:"100%"},options:h==null?void 0:h.map(({id:y,pixel_id:l,name:f})=>({value:y,label:"".concat(f," (").concat(l,")")}))})}),t.jsx(tt,{name:"target_url",label:o("trackingUrl.targetUrl"),rules:[{required:!0,validator:(y,l)=>l!=null&&l.startsWith("https://")?Promise.resolve():Promise.reject(new Error(o("editor.popUp.https.placeholder")))}],children:t.jsx(T,{placeholder:o("editor.popUp.https.placeholder")})}),s&&t.jsxs(et,{children:[t.jsx(X,{children:o("editor.popUp.confirmUrl")}),t.jsx(at,{href:s,target:"_blank",children:s})]})]})}var tt=d(x.Item).withConfig({displayName:"ContentForm___StyledOmniFormItem",componentId:"sc-dkygcs-1"})(["margin-bottom:8px;"]),et=d("div").withConfig({displayName:"ContentForm___StyledDiv",componentId:"sc-dkygcs-2"})(["display:flex;"]),at=d(b.Link).withConfig({displayName:"ContentForm___StyledTypographyLink",componentId:"sc-dkygcs-3"})(["word-break:break-all;"]);const rt=()=>{const{t:e}=I(),[c,o]=g.useState(!1),[s,h]=g.useState([]),[m,y]=g.useState({current:1,pageSize:10,total:0}),l=g.useCallback(async(r=1)=>{o(!0);const{data:a={}}=await _.get("/ma_ads/ad-tracking-link-file/?page=".concat(r));h(a.results),y(i=>({...i,current:r,total:a.count,pageCount:a.page_count})),o(!1)},[]);g.useEffect(()=>{l()},[l]);const f=r=>{const a=document.createElement("a");a.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(r)),a.setAttribute("download","error-log"),a.style.display="none",document.body.appendChild(a),a.click()},k=[{title:e("startingTime"),dataIndex:"start_time",key:"start_time",render:r=>U(r)},{title:e("completeTime"),dataIndex:"complete_time",key:"complete_time",render:r=>U(r)},{title:e("fileName"),dataIndex:"filename",key:"filename"},{title:e("trackingUrl.importer"),dataIndex:"create_user",key:"create_user"},{title:e("all.ReportStatus.ImportStatus"),dataIndex:"state",key:"state",render:(r,a)=>t.jsxs(t.Fragment,{children:[t.jsx(D,{status:r,statusMap:{COMPLETED:{color:L.green,text:e("all.ReportStatus.completed")},ERROR:{color:L.red,text:e("all.ReportStatus.error")}}}
3),r==="ERROR"&&t.jsx(O,{icon:"warn",content:e("all.importInternalSystemError")}),r==="COMPLETED"&&a.error_list&&t.jsx(O,{icon:"warn",content:e("customer.importedDataErrors")})]})},{title:e("action"),key:"action",width:"300px",render:(r,{state:a,error_list:i,field_mapping:n})=>t.jsxs(w,{children:[a==="COMPLETED"&&i&&t.jsx(p,{icon:t.jsx(B,{}),onClick:()=>f(i),children:e("all.exportErrorReport")}),t.jsx(j,{title:e("trackingUrl.viewFieldMapping"),footer:null,centered:!0,width:520,renderTrigger:({open:u})=>t.jsx(p,{icon:t.jsx($,{}),onClick:u,children:e("trackingUrl.viewFieldMapping")}),children:t.jsx(it,{dataSource:Object.entries(n).map(([u,A],N)=>({key:N,systemFieldName:{name:e("all.name"),brand:e("adAudienceIntegration.brand"),target_url:e("trackingUrl.targetUrl")}[u],fileFieldName:A}))})})]})}];return t.jsxs(t.Fragment,{children:[t.jsx(F,{size:"small",columns:k,dataSource:s,rowKey:"id",pagination:!1,loading:c,onChange:r=>l(r.current)}),t.jsx(W,{current:m.current,total:m.total,pageSize:m.pageSize,onChange:r=>l(r),showSizeChanger:!1,style:{marginTop:16,textAlign:"right"}})]})},it=({dataSource:e})=>{const{t:c}=I(),o=[{title:c("MAField"),dataIndex:"systemFieldName",key:"systemFieldName",render:s=>t.jsx(nt,{children:s})},{title:c("product.import.correspond"),dataIndex:"mapping",key:"mapping",render:()=>t.jsx(H,{})},{title:c("spreadsheetField"),dataIndex:"fileFieldName",key:"fileFieldName",render:s=>t.jsx(E,{defaultValue:s,disabled:!0,style:{width:"100%"}})}];return t.jsx(F,{columns:o,dataSource:e,pagination:!1,size:"middle"})};var nt=d("span").withConfig({displayName:"ImportStatus___StyledSpan",componentId:"sc-umm950-0"})(["&::before{display:inline-block;margin-right:8px;color:#ff4d4f;font-size:14px;font-family:SimSun,sans-serif;line-height:1;content:'*';}"]);const{confirm:ot}=j;function ke(){const{t:e}=I(),[c]=x.useForm(),[{data:o=[]}]=C("/ma_ads/brand/"),[{data:s=[],loading:h},m]=C("/ma_ads/ad-tracking-link/"),[y,l]=g.useState(!1),[f,k]=g.useState(null),r=g.useMemo(()=>s.map(a=>{try{const i=a.target_url.split("?")[1],n=new URLSearchParams(i);return{...a,utm_campaign:n.get("utm_campaign"),utm_medium:n.get("utm_medium"),utm_source:n.get("utm_source")}}catch{return a}}),[s]);return t.jsx(lt,{children:t.jsx(st,{children:t.jsx(q,{titleComp:e("trackingUrl"),children:t.jsxs(dt,{children:[t.jsx(j,{title:e("add"),width:650,renderTrigger:({open:a})=>t.jsx(p,{type:"primary",icon:t.jsx(G,{}),onClick:a,children:e("add")}),children:t.jsx(Y,{form:c,onFinish:async({name:a,brand:i,target_url:n})=>{await _({url:"/ma_ads/ad-tracking-link/",method:"POST",data:{name:a,url:n,brand_id:i}}),await m(),c.resetFields()}})}),t.jsxs(mt,{children:[t.jsx(j,{title:e("trackingUrl.importStatus"),width:1e3,style:{top:50},footer:null,destroyOnClose:!0,renderTrigger:({open:a})=>t.jsx(p,{onClick:a,children:e("trackingUrl.importStatus")}),children:t.jsx(rt,{})}),t.jsx(p,{onClick:()=>l(!0),children:e("trackingUrl.importFromFile")}),t.jsx(p,{onClick:async()=>{const{data:a}=await _({url:"/ma_ads/ad-tracking-link/export/",method:"POST"});if(a!=null&&a.csv){const i=new Blob([a.csv]),n=URL.createObjectURL(i),u=document.createElement("a");u.setAttribute("href",n),u.setAttribute("download","export_ad_tracking_link.csv"),document.body.appendChild(u),u.click()}},children:e("trackingUrl.exportReport")})]}),t.jsx(ct,{rowKey:a=>a.id,dataSource:r,loading:h,scroll:{x:1500},columns:[{title:e("all.name"),dataIndex:"name",key:"name",filterIcon:t.jsx(z,{}),fixed:"left",...S({dataIndex:"name"})},{title:e("adAudienceIntegration.brand"),dataIndex:["brand","name"],key:"brand",filters:o.map(({id:a,name:i})=>({text:i,value:a})),onFilter:(a,i)=>{var n;return((n=i.brand)==null?void 0:n.id)===a}},{title:e("trackingUrl.targetUrl"),dataIndex:"target_url",key:"target_url",width:"25%",...S({dataIndex:"target_url"})},{title:e("trackingUrl"),dataIndex:"converted_url",key:"converted_url",width:"25%",render:a=>t.jsx(pt,{copyable:{icon:t.jsx(p,{icon:t.jsx(M,{})}),tooltips:[e("all.copy"),e("all.copySuccessfully")]},children:a})},{title:"".concat(e("campaign")," (utm_campaign)"),dataIndex:"utm_campaign",key:"utm_campaign",...S({dataIndex:"utm_campaign"})},{title:"".concat(e("medium")," (utm_medium)"),dataIndex:"utm_medium",ke
3y:"utm_medium",...S({dataIndex:"utm_medium"})},{title:"".concat(e("source")," (utm_source)"),dataIndex:"utm_source",key:"utm_source",...S({dataIndex:"utm_source"})},{title:e("trackingUrl.clickCount"),dataIndex:"click_count",key:"click_count",render:a=>a==null?void 0:a.toLocaleString()},{title:e("action"),dataIndex:"id",key:"action",fixed:"right",render:(a,i)=>t.jsxs(w,{wrap:!0,children:[t.jsx(j,{title:e("all.rename"),width:650,keyboard:!1,renderTrigger:({open:n})=>t.jsx(v,{title:e("all.rename"),children:t.jsx(p,{icon:t.jsx(Q,{}),onClick:n})}),children:t.jsx(x,{layout:"vertical",initialValues:{name:i.name},onFinish:async({name:n})=>{await _({url:"/ma_ads/ad-tracking-link/".concat(a,"/"),method:"PATCH",data:{name:n}}),await m()},children:t.jsx(x.Item,{name:"name",rules:[{required:!0}],label:e("all.name"),children:t.jsx(T,{maxLength:50,placeholder:e("all.pleaseInput")})})})}),t.jsx(v,{title:e("delete"),children:t.jsx(p,{icon:t.jsx(Z,{}),onClick:()=>{ot({title:t.jsx(R,{i18nKey:"all.confirm.deleteObject",values:{object:i.name},components:{alert:t.jsx(b.Text,{type:"danger"})}}),icon:t.jsx(P,{}),okText:e("delete"),okType:"danger",cancelText:e("cancel"),async onOk(){await _({url:"/ma_ads/ad-tracking-link/".concat(a,"/"),method:"DELETE"}),await m()}})}})})]})}],$_css:y?"none":"block"}),t.jsx(ut,{importContact:async(a,i)=>{try{k(""),(await _({url:"/ma_ads/ad-tracking-link-file/",method:"POST",data:{field_mapping:i,uuid:a}})).status===201?k("success"):k("error"),l(!1),m()}catch{k("error"),l(!1),m()}},removeUploadedContact:a=>{_({url:"/ma_audience/remove-uploaded-file/",method:"POST",data:{filename:a}})},closeUploadField:()=>l(!1),dataType:"adTrackingLink",importFileStatus:f,$_css2:y?"block":"none"})]})})})})}var lt=d("div").withConfig({displayName:"AdTrackingLink___StyledDiv",componentId:"sc-19elq15-0"})(["height:100%;min-height:100vh;background-color:#f5f8fc;"]),st=d("div").withConfig({displayName:"AdTrackingLink___StyledDiv2",componentId:"sc-19elq15-1"})(["width:100%;"]),dt=d(V.Content).withConfig({displayName:"AdTrackingLink___StyledLayoutContent",componentId:"sc-19elq15-2"})(["margin:28px;"]),mt=d(w).withConfig({displayName:"AdTrackingLink___StyledSpace",componentId:"sc-19elq15-3"})(["float:right;"]),ct=d(F).withConfig({displayName:"AdTrackingLink___StyledTable",componentId:"sc-19elq15-4"})(["margin-top:24px;word-break:break-all;display:",";"],e=>e.$_css),pt=d(b.Text).withConfig({displayName:"AdTrackingLink___StyledTypographyText",componentId:"sc-19elq15-5"})(["gap:8px;display:inline-flex;align-items:center;"]),ut=d(K).withConfig({displayName:"AdTrackingLink___StyledMaUploadContactModal",componentId:"sc-19elq15-6"})(["display:",";margin-top:16px;"],e=>e.$_css2);export{ke as default};
4
5//# debugId=450e4121-d190-5ce9-bee4-b476d85e4aa1

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.