1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e.SENTRY_RELEASE={id:"3.7.13"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="04acf930-202f-48bf-8a27-d4c5cba54158",e._sentryDebugIdIdentifier="sentry-dbid-04acf930-202f-48bf-8a27-d4c5cba54158")}catch{}}();"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5747],{74727(e,t,l){l.d(t,{A:()=>r});var i=l(41425);let o=["title"],n={key:0,class:"position-relative d-flex align-items-center w-100"},a=["title"],s={key:0,class:"text-12-muted ps-3"},d={key:1,class:"quick-add-bar position-relative d-flex align-items-center"},c=["title"],r=(0,l(66262).A)({name:"quick-add",props:{once:{type:Boolean,default:!1},preventPlusAdd:{type:Boolean,default:!1},title:{type:String},titlePlus:{type:String},center:{type:Boolean,default:!1},buttonShifted:{type:Boolean,default:!1},label:{type:String,default:""},hoverBackground:{}},data:()=>({quickAddLocked:!1,ready:!1,timer:null}),methods:{onPlusClick(e){this.preventPlusAdd&&e.stopPropagation(),this.$emit("plus-click",e)},onEnter(){this.timer=setTimeout(()=>this.ready=!0,50)},onLeave(){this.ready=!1,this.timer&&(clearTimeout(this.timer),this.timer=null)},onMouseLeave(e){e.preventDefault(),e.stopPropagation(),this.quickAddLocked=!1},quickAddNewItem(){!this.quickAddLocked&&this.ready&&(this.$emit("add"),this.once?this.quickAddLocked=!0:this.lock(500))},lock(e){this.quickAddLocked=!0,setTimeout(()=>this.quickAddLocked=!1,e)}}},[["render",function(e,t,l,r,u,h){return(0,i.openBlock)(),(0,i.createElementBlock)("div",(0,i.mergeProps)({class:["position-absolute w-100 add-item-bar d-flex align-items-center",{"cursor-pointer":!u.quickAddLocked}],onMouseenter:t[2]||(t[2]=(...e)=>h.onEnter&&h.onEnter(...e)),onMouseleave:t[3]||(t[3]=(...e)=>h.onLeave&&h.onLeave(...e)),title:l.title,onClick:t[4]||(t[4]=(0,i.withModifiers)((...e)=>h.quickAddNewItem&&h.quickAddNewItem(...e),["stop","prevent"]))},(0,i.toHandlers)(l.once?{mouseover:h.onMouseLeave}:{},!0)),[l.center&&l.label&&!u.quickAddLocked&&u.ready?((0,i.openBlock)(),(0,i.createElementBlock)("div",n,[t[6]||(t[6]=(0,i.createElementVNode)("div",{class:"quick-add-bar col px-0"},null,-1)),(0,i.createElementVNode)("div",(0,i.mergeProps)({class:["d-flex align-items-center px-3 col-auto",{"mx-auto":l.center}]},l.hoverBackground?{style:`background-color: ${l.hoverBackground}`}:{}),[(0,i.createElementVNode)("div",{class:"quick-add-ico d-flex align-items-center justify-content-center",onClick:t[0]||(t[0]=(...e)=>h.onPlusClick&&h.onPlusClick(...e)),title:l.titlePlus},[...t[5]||(t[5]=[(0,i.createElementVNode)("svg",{width:"11",height:"10",viewBox:"0 0 11 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,i.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 0H4.5V4L0.5 4V6H4.5V10H6.5V6H10.5V4L6.5 4V0Z",fill:"white"})],-1)])],8,a),l.label?((0,i.openBlock)(),(0,i.createElementBlock)("span",s,(0,i.toDisplayString)(l.label),1)):(0,i.createCommentVNode)("v-if",!0)],16),t[7]||(t[7]=(0,i.createElementVNode)("div",{class:"quick-add-bar col px-0"},null,-1))])):!u.quickAddLocked&&u.ready?((0,i.openBlock)(),(0,i.createElementBlock)("div",d,[(0,i.createElementVNode)("div",{class:(0,i.normalizeClass)(["quick-add-ico d-flex align-items-center justify-content-center",{"mx-auto":l.center,shifted:l.buttonShifted}]),title:l.titlePlus,onClick:t[1]||(t[1]=(...e)=>h.onPlusClick&&h.onPlusClick(...e))},[...t[8]||(t[8]=[(0,i.createElementVNode)("svg",{width:"11",height:"10",viewBox:"0 0 11 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,i.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 0H4.5V4L0.5 4V6H4.5V10H6.5V6H10.5V4L6.5 4V0Z",fill:"white"})],-1)])],10,c)])):(0,i.createCommentVNode)("v-if",!0)],16,o)}],["__scopeId","data-v-1d47ca22"]])},56133(e,t,l){l.r(t),l.d(t,{default:()=>ei});var i=l(41425);let o={class:"mx-1 my-3"},n={class:"col-12 row align-items-center mb-3"},a={class:"col-12 col-sm-8 mt-1 mt-sm-0"},s={class:"col-12 row align-items-center"},d={class:"col-sm-8 mt-0"},c={class:"kis-dialog-head"},r={class:"kis-dialog-head-title"},u={class:"kis-dialog-head-cta kis-dialog-head-cta-gap"},h=["title"],m={id:"discount-modal",class:"kis-dialog-container"},g={style:{height:"100%"}}
1,p={key:0,class:"d-flex align-items-center justify-content-center w-100"},v={class:"text-17-muted my-5"},f={key:1,style:{height:"100%"}},w={class:"position-relative"},k={class:"col-12 col-md-7 col-lg-8 px-0 d-flex align-items-center py-6 ms-2 pe-3"},y={class:"d-flex align-items-center pl-5px pr-20 ml-12"},b={key:0,alt:"",class:"item-img-preview"},V={key:1,class:"item-img-preview",width:"80",height:"80",viewBox:"0 0 80 80","aria-hidden":"true"},x={class:"updated-item-name text-ellipsis mr-6"},E={class:"col-auto px-0 d-flex align-items-center pl-12 ps-sm-0 py-6"},N=["id","onKeydown","onBlur","value","onInput","disabled","title"],S={class:"col-auto ms-3"},C={key:0,class:"d-flex align-items-baseline"},B={class:"text-12-muted text-line-through mr-6"},_={key:0,class:"text-14"},$={key:1,class:"d-flex align-items-baseline"},A={class:"text-14"},I={id:"discount-modal-footer",class:"kis-dialog-footer kis-dialog-container kis-dialog-container-sm d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center w-100"},D={class:"d-flex align-items-center me-3 my-2 my-md-0"},P={key:0,class:"d-flex align-items-center deselect-all me-3"},F=["title"],L={key:0,class:"d-flex align-items-stretch flex-column flex-sm-row my-1 my-md-0 me-0"},T={class:"d-flex align-items-center"},O=["disabled"];l(18111),l(22489),l(18237),l(61701),l(13579),l(7588),l(44114);var M=l(94239),q=l(74727),H=l(31839),j=l(97478),z=l(16544),K=l(14961),R=l(33868),U=l(4221),Z=l(95283),G=l(46167),W=l(6947),Y=l(13775),Q=l(15906),J=l(31571),X=l(92574),ee=l(9670),et=l(29195);l(60088);let el={name:"product-discount",props:{name:String,modalTitle:String,editedKey:String},directives:{Validate:U.b},data:()=>({discountForAllValue:0,items:[],discounts:{},showLoader:!0,loading:!1,selectedItems:[]}),computed:{currency:()=>R.M.currency,tabs:()=>Y.vR,discountNotValid(){return this.discountForAllValue<0||this.discountForAllValue>100},noEmails(){return 0===Object.values(this.emailsMap).filter(e=>""!==e).length},emailsMap(){let e=this.uncooperativeStores.reduce((e,t)=>(e[t.name]=t.email,e),{});return e[this.NEW_STORE_KEY]=this.newShopEmail,e},uncooperativeStores(){let e=this.supplierDomains.map(z.Wq);return this.stores.filter(t=>!e.some(e=>t.name.includes(e)))},hasSomeUncooperativeStores(){return this.uncooperativeStores.length>0},lastUpdatedAt:()=>R.M.lastPricesUpdatedAt,readOnly:()=>R.M.readOnlyMode},components:{DynamicScrollerItem:ee._,FormCheckbox:W.A,DiscountCalculator:Z.A,LoaderDots:H.A,QuickAdd:q.A,Popover:Q.A,Dialog:X.A,DynamicScroller:et._},methods:{formatNumber:z.ZV,onDiscountAllInput(e){let t=this.getNumberFromRangeOrEmpty(e,0,100);null!==t&&(this.discountForAllValue=t)},getNumberFromRangeOrEmpty:(e,t,l)=>""===e?null:isNaN(e=Number(e))?t:e>100?l:e<0?t:e,applySingleItem(e){let t=this.getNumberFromRangeOrEmpty(e.discount,0,100);if(null===t){e.discount=0;return}e.discount=t,G.f.setDiscount(e,e.discount)},onApplyDiscounts(){let e=this.items.filter(e=>e.discount>=0&&e.discount<=100).map(e=>({key:e.key,discount:e.discount}));this.$emit("apply",e),this.$dialog.hide(this.name)},applyToSelected(){this.discountNotValid||this.selectedItems.forEach(e=>{let t=M.rS.getItemByKey(e);G.f.setDiscount(t,this.discountForAllValue)})},calculateDiscountedPrice:z.w_,onOpenModal(){this.getItems(),this.showLoader=!1,(0,J._)("product_discount_modal_opened"),this.editedKey&&this.$nextTick(()=>{let e=document.querySelector(`#discount_${this.editedKey}`);setTimeout(()=>{e&&e.focus(),e&&e.select()},500)})},onCloseModal(){this.$emit("close"),window.removeEventListener("keydown",this.onSelectKeydownEvent)},getItems(){this.items=M.rS.getAllItems(e=>e).filter(e=>"default"===e.type)},translate:j.T,imgSrc:z.cM,formatToCurrency:e=>(0,K.vv)(e,R.M.currency),onItemSelect(e){this.selectedItems.includes(e)?this.selectedItems=this.selectedItems.filter(t=>t!==e):this.selectedItems.push(e)},isSelected(e){return this.selectedItems.includes(e)},onSelectKeydownEvent(e){"a"===e.key?this.selectedItems=this.items.map(e=>e.key):e.shiftKey&&"A"===e.key&&(this.selectedItems=[])},onSelectAll(e){this.selectedItems=e?this.items.map(e=>e.key):[]}},mounted(){window.addEventListener("keydown",this.onSelectKeydownEvent)}},ei=(0,l(66262).A)(el,[["render",function(e,t,l,M,q,H){let j=(0,i.resolveComponent)("Popover"),z=(0,i.resolveComponent)("loader-dots"),K=(0,i.resolveComponent)("form-checkbox"),R=(0,i.resolveComponent)("discount-calculator"),U=(0,i.resolveComponent)("DynamicScrollerItem"),Z=(0,i.resolveComponent)("DynamicScroller"),G=(0,i.resolveComponent)("Dialog"),W=(0,i.resolveDirective)("lazy");return(0,i.openBlock)(),(0,i.createElementBlock)("div",null,[(0,i.createVNode)(j,{ref:"shortcutsPopover"},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)("div",o,[(0,i.createElementVNode)("div",n,[t[6]||(t[6]=(0,i.createElementVNode)("div",{class:"col-12 col-sm-4"},[(0,i.createElementVNode)("div",{class:"badge-text"},"A")],-1)),(0,i.createElementVNode)("span",a,(0,i.toDisplayString)(H.translate("shortcut_a")),1)]),(0,i.createElementVNode)("div",s,[t[7]||(t[7]=(0,i.createElementVNode)("div",{class:"col-sm-4"},[(0,i.createElementVNode)("div",{class:"badge-text"},"Shift + A")],-1)),(0,i.createElementVNode)("span",d,(0,i.toDisplayString)(H.translate("shortcut_shift_a")),1)])])]),_:1},512),(0,i.createVNode)(G,{name:l.name,onShow:H.onOpenModal,onHide:H.onCloseModal,"content-class":"kis-dialog-column",closable:!1,"content-style":"height: 100%;",style:{"max-width":"1100px",width:"100%",height:"100%"}},{body:(0,i.withCtx)(()=>[(0,i.createElementVNode)("div",c,[(0,i.createElementVNode)("div",r,(0,i.toDisplayString)(l.modalTitle),1),(0,i.createElementVNode)("div",u,[(0,i.createElementVNode)("button",{type:"button",class:"kis-icon kis-icon-lg d-none d-sm-flex",onClick:t[0]||(t[0]=(...t)=>e.$refs.shortcutsPopover.toggle&&e.$refs.shortcutsPopover.toggle(...t)),title:H.translate("shortcuts")},[...t[8]||(t[8]=[(0,i.createElementVNode)("svg",{width:"20",height:"20",viewBox:"0 0 25 26","aria-hidden":"true"},[(0,i.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-keyboard"})],-1)])],8,h),(0,i.createElementVNode)("button",{class:"kis-icon kis-icon-lg",onClick:t[1]||(t[1]=t=>e.$dialog.hide(this.name))},[...t[9]||(t[9]=[(0,i.createElementVNode)("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[(0,i.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-dialog-close"})],-1)])])])]),(0,i.createElementVNode)("div",m,[q.showLoader?((0,i.openBlock)(),(0,i.createBlock)(z,{key:0,"top-class":"loader-dots-absolute"})):(0,i.createCommentVNode)("v-if",!0),(0,i.createElementVNode)("div",g,[0===q.items.length?((0,i.openBlock)(),(0,i.createElementBlock)("div",p,[(0,i.createElementVNode)("div",v,(0,i.toDisplayString)(H.translate("no_items")),1)])):((0,i.openBlock)(),(0,i.createElementBlock)("div",f,[(0,i.createVNode)(Z,{
1class:"virtual-list",items:q.items,"min-item-size":68,"key-field":"key",buffer:200,style:{padding:"0"}},{default:(0,i.withCtx)(({item:e,index:l,active:o})=>[(0,i.createVNode)(U,{item:e,active:o,"data-index":l,class:(0,i.normalizeClass)(["pb-6",0!==l?"pt-12":""])},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)("div",w,[(0,i.createElementVNode)("div",{class:(0,i.normalizeClass)(["section-item-row flex-wrap flex-xs-nowrap d-flex align-items-center w-100",[{"box-shadow-selected":H.isSelected(e.key)}]])},[(0,i.createElementVNode)("div",k,[(0,i.createVNode)(K,{"model-value":H.isSelected(e.key),onChange:t=>H.onItemSelect(e.key),class:(0,i.normalizeClass)(["is-selected",{active:H.isSelected(e.key)}])},{extra:(0,i.withCtx)(()=>[...t[10]||(t[10]=[(0,i.createElementVNode)("svg",{width:"13",height:"9",viewBox:"0 0 13 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"svg svg-icon border-gray bg-white"},[(0,i.createElementVNode)("path",{"data-v-21951d93":"",d:"M5.00301 8.99989L0.76001 4.75689L2.17401 3.34289L5.00301 6.17189L10.659 0.514893L12.074 1.92889L5.00301 8.99989Z",fill:"#2D9CDB"})],-1)])]),"off-extra":(0,i.withCtx)(()=>[...t[11]||(t[11]=[(0,i.createElementVNode)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"bg-white"},[(0,i.createElementVNode)("rect",{x:"0.5",y:"0.5",width:"19",height:"19",stroke:"#BDC3C7"})],-1)])]),_:1},8,["model-value","onChange","class"]),(0,i.createElementVNode)("div",y,[e.photo?(0,i.withDirectives)(((0,i.openBlock)(),(0,i.createElementBlock)("img",b,null,512)),[[W,H.imgSrc(e.photo,0,"nano_thumb")]]):((0,i.openBlock)(),(0,i.createElementBlock)("svg",V,[...t[12]||(t[12]=[(0,i.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-placeholder"},null,-1)])]))]),(0,i.createElementVNode)("span",x,(0,i.toDisplayString)(e.collection),1)]),(0,i.createElementVNode)("div",E,[(0,i.createVNode)(R,{value:e.commission,currency:H.currency,item:e,"body-class":"me-1",ref:`discountCalculator${l}`,"default-calculation-type":H.tabs.SHARE_THE_DISCOUNT,disabled:H.readOnly},null,8,["value","currency","item","default-calculation-type","disabled"]),(0,i.createElementVNode)("input",{type:"text",style:{width:"56px"},placeholder:"0",class:"discount-input px-12 py-6 mr-3p text-12-normal",id:`discount_${e.key}`,onKeydown:(0,i.withKeys)(t=>H.applySingleItem(e),["enter"]),onBlur:t=>H.applySingleItem(e),value:H.formatNumber(e.discount),onInput:t=>e.discount=H.formatNumber(t.target.value),disabled:H.isSelected(e.key)||e.calculation_type===H.tabs.SHARE_THE_DISCOUNT||e.calculation_type===H.tabs.CATALOG_PRICE,title:e.calculation_type===H.tabs.SHARE_THE_DISCOUNT||e.calculation_type===H.tabs.CATALOG_PRICE?H.translate("edit_using_calculator"):""},null,40,N),t[13]||(t[13]=(0,i.createElementVNode)("span",{class:"text-muted text-14"},"%",-1))]),(0,i.createElementVNode)("div",S,[e.discount>0&&e.discount<=100?((0,i.openBlock)(),(0,i.createElementBlock)("div",C,[(0,i.createElementVNode)("div",B,(0,i.toDisplayString)(H.formatToCurrency(e.unit_price)),1),e.discount>0&&e.discount<=100?((0,i.openBlock)(),(0,i.createElementBlock)("div",_,(0,i.toDisplayString)(H.formatToCurrency(H.calculateDiscountedPrice(e.discount,e.unit_price))),1)):(0,i.createCommentVNode)("v-if",!0)])):((0,i.openBlock)(),(0,i.createElementBlock)("div",$,[(0,i.createElementVNode)("div",A,(0,i.toDisplayString)(H.formatToCurrency(e.unit_price)),1)]))])],2)])]),_:2},1032,["item","active","data-index","class"])]),_:1},8,["items"])]))])]),(0,i.createElementVNode)("div",I,[(0,i.createElementVNode)("div",D,[q.selectedItems.length>0?((0,i.openBlock)(),(0,i.createElementBlock)("div",P,[((0,i.openBlock)(),(0,i.createElementBlock)("svg",{title:H.translate("deselect_items"),class:"mr-6 clickable",onClick:t[2]||(t[2]=()=>{q.selectedItems=[]}),width:"18",height:"18",viewBox:"0 0 18 18","aria-hidden":"true"},[...t[14]||(t[14]=[(0,i.createElementVNode)("use",{"xlink:href":"/build/images/spritemap.svg#icon-ico-deselect"},null,-1)])],8,F)),(0,i.createTextVNode)(" "+(0,i.toDisplayString)(H.translate("selected_items_count",{count:q.selectedItems.length})),1)])):(0,i.createCommentVNode)("v-if",!0),q.selectedItems.length!==q.items.length?((0,i.openBlock)(),(0,i.createElementBlock)("button",{key:1,onClick:t[3]||(t[3]=(...e)=>H.onSelectAll&&H.onSelectAll(...e)),class:"kis-btn kis-btn-sm kis-btn-outline-purple"},(0,i.toDisplayString)(H.translate("select_all_items")),1)):(0,i.createCommentVNode)("v-if",!0)]),q.selectedItems.length>0?((0,i.openBlock)(),(0,i.createElementBlock)("div",L,[(0,i.createElementVNode)("div",T,[(0,i.withDirectives)((0,i.createElementVNode)("input",{type:"text",class:"discount-input px-12 py-6 m-0 h-fit",style:{width:"56px"},"onUpdate:modelValue":t[4]||(t[4]=e=>q.discountForAllValue=e)},null,512),[[i.vModelText,q.discountForAllValue]]),t[15]||(t[15]=(0,i.createElementVNode)("span",{class:"text-muted text-14 align-self-center mx-2"},"%",-1)),(0,i.createElementVNode)("button",{disabled:q.showLoader,class:(0,i.normalizeClass)([{disabled:q.showLoader&&H.discountNotValid},"kis-btn kis-btn-purple"]),onClick:t[5]||(t[5]=(...e)=>H.applyToSelected&&H.applyToSelected(...e))},(0,i.toDisplayString)(H.translate("set_customer_discount")),11,O)])])):(0,i.createCommentVNode)("v-if",!0)])]),_:1},8,["name","onShow","onHide"])])}],["__scopeId","data-v-0f29669c"]])},55024(e,t,l){l.d(t,{A:()=>
1o});var i=l(16039),o={name:"BaseEditableHolder",extends:l(98992).A,emits:["update:modelValue","value-change"],props:{modelValue:{type:null,default:void 0},defaultValue:{type:null,default:void 0},name:{type:String,default:void 0},invalid:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},formControl:{type:Object,default:void 0}},inject:{$parentInstance:{default:void 0},$pcForm:{default:void 0},$pcFormField:{default:void 0}},data:function(){return{d_value:void 0!==this.defaultValue?this.defaultValue:this.modelValue}},watch:{modelValue:{deep:!0,handler:function(e){this.d_value=e}},defaultValue:function(e){this.d_value=e},$formName:{immediate:!0,handler:function(e){var t,l;this.formField=(null==(t=this.$pcForm)||null==(l=t.register)?void 0:l.call(t,e,this.$formControl))||{}}},$formControl:{immediate:!0,handler:function(e){var t,l;this.formField=(null==(t=this.$pcForm)||null==(l=t.register)?void 0:l.call(t,this.$formName,e))||{}}},$formDefaultValue:{immediate:!0,handler:function(e){this.d_value!==e&&(this.d_value=e)}},$formValue:{immediate:!1,handler:function(e){var t;null!=(t=this.$pcForm)&&t.getFieldState(this.$formName)&&e!==this.d_value&&(this.d_value=e)}}},formField:{},methods:{writeValue:function(e,t){var l,i;this.controlled&&(this.d_value=e,this.$emit("update:modelValue",e)),this.$emit("value-change",e),null==(l=(i=this.formField).onChange)||l.call(i,{originalEvent:t,value:e})},findNonEmpty:function(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];return t.find(i.hj)}},computed:{$filled:function(){return(0,i.hj)(this.d_value)},$invalid:function(){var e,t;return!this.$formNovalidate&&this.findNonEmpty(this.invalid,null==(e=this.$pcFormField)||null==(e=e.$field)?void 0:e.invalid,null==(t=this.$pcForm)||null==(t=t.getFieldState(this.$formName))?void 0:t.invalid)},$formName:function(){var e;return this.$formNovalidate?void 0:this.name||(null==(e=this.$formControl)?void 0:e.name)},$formControl:function(){var e;return this.formControl||(null==(e=this.$pcFormField)?void 0:e.formControl)},$formNovalidate:function(){var e;return null==(e=this.$formControl)?void 0:e.novalidate},$formDefaultValue:function(){var e,t;return this.findNonEmpty(this.d_value,null==(e=this.$pcFormField)?void 0:e.initialValue,null==(t=this.$pcForm)||null==(t=t.initialValues)?void 0:t[this.$formName])},$formValue:function(){var e,t;return this.findNonEmpty(null==(e=this.$pcFormField)||null==(e=e.$field)?void 0:e.value,null==(t=this.$pcForm)||null==(t=t.getFieldState(this.$formName))?void 0:t.value)},controlled:function(){return this.$inProps.hasOwnProperty("modelValue")||!this.$inProps.hasOwnProperty("modelValue")&&!this.$inProps.hasOwnProperty("defaultValue")},filled:function(){return this.$filled}}}},72868(e,t,l){l.d(t,{A:()=>d});var i=l(85194),o=l(55024),n=` 2 .p-toggleswitch { 3 display: inline-block; 4 width: dt('toggleswitch.width'); 5 height: dt('toggleswitch.height'); 6 } 7 8 .p-toggleswitch-input { 9 cursor: pointer; 10 appearance: none; 11 position: absolute; 12 top: 0; 13 inset-inline-start: 0; 14 width: 100%; 15 height: 100%; 16 padding: 0; 17 margin: 0; 18 opacity: 0; 19 z-index: 1; 20 outline: 0 none; 21 border-radius: dt('toggleswitch.border.radius'); 22 } 23 24 .p-toggleswitch-slider { 25 cursor: pointer; 26 width: 100%; 27 height: 100%; 28 border-width: dt('toggleswitch.border.width'); 29 border-style: solid; 30 border-color: dt('toggleswitch.border.color'); 31 background: dt('toggleswitch.background'); 32 transition: 33 background dt('toggleswitch.transition.duration'), 34 color dt('toggleswitch.transition.duration'), 35 border-color dt('toggleswitch.transition.duration'), 36 outline-color dt('toggleswitch.transition.duration'), 37 box-shadow dt('toggleswitch.transition.duration'); 38 border-radius: dt('toggleswitch.border.radius'); 39 outline-color: transparent; 40 box-shadow: dt('toggleswitch.shadow'); 41 } 42 43 .p-toggleswitch-handle { 44 position: absolute; 45 top: 50%; 46 display: flex; 47 justify-content: center; 48 align-items: center; 49 background: dt('toggleswitch.handle.background'); 50 color: dt('toggleswitch.handle.color'); 51 width: dt('toggleswitch.handle.size'); 52 height: dt('toggleswitch.handle.size'); 53 inset-inline-start: dt('toggleswitch.gap'); 54 margin-block-start: calc(-1 * calc(dt('toggleswitch.handle.size') / 2));
55 border-radius: dt('toggleswitch.handle.border.radius'); 56 transition: 57 background dt('toggleswitch.transition.duration'), 58 color dt('toggleswitch.transition.duration'), 59 inset-inline-start dt('toggleswitch.slide.duration'), 60 box-shadow dt('toggleswitch.slide.duration'); 61 } 62 63 .p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider { 64 background: dt('toggleswitch.checked.background'); 65 border-color: dt('toggleswitch.checked.border.color'); 66 } 67 68 .p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-handle { 69 background: dt('toggleswitch.handle.checked.background'); 70 color: dt('toggleswitch.handle.checked.color'); 71 inset-inline-start: calc(dt('toggleswitch.width') - calc(dt('toggleswitch.handle.size') + dt('toggleswitch.gap'))); 72 } 73 74 .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider { 75 background: dt('toggleswitch.hover.background'); 76 border-color: dt('toggleswitch.hover.border.color'); 77 } 78 79 .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-handle { 80 background: dt('toggleswitch.handle.hover.background'); 81 color: dt('toggleswitch.handle.hover.color'); 82 } 83 84 .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider { 85 background: dt('toggleswitch.checked.hover.background'); 86 border-color: dt('toggleswitch.checked.hover.border.color'); 87 } 88 89 .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-handle { 90 background: dt('toggleswitch.handle.checked.hover.background'); 91 color: dt('toggleswitch.handle.checked.hover.color'); 92 } 93 94 .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-slider { 95 box-shadow: dt('toggleswitch.focus.ring.shadow'); 96 outline: dt('toggleswitch.focus.ring.width') dt('toggleswitch.focus.ring.style') dt('toggleswitch.focus.ring.color'); 97 outline-offset: dt('toggleswitch.focus.ring.offset'); 98 } 99 100 .p-toggleswitch.p-invalid > .p-toggleswitch-slider { 101 border-color: dt('toggleswitch.invalid.border.color'); 102 } 103 104 .p-toggleswitch.p-disabled { 105 opacity: 1; 106 } 107 108 .p-toggleswitch.p-disabled .p-toggleswitch-slider { 109 background: dt('toggleswitch.disabled.background'); 110 } 111 112 .p-toggleswitch.p-disabled .p-toggleswitch-handle { 113 background: dt('toggleswitch.handle.disabled.background'); 114 } 115`,a=l(36988).A.extend({name:"toggleswitch",style:n,classes:{root:function(e){var t=e.instance,l=e.props;return["p-toggleswitch p-component",{"p-toggleswitch-checked":t.checked,"p-disabled":l.disabled,"p-invalid":t.$invalid}]},input:"p-toggleswitch-input",slider:"p-toggleswitch-slider",handle:"p-toggleswitch-handle"},inlineStyles:{root:{position:"relative"}}}),s=l(41425),d={name:"ToggleSwitch",extends:{name:"BaseToggleSwitch",extends:o.A,props:{trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},readonly:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:a,provide:function(){return{$pcToggleSwitch:this,$parentInstance:this}}},inheritAttrs:!1,emits:["change","focus","blur"],methods:{getPTOptions:function(e){return("root"===e?this.ptmi:this.ptm)(e,{context:{checked:this.checked,disabled:this.disabled}})},onChange:function(e){if(!this.disabled&&!this.readonly){var t=this.checked?this.falseValue:this.trueValue;this.writeValue(t,e),this.$emit("change",e)}},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e){var t,l;this.$emit("blur",e),null==(t=(l=this.formField).onBlur)||t.call(l,e)}},computed:{checked:function(){return this.d_value===this.trueValue},dataP:function(){return(0,i.cn)({checked:this.checked,disabled:this.disabled,invalid:this.$invalid})}}}
115,c=["data-p-checked","data-p-disabled","data-p"],r=["id","checked","tabindex","disabled","readonly","aria-checked","aria-labelledby","aria-label","aria-invalid"],u=["data-p"],h=["data-p"];d.render=function(e,t,l,i,o,n){return(0,s.openBlock)(),(0,s.createElementBlock)("div",(0,s.mergeProps)({class:e.cx("root"),style:e.sx("root")},n.getPTOptions("root"),{"data-p-checked":n.checked,"data-p-disabled":e.disabled,"data-p":n.dataP}),[(0,s.createElementVNode)("input",(0,s.mergeProps)({id:e.inputId,type:"checkbox",role:"switch",class:[e.cx("input"),e.inputClass],style:e.inputStyle,checked:n.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,"aria-checked":n.checked,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-invalid":e.invalid||void 0,onFocus:t[0]||(t[0]=function(){return n.onFocus&&n.onFocus.apply(n,arguments)}),onBlur:t[1]||(t[1]=function(){return n.onBlur&&n.onBlur.apply(n,arguments)}),onChange:t[2]||(t[2]=function(){return n.onChange&&n.onChange.apply(n,arguments)})},n.getPTOptions("input")),null,16,r),(0,s.createElementVNode)("div",(0,s.mergeProps)({class:e.cx("slider")},n.getPTOptions("slider"),{"data-p":n.dataP}),[(0,s.createElementVNode)("div",(0,s.mergeProps)({class:e.cx("handle")},n.getPTOptions("handle"),{"data-p":n.dataP}),[(0,s.renderSlot)(e.$slots,"handle",{checked:n.checked})],16,h)],16,u)],16,c)}}}]);
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.