1var U=Object.defineProperty,_=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var m=(o,s,t)=>s in o?U(o,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[s]=t,v=(o,s)=>{for(var t in s||(s={}))K.call(s,t)&&m(o,t,s[t]);if(L)for(var t of L(s))Q.call(s,t)&&m(o,t,s[t]);return o},b=(o,s)=>_(o,$(s));var a=(o,s,t)=>m(o,typeof s!="symbol"?s+"":s,t);import{U as D,T as J,I as B,K as n,a0 as G,a2 as E,b$ as x,P as e,bl as X,aO as A}from"./vendor-Cd7MAbpv.js";import{c as Y}from"./index-CsqlJCzy.js";import{gq as Z,cd as ee,c1 as oe,cc as te,a_ as ne,ce as ae,b3 as se,b4 as re,b7 as ie,a$ as le,b8 as ce,gz as de,gA as pe,gB as ue,bR as he,a9 as ge,bF as Ce,a4 as Te,c2 as ve,bQ as be,c3 as fe,gC as Ie,bD as me,aM as xe,aB as Ae,gD as we,c4 as ye,am as M,bw as W,A as Se,ag as y,M as S,gv as R,gw as q,gE as k,cx as j,cy as ke,cz as d,J as Re,br as je,z as ze,gu as w,F as N,gF as Fe,bn as O,bm as Le,c8 as De,C as Ee,ae as H}from"./index-CNXviWdp.js";import{x as Ne,v as Oe,z as He,B as Pe,D as Ve,L as Be,E as Me,w as We,y as l}from"./index-D4JEciBd.js";import{t as P}from"./StringConstants-D4jkjUMi.js";import{U as qe}from"./index-DFC1Qr_I.js";import{I as h}from"./index-Dkv70TRm.js";import{I as Ue}from"./index-0zkzNE0G.js";import{E as _e,D as $e}from"./index-u-naz3ek.js";import{D as Ke}from"./DecorationMethodIconTool-Cxs3nbEz.js";import{u as Qe}from"./useDecorationOverrides-DVzBTMnF.js";import{T as Je}from"./TooManyColorAlert-3KUZJ1pi.js";import{M as Ge}from"./index-BjImFacp.js";import{O as Xe}from"./index-DzlYFG54.js";import{t as Ye,a as Ze,b as eo}from"./resize-BZb5eDyo.js";import{t as oo}from"./flip-ymlLYdHi.js";import"./newrelic-C9OPJfMc.js";import"./index-BuCZ3Ana.js";import"./index-Cv713ALs.js";import"./plus_circle-DovOtKNy.js";import"./index-qebO2gzR.js";import"./index-QJeS_IZZ.js";import"./ColorSwatch-5n84u3ra.js";import"./useDecoMethodNotification-BfDRmFc_.js";const V='<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="m.99999995 4.99508927c0-1.1018574.89654562-1.99508931 2.00090501-1.99508931h17.99819004c1.1050693 0 2.000905.89262281 2.000905 1.99508931v14.00982143c0 1.1018574-.8965456 1.9950893-2.000905 1.9950893h-17.99819004c-1.10506932 0-2.00090501-.8926228-2.00090501-1.9950893zm1.99990106 14.00982143 17.99919399-.0049107c.0014455 0 .001004-14.00491073.001004-14.00491073l-17.99919404.0049107c-.00144551 0-.00100395 14.00491073-.00100395 14.00491073zm5.02768977-9.60209676c.2466793-.4951047.68722156-.51710165.97983976-.0556584l1.69897566 2.67919356c.2944712.4643653.9133976.6044229 1.3854507.3109374l.9890463-.6149113c.4706921-.2926394 1.10981-.168527 1.4335274.2856556l2.2640015 3.176443c.3210232.4504026.1321448.8155262-.4194807.8155262h-10.61757568c-.552696 0-.80000946-.4028913-.5540923-.8964663zm9.47240922 1.59718606c-.8284271 0-1.5-.6715729-1.5-1.50000002 0-.82842709.6715729-1.5 1.5-1.5s1.5.67157291 1.5 1.5c0 .82842712-.6715729 1.50000002-1.5 1.50000002z" fill="#222020" fill-rule="evenodd"/></svg>';function to(){const o=J({backwardable:ye,colorsUsedInDesign:we,selectedView:Ae,getViewConstraint:xe,defaultIconColor:me,designApiVersion:Ie,forwardable:fe,selectedIcon:be,selectedIconRecolored:ve,contextualToolsOpen:Ve,selectedProductColor:Te,isAnchorLaserEngraved:Ce,isSleeveDecoEligible:ge,subtleColors:he});return(s,t)=>o(s,t)}function no(o){const s=D({backward:ce,resize:le,center:ie,duplicate:re,forward:se,resetClipartColors:ae,rotate:ne,search:Pe,updateHorizontalFlip:te,updateLockRatio:He,updateSingleColor:oe,updateTransparency:Oe,updateVerticalFlip:ee,toggleInvertedClipart:Z,changeSpotColor:Ne},o),t=D({artClose:ue,artPalette:pe,artSwap:de},o);return b(v({},s),{analytics:t})}const z=o=>{const{actions:s,isAnchorLaserEngraved:t}=o;s.rotate=o.rotate;const r=o.selectedIconRecolored&&!t,{restrictColorPalette:i,decorationMethod:u}=Qe(),p=M(W),c=B.useMemo(()=>Se(),[]);function g(T){o.resize(b(v({},T),{source:"panel"}))}const C=()=>i?n.jsx(Ke,{decorationMethod:u}):n.jsxs(n.Fragment,{children:[o.hasSingleColorToggle&&n.jsx(h,{chevron:!1,className:"ndx-ArtSingleColor",title:"Make One Color",onClick:o.updateSingleColor,children:n.jsx(x,{checked:!!o.selectedIcon.singleColor,onChange:o.updateSingleColor})}),n.jsx(_e,{alert:n.jsx(Be,{selectedIcon:o.selectedIcon}),colors:o.iconColors,hasAltTransparentIcon:!0,title:o.colorButtonAction?null:"Art Colors",onClick:o.colorButtonAction,subtleColors:o.subtleColors}),n.jsx(Je,{mb:2}),R(o.selectedIcon)&&n.jsx(h,{chevron:!1,className:"ndx-ArtSingleColor",subheader:"Recommended for dark products",title:"Invert Art Colors",onClick:o.toggleInvertedClipart,children:n.jsx(x,{checked:q(o.selectedIcon),onChange:o.toggleInvertedClipart})}),n.jsx($e,{visible:o.hasWhiteToggler,noPadding:!0,children:n.jsx(h,{chevron:!1,className:"ndx-ArtTransparency",title:"Remove White",onClick:o.updateTransparency,children:n.jsx(x,{checked:o.selectedIcon.transparent,onChange:o.updateTransparency})})})]});return n.jsx("div",{className:"ndx-ArtToolsContent_Lg ndx-Container",children:n.jsxs("div",{className:"ndx-ArtToolsContent_Lg-content",children:[n.jsx(qe,{actions:o.actions,actives:o.actives,duplicate:o.duplicate,iconId:o.selectedIcon.id,iconRotation:o.selectedIcon.rotation,iconType:o.selectedIcon.type,isCanvasToolbarEnabled:p}),C(),n.jsx(h,{className:"ndx-IconCardTool--swapArt",title:"Change Art",onClick:o.swapButtonAction,children:n.jsx(G,{button:!0,variant:"buttonMd",onClick:o.swapButtonAction,children:"Change"})}),n.jsx(h,{chevron:!1,subheader:y(S.onlyMedium)?`W ${P} H`:`Width ${P} Height`,title:y(S.onlyMedium)?" ":"Art Size",children:n.jsx(Ue,{constraint:o.viewConstraints,hidePadlock:o.selectedIcon.rotation!==0,iconHeight:o.selectedIcon.height,iconId:o.selectedIcon.id,iconLockRatio:o.selectedIcon.lockRatio,iconType:o.selectedIcon.type,iconWidth:o.selectedIcon.width,resize:g,updateLockRatio:o.updateLockRatio})}),n.jsxs(h,{chevron:!1,className:"ndx-ArtToolsContent_Lg-saveButton",children:[n.jsx(E,{size:"large",fullWidth:!0,variant:"link",disabled:!r,onClick:()=>o.resetClipartColors({selectedIcon:o.selectedIcon,source:"panel"}),children:"Reset To Original"}),!c&&n.jsx(E,{fullWidth:!0,variant:"secondary",size:"large",onClick:o.onSaveClick,children:"Save Design"})]})]})})};z.displayName="ArtToolsContent_Lg";const ao={resize:e.func.isRequired,searchSubmit:e.func.isRequired,swapButtonAction:e.func.isRequired,toggleInvertedClipart:e.func.isRequired,updateLockRatio:e.func.isRequired,updateSingleColor:e.func.isRequired,updateTransparency:e.func.isRequired,actions:e.shape({backward:e.func,center:e.func,forward:e.func,rotate:e.func,updateHorizontalFlip:e.func,updateVerticalFlip:e.func}
1),actives:e.shape({backward:e.bool,center:e.bool,forward:e.bool,iconHorizontalFlip:e.bool,iconVerticalFlip:e.bool}),anchorStyleDecorationMethod:e.string,colorButtonAction:e.func,decorationOverride:e.object,duplicate:e.func,hasSingleColorToggle:e.bool,hasWhiteToggler:e.bool,iconColors:e.arrayOf(k),isAnchorLaserEngraved:e.bool,resetClipartColors:e.func,rotate:e.func,selectedIcon:j,selectedIconRecolored:e.bool,subtleColors:e.array,viewConstraints:e.shape({height:e.number,width:e.number}),onSaveClick:e.func};z.propTypes=ao;const F=o=>{const{colorButtonAction:s,hasSingleColorToggle:t,hasWhiteToggler:r,iconColors:i,navigateToEditColors:u,selectedIcon:p}=o,c=M(W),g=()=>o.actions.center({source:"panel"}),C=()=>{const T=i.length===1,f=!(t||R(p)||r);T&&f?s==null||s():u()};return n.jsx(Xe,{children:n.jsx("div",{className:"ndx-ArtToolsContent-toolbarContainer",children:n.jsxs(ke,{className:"ndx-ArtToolsContent-toolbar",children:[n.jsx(d,{className:"ndx-ArtToolsContent-toolbarItem",text:"Edit Color",onClick:C,children:n.jsx(Ge,{colors:o.iconUserColors})}),!c&&n.jsx(d,{className:"ndx-ArtToolsContent-toolbarItem ndx-ArtToolsContent-toolbarItem-wide",icon:V,text:"Change Art",onClick:o.swapButtonAction}),!c&&n.jsx(d,{className:"ndx-ArtToolsContent-toolbarItem",icon:Ye,text:"Center",onClick:g}),n.jsx(d,{className:"ndx-ArtToolsContent-toolbarItem ndx-ArtToolsContent-toolbarItem-narrow",icon:oo,text:"Flip",onClick:o.navigateToFlip}),!c&&n.jsx(d,{className:"ndx-ArtToolsContent-toolbarItem",text:"Duplicate",onClick:o.actions.duplicate,children:n.jsx(X,{})}),n.jsx(d,{className:"ndx-ArtToolsContent-toolbarItem",icon:Ze,text:"Reorder",onClick:o.navigateToLayers}),!c&&n.jsxs(n.Fragment,{children:[n.jsx(d,{className:"ndx-ArtToolsContent-toolbarItem",icon:Me,text:"Rotate",onClick:o.navigateToRotate}),n.jsx(d,{className:"ndx-ArtToolsContent-toolbarItem",icon:eo,text:"Resize",onClick:o.navigateToDimensions})]}),c&&n.jsx(d,{className:"ndx-ArtToolsContent-toolbarItem ndx-ArtToolsContent-toolbarItem-wide",icon:V,text:"Change Art",onClick:o.swapButtonAction})]})})})};F.displayName="ArtToolsContent";const so={searchSubmit:e.func.isRequired,swapButtonAction:e.func.isRequired,toggleInvertedClipart:e.func.isRequired,updateSingleColor:e.func.isRequired,updateTransparency:e.func.isRequired,actions:e.shape({backward:e.func,center:e.func,duplicate:e.func,forward:e.func,updateHorizontalFlip:e.func,updateVerticalFlip:e.func}),actives:e.shape({backward:e.bool,center:e.bool,forward:e.bool,iconHorizontalFlip:e.bool,iconVerticalFlip:e.bool}),colorButtonAction:e.func,hasSingleColorToggle:e.bool,hasWhiteToggler:e.bool,iconColors:e.arrayOf(k),iconUserColors:e.arrayOf(k),navigateToDimensions:e.func,navigateToEditColors:e.func,navigateToFlip:e.func,navigateToLayers:e.func,navigateToRotate:e.func,selectedIcon:j,viewConstraints:e.shape({height:e.number,width:e.number}),onEditDone:e.func,onSaveClick:e.func};F.propTypes=so;const ro={analytics:e.shape({artClose:e.func,artPalette:e.func,artSwap:e.func}),backward:e.func,backwardable:e.bool,center:e.func,changeSpotColor:e.func,colorsUsedInDesign:e.arrayOf(e.instanceOf(H)),contextualToolsOpen:e.bool,defaultIconColor:e.instanceOf(H),designApiVersion:e.oneOfType([e.string,e.number]),duplicate:e.func,forward:e.func,forwardable:e.bool,getViewConstraint:e.func,isAnchorLaserEngraved:e.bool,isSleeveDecoEligible:e.bool,resetClipartColors:e.func,resize:e.func,rotate:e.func,routeHandlers:e.shape({artToolsHandler:e.func}),router:ze,search:e.func,selectedIcon:j,selectedIconRecolored:e.bool,selectedProductColor:e.object,selectedView:e.object,subtleColors:e.array,toggleInvertedClipart:e.func,updateHorizontalFlip:e.func,updateLockRatio:e.func,updateSingleColor:e.func,updateTransparency:e.func,updateVerticalFlip:e.func};class I extends B.Component{constructor(){super(...arguments);a(this,"debouncedHandleToggleInvertedIcon",A(t=>this.handleToggleInvertedIcon(t),100));a(this,"handleToggleInvertedIcon",t=>{t.stopPropagation(),l(),R(this.props.selectedIcon)&&this.props.toggleInvertedClipart({icon:this.props.selectedIcon,isInverted:!q(this.props.selectedIcon),source:"panel"})});a(this,"debouncedHandleSingleColor",A(t=>this.handleSingleColor(t),100));a(this,"handleSingleColor",t=>{t.stopPropagation(),l(),this.props.updateSingleColor({iconId:this.props.selectedIcon.id,singleColor:!this.props.selectedIcon.singleColor,defaultIconColor:this.props.defaultIconColor,source:"panel"},this.props.selectedIcon.type)});
1a(this,"debouncedHandleTransparency",A(t=>this.handleTransparency(t),100));a(this,"handleTransparency",t=>{t.stopPropagation(),l();const r=!this.props.selectedIcon.transparent;this.props.updateTransparency({iconId:this.props.selectedIcon.id,transparency:r,source:"panel"}),this.props.changeSpotColor({iconId:this.props.selectedIcon.id,original:w.White,user:r?w.None:w.White,transparentToggle:!0})});a(this,"navigateToColors",t=>{l();const{router:r,selectedIcon:i}=this.props;this.props.analytics.artPalette(),this.treatClipartAsSingleColor()?r.navigate("colors"):(!t&&i.colors.size===1&&(t=i.colors.first()),r.navigate(`spotColors/${t?t.original.hexString:""}`))});a(this,"navigateToHome",()=>{l(),this.props.analytics.artClose(),this.props.router.navigate("/")});a(this,"navigateToSave",()=>{l(),this.props.router.navigate("/saveForm?referrer=art")});a(this,"navigateToCrop",()=>{l(),N.fireEvent("edit upload","crop button","click"),this.props.router.navigate("crop")});a(this,"navigateToDimensions",()=>{l(),this.props.router.navigate("dimensions")});a(this,"navigateToLayers",()=>{l(),this.props.router.navigate("layers")});a(this,"navigateToRotate",()=>{l(),this.props.router.navigate("rotation")});a(this,"navigateToSelectedIcon",()=>{l(),this.props.router.navigate("/selectIcon")});a(this,"navigateToFlip",()=>{l(),this.props.router.navigate("flip")});a(this,"navigateToEditColors",()=>{l(),this.props.router.navigate("editColors")});a(this,"navigateToAddArt",()=>{l(),this.props.analytics.artSwap({source:"panel"});const t=this.props.selectedIcon.categoryPath||"changeArt";this.props.router.navigate(`/${t.replace("addArt","changeArt")}`)});a(this,"handleSearch",t=>{const r=encodeURIComponent(t);this.props.router.navigate(`/searchArt/${r}`)});a(this,"handleDuplicate",()=>{N.pageViewTag("ndx/art/duplicate_button"),this.props.duplicate({source:"panel",iconType:"art"})});a(this,"searchSubmit",t=>{this.props.search({keyword:t}),this.handleSearch(t)});a(this,"treatClipartAsSingleColor",()=>{const{selectedIcon:t}=this.props;return t.singleColor});a(this,"getDisplayedIconColors",()=>{const{selectedIcon:t,selectedProductColor:r}=this.props,i=[...t.colors];return this.treatClipartAsSingleColor()?[t.color]:(i.sort((u,p)=>r.name===p.palette.name?1:-1),i)});a(this,"getDisplayedUserIconColors",t=>t.map(r=>r instanceof Fe?r.user:r));a(this,"isLicensed",()=>{const{clipartId:t,clipartVersions:r}=this.props.selectedIcon;return Object.values(r).some(i=>i.clipartId===t.toString()&&i.licensed)});a(this,"shouldNavigateToColors",()=>!this.isLicensed());a(this,"hasWhiteToggler",()=>{const{selectedIcon:t}=this.props,r=i=>O(i.original)&&(O(i.user)||Le(i.user));return!t.singleColor&&t.colors.size>1&&t.colors.some(r)});a(this,"hasSingleColorToggle",()=>{if(this.isLicensed())return!1;const{selectedIcon:t}=this.props;return t.colors.size>1&&!t.blackwhite});a(this,"renderMobileArtToolsContent",t=>n.jsx(F,b(v({},t),{onEditDone:this.navigateToSelectedIcon})))}componentDidMount(){var t;(t=this.props.routeHandlers)==null||t.artToolsHandler()}render(){const t={backward:this.props.backward,center:this.props.center,forward:this.props.forward,duplicate:this.handleDuplicate,updateHorizontalFlip:this.props.updateHorizontalFlip,updateVerticalFlip:this.props.updateVerticalFlip},r={backward:this.props.backwardable,center:De(this.props.selectedIcon),forward:this.props.forwardable,iconHorizontalFlip:this.props.selectedIcon.horizontalFlip,iconVerticalFlip:this.props.selectedIcon.verticalFlip},i=this.getDisplayedIconColors(),u=this.getDisplayedUserIconColors(i),{getViewConstraint:p,selectedIcon:c,selectedView:g,subtleColors:C}=this.props,T=p(g),f={actions:t,actives:r,colorButtonAction:this.shouldNavigateToColors()?this.navigateToColors:null,hasWhiteToggler:this.hasWhiteToggler(),hasSingleColorToggle:this.hasSingleColorToggle(),isAnchorLaserEngraved:this.props.isAnchorLaserEngraved,iconColors:i,iconUserColors:u,isLicensed:this.isLicensed(),navigateToCrop:this.navigateToCrop,navigateToDimensions:this.navigateToDimensions,navigateToEditColors:this.navigateToEditColors,navigateToFlip:this.navigateToFlip,navigateToLayers:this.navigateToLayers,navigateToRotate:this.navigateToRotate,onSaveClick:this.navigateToSave,searchSubmit:this.searchSubmit,selectedIcon:c,subtleColors:C,resetClipartColors:this.props.resetClipartColors,selectedIconRecolored:this.props.selectedIconRecolored,swapButtonAction:this.navigateToAddArt,toggleInvertedClipart:this.debouncedHandleToggleInvertedIcon,updateSingleColor:this.debouncedHandleSingleColor,updateTransparency:this.debouncedHandleTrans
1parency,viewConstraints:T};return y(S.largeAndAbove)?n.jsx(Ee,{contentClassName:"ndx-ArtTools",title:"Edit Art",onNavClose:this.navigateToHome,children:this.props.selectedIcon.type&&n.jsx(z,b(v({},f),{resize:this.props.resize,rotate:this.props.rotate,updateLockRatio:this.props.updateLockRatio,resetClipartColors:this.props.resetClipartColors,selectedIconRecolored:this.props.selectedIconRecolored}))}):this.renderMobileArtToolsContent(f)}}a(I,"displayName","ArtTools"),a(I,"propTypes",ro),a(I,"defaultProps",{analytics:{artClose:()=>{},artPalette:()=>{},artSwap:()=>{}}});const Do=Y(to,no)(Re(We(I)),je);export{I as ArtTools,Do as default};
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.