403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/ui/stageflow/dist/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/ui/stageflow/dist/stageflow.bundle.min.js
this.BX=this.BX||{};(function(e,t,i,s){"use strict";let a=e=>e,l,o;class n{constructor(e){this.backgroundImage="url('data:image/svg+xml;charset=UTF-8,%3csvg width=%27295%27 height=%2732%27 viewBox=%270 0 295 32%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3e%3cmask id=%27mask0_2_11%27 style=%27mask-type:alpha%27 maskUnits=%27userSpaceOnUse%27 x=%270%27 y=%270%27 width=%27295%27 height=%2732%27%3e%3cpath fill=%27#COLOR2#%27 d=%27M0 2.9961C0 1.3414 1.33554 0 2.99805 0L285.905 7.15256e-07C287.561 7.15256e-07 289.366 1.25757 289.937 2.80757L295 16.5505L290.007 29.2022C289.397 30.7474 287.567 32 285.905 32H2.99805C1.34227 32 0 30.6657 0 29.0039V2.9961Z%27/%3e%3c/mask%3e%3cg mask=%27url(%23mask0_2_11)%27%3e%3cpath fill=%27#COLOR2#%27 d=%27M0 2.9961C0 1.3414 1.33554 0 2.99805 0L285.905 7.15256e-07C287.561 7.15256e-07 289.366 1.25757 289.937 2.80757L295 16.5505L290.007 29.2022C289.397 30.7474 287.567 32 285.905 32H2.99805C1.34227 32 0 30.6657 0 29.0039V2.9961Z%27/%3e%3cpath d=%27M0 30H295V32H0V30Z%27 fill=%27#COLOR1#%27/%3e%3c/g%3e%3c/svg%3e') 3 10 3 3 fill repeat";this.id=e.id;this.name=e.name;this.color=e.color;this.backgroundColor=e.backgroundColor;this.isFilled=e.isFilled;this.events=e.events;this.success=e.isSuccess;this.fail=e.isFail;this.fillingColor=e.fillingColor;this.isDisable=e.isDisable}static create(e){if(i.Type.isPlainObject(e)&&e.id&&e.name&&e.color&&e.backgroundColor){e.id=i.Text.toInteger(e.id);e.name=e.name.toString();e.color=e.color.toString();e.backgroundColor=e.backgroundColor.toString();e.events=i.Type.isPlainObject(e.events)?e.events:{};e.isFilled=i.Type.isBoolean(e.isFilled)?e.isFilled:false;e.isDisable=i.Type.isBoolean(e.isDisable)?e.isDisable:false;if(e.id>0){return new n(e)}}return null}getId(){return this.id}getName(){return this.name}setName(e){this.name=e;if(this.textNode){this.textNode.innerText=this.name}return this}isSuccess(){return this.success===true}isFail(){return this.fail===true}isFinal(){return this.isFail()||this.isSuccess()}isDisabled(){return this.isDisable}setDisable(e=true){if(this.isDisable===e){return this}if(this.node){i.Dom.toggleClass(this.node,"--disabled")}this.isDisable=e;return this}getColor(){return this.color}setColor(e){this.color=e;return this}render(){if(this.node){this.textNode.style.backgroundImage=this.getBackgroundImage()}else{const e=this.isDisabled()?"--disabled":"";this.textNode=i.Tag.render(l||(l=a`<div style="border-image: ${0};" class="ui-stageflow-stage-item-text">${0}</div>`),this.getBackgroundImage(),i.Text.encode(this.getName()));this.node=i.Tag.render(o||(o=a`<div 
					class="ui-stageflow-stage ${0}" 
					data-stage-id="${0}" 
					onmouseenter="${0}" 
					onmouseleave="${0}"
					onclick="${0}"
				>
				<div class="ui-stageflow-stage-item">
					${0}
				</div>
			</div>`),e,this.getId(),this.onMouseEnter.bind(this),this.onMouseLeave.bind(this),this.onClick.bind(this),this.textNode)}this.textNode.style.color=n.calculateTextColor("#"+(this.isFilled?this.color:this.backgroundColor));return this.node}getBackgroundImage(e=null,t=null){if(!e){if(this.isFilled&&this.fillingColor){e=this.fillingColor}else{e=this.getColor()}}if(i.Type.isNull(t)){t=this.isFilled}let s=this.backgroundImage.replaceAll("#COLOR1#",encodeURIComponent("#"+e));if(t){s=s.replaceAll("#COLOR2#",encodeURIComponent("#"+e))}else{s=s.replaceAll("#COLOR2#",encodeURIComponent("#"+this.backgroundColor))}return s}onMouseEnter(){if(i.Type.isFunction(this.events.onMouseEnter)){this.events.onMouseEnter(this)}}onMouseLeave(){if(i.Type.isFunction(this.events.onMouseLeave)){this.events.onMouseLeave(this)}}onClick(){if(i.Type.isFunction(this.events.onClick)){this.events.onClick(this)}}addBackLight(e){if(this.textNode){this.textNode.style.borderImage=this.getBackgroundImage(e,true);this.textNode.style.color=n.calculateTextColor("#"+e)}}removeBackLight(){if(this.textNode){this.textNode.style.borderImage=this.getBackgroundImage();this.textNode.style.color=n.calculateTextColor("#"+(this.isFilled?this.fillingColor:this.backgroundColor))}}getMinWidthForFullNameVisibility(){if(!this.textNode){return 0}const{clientWidth:e,offsetWidth:t,scrollWidth:i}=this.textNode;return i+(t-e)+2}isNameCropped(){if(!this.textNode){return false}return this.textNode.offsetWidth<this.textNode.scrollWidth}static calculateTextColor(e){var t,i,s;if(e.length>7&&e.indexOf("(")>=0&&e.indexOf(")")>=0){var a=e.split("(")[1].split(")")[0];a=a.split(",");t=parseInt(a[0]);i=parseInt(a[1]);s=parseInt(a[2])}else{if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)){var l=e.substring(1).split("");if(l.length===3){l=[l[0],l[0],l[1],l[1],l[2],l[2]]}l="0x"+l.join("");t=l>>16&255;i=l>>8&255;s=l&255}}var o=.21*t+.72*i+.07*s;return o<145?"#fff":"#333"}}let r=e=>e,g,c,h,u,d,S;const f="ui-stageflow-select-semantic-popup";const p="ui-stageflow-select-final-stage-popup";const m={id:"final",color:"7BD500",isFilled:false};const F={finalStageName:i.Loc.getMessage("UI_STAGEFLOW_FINAL_STAGE_NAME"),finalStagePopupTitle:i.Loc.getMessage("UI_STAGEFLOW_FINAL_STAGE_POPUP_TITLE"),finalStagePopupFail:i.Loc.getMessage("UI_STAGEFLOW_FINAL_STAGE_POPUP_FAIL"),finalStageSelectorTitle:i.Loc.getMessage("UI_STAGEFLOW_FINAL_STAGE_SELECTOR_TITLE")};class C{constructor(e,t=[]){this.currentStage=0;this.isActive=false;this.labels=F;if(i.Type.isPlainObject(e)){if(i.Type.isString(e.backgroundColor)&&e.backgroundColor.length===6){this.backgroundColor=e.backgroundColor}if(e.currentStage){this.currentStage=i.Text.toInteger(e.currentStage)}if(i.Type.isBoolean(e.isActive)){this.isActive=e.isActive}if(i.Type.isFunction(e.onStageChange)){this.onStageChange=e.onStageChange}if(i.Type.isPlainObject(e.labels)){this.labels={...this.labels,...e.labels}}}m.name=this.labels.finalStageName;if(i.Type.isArray(t)){let e=null;if(this.currentStage>0){t.forEach((t=>{if(i.Text.toInteger(t.id)===i.Text.toInteger(this.currentStage)){e=t.color}}))}this.fillStages(t,e)}if(!this.currentStage&&this.stages.length>0){this.currentStage=this.stages.keys().next().value}}setCurrentStageId(e){e=i.Text.toInteger(e);const t=this.getStageById(e);if(!t){return}this.currentStage=e;const s=this.getFinalStage();if(s){if(t.isFinal()){s.setColor(t.getColor()).setName(t.getName())}else{s.setColor(m.color).setName(m.name)}}this.stages.forEach((e=>{if(!e.isFinal()){e.fillingColor=t.getColor()}}));this.addBackLightUpToStage();return this}fillStages(e,t){let i=this.currentStage>0;const s={};this.stages=new Map;e.forEach((e=>{e.isFilled=i;e.backgroundColor=this.backgroundColor;e.fillingColor=t;e.events={onMouseEnter:this.onStageMouseHover.bind(this),onMouseLeave:this.onStageMouseLeave.bind(this),onClick:this.onStageClick.bind(this)};const a=n.create(e);if(a){this.stages.set(a.getId(),a)}if(a.isSuccess()){m.color=a.getColor()}if(a.isFinal()){s.isFilled=i;if(a.getId()===this.currentStage){s.name=a.getName();s.color=a.getColor()}}else if(i&&a.getId()===this.currentStage){i=false}}));if(this.getFailStages().length<=0){m.name=s.name=this.getSuccessStage().getName()}this.addFinalStage(s)}addFinalStage(e){this.stages.set(m.id,new n({...{backgroundColor:this.backgroundColor,events:{onMouseEnter:this.onStageMouseHover.bind(this),onMouseLeave:this.onStageMouseLeave.bind(this),onClick:this.onFinalStageClick.bind(this)}},...m,...e}))}getFinalStage(){return this.getStageById(m.id)}getStages(){return this.stages}getFirstFailStage(){let e=null;this.stages.forEach((t=>{if(t.isFail()&&!e){e=t}}));return e}getFailStages(){const e=[];this.stages.forEach((t=>{if(t.isFail()){e.push(t)}}));return e}getSuccessStage(){let e=null;this.stages.forEach((t=>{if(t.isSuccess()){e=t}}));return e}getStageById(e){return this.stages.get(e)}render(){const e=this.renderContainer();this.getStages().forEach((t=>{if(t.isFinal()){return}e.appendChild(t.render())}));this.addBackLightUpToStage();return e}renderContainer(){if(this.container){i.Dom.clean(this.container);return this.container}this.container=i.Tag.render(g||(g=r`<div class="ui-stageflow-container"></div>`));return this.container}onStageMouseHover(e){if(!this.isActive){return}this.hoverStageId=e.getId();for(let[t,i]of this.stages){i.addBackLight(e.getColor());if(t===e.getId()){break}}this.increaseStageWidthForNameVisibility(e)}onStageMouseLeave(e){if(!this.isActive){return}i.Dom.style(e.node,{flexBasis:null,flexGrow:null});for(let[t,i]of this.stages){i.removeBackLight();if(t===e.getId()){break}}}onStageClick(e){if(!this.isActive){return}if(e.getId()!==this.currentStage&&i.Type.isFunction(this.onStageChange)){this.onStageChange(e)}const t=this.getSemanticSelectorPopup();if(t.isShown()){t.close()}}onFinalStageClick(e){if(!this.isActive){return}if(this.getFailStages().length<=0){this.onStageClick(this.getSuccessStage())}else{const e=this.getSemanticSelectorPopup();e.show();const t=this.getStageById(this.currentStage);this.isActive=false;if(!t.isFinal()){const e=this.getStageById(m.id);if(e){this.addBackLightUpToStage(e.getId(),e.getColor())}}}}addBackLightUpToStage(e=null,t=null){if(!e){e=this.currentStage}const i=this.getStageById(e);if(i&&!t){t=i.getColor()}let s=!!e;this.stages.forEach((i=>{i.isFilled=s;if(i.isFilled){i.addBackLight(t?t:i.getColor())}else{i.removeBackLight()}if(!i.isFinal()&&s&&i.getId()===e){s=false}}))}getSemanticSelectorPopup(){let e=s.PopupManager.getPopupById(f);if(!e){e=s.PopupManager.create({id:f,autoHide:true,closeByEsc:true,closeIcon:true,maxWidth:420,content:i.Tag.render(c||(c=r`<div class="ui-stageflow-popup-title">${0}</div>`),this.labels.finalStagePopupTitle),buttons:[this.getSemanticPopupSuccessButton(),this.getSemanticPopupFailureButton()],events:{onClose:()=>{this.setCurrentStageId(this.currentStage);this.isActive=true}}})}return e}getSemanticPopupSuccessButton(){return new BX.UI.Button({color:BX.UI.Button.Color.SUCCESS,text:this.getSuccessStage().getName(),onclick:()=>{this.isActive=true;this.onStageClick(this.getSuccessStage())}})}getSemanticPopupFailureButton(){const e=this.getFailStageName();if(!e){return null}return new BX.UI.Button({color:BX.UI.Button.Color.DANGER,text:e,onclick:()=>{var e;(e=s.PopupManager.getPopupById(f))==null?void 0:e.close();const t=this.getFinalStageSelectorPopup();t.show();this.isActive=false}})}getFinalStageSemanticSelector(e=null){if(!this.finalStageSemanticSelector){this.finalStageSemanticSelector=i.Tag.render(h||(h=r`<div class="ui-stageflow-stage-selector-option ui-stageflow-stage-selector-option-fail" onclick="${0}"></div>`),this.onSemanticSelectorClick.bind(this))}if(i.Type.isBoolean(e)){let t=null;let i=this.getFailStageName();if(e||!i){this.finalStageSemanticSelector.classList.add("ui-stageflow-stage-selector-option-success");this.finalStageSemanticSelector.classList.remove("ui-stageflow-stage-selector-option-fail");this.finalStageSemanticSelector.innerText=this.getSuccessStage().getName();t=this.getSuccessStage()}else{this.finalStageSemanticSelector.classList.add("ui-stageflow-stage-selector-option-fail");this.finalStageSemanticSelector.classList.remove("ui-stageflow-stage-selector-option-success");this.finalStageSemanticSelector.innerText=i;t=this.getFirstFailStage()}const s=this.getFinalStage();if(s&&t){s.setColor(t.getColor()).setName(t.getName())}this.addBackLightUpToStage(s.getId(),s.getColor())}return this.finalStageSemanticSelector}getFinalStageSelectorPopup(e=false){let t=s.PopupManager.getPopupById(p);if(!t){t=s.PopupManager.create({id:p,autoHide:false,closeByEsc:true,closeIcon:true,width:420,titleBar:true,buttons:[new BX.UI.SaveButton({onclick:()=>{t.close();const e=this.getSelectedFinalStage();if(e){this.onStageClick(e)}}}),new BX.UI.CancelButton({onclick:()=>{t.close()}})],events:{onClose:()=>{this.setCurrentStageId(this.currentStage);this.isActive=true}}})}t.setContent(this.getFinalStagePopupFailStagesWrapper(e));t.setTitleBar(this.getFinalStagePopupTitleBar(e));return t}getFinalStagePopupFailStagesWrapper(e=false){const t=i.Tag.render(u||(u=r`<div class="ui-stageflow-final-fail-stage-list-wrapper"></div>`));if(e){return t}const s=this.getFailStages();if(s.length>1){s.forEach((e=>{i.Dom.append(this.getFinalStagePopupFailStage(e),t)}));this.setCheckedStageInFailStagesWrapper(t)}return t}setCheckedStageInFailStagesWrapper(e){const t=this.extractFinalStagePopupFailStages(e);if(!i.Type.isArrayFilled(t)){return}const s=t[0].querySelector("input");if(s){s.checked=true}}extractFinalStagePopupFailStages(e){var t;return(t=e.querySelectorAll(".ui-stageflow-final-fail-stage-list-section"))!=null?t:[]}getFinalStagePopupFailStage(e){return i.Tag.render(d||(d=r`
			<div class="ui-stageflow-final-fail-stage-list-section">
				<input
					data-stage-id="${0}"
					id="ui-stageflow-final-fail-stage-${0}"
					name="ui-stageflow-final-fail-stage-input"
					class="crm-list-fail-deal-button"
					type="radio"
				>
				<label for="ui-stageflow-final-fail-stage-${0}">${0}</label>
			</div>
		`),e.getId(),e.getId(),e.getId(),e.getName())}getFinalStagePopupTitleBar(e=false){const t={};t.content=i.Tag.render(S||(S=r`
			<div class="ui-stageflow-stage-selector-block">
				<span>${0}</span>
				${0}
			</div>
		`),this.labels.finalStageSelectorTitle,this.getFinalStageSemanticSelector(e));return t}onSemanticSelectorClick(){const e=this.getFailStageName();const t=s.MenuManager.create({id:"ui-stageflow-final-stage-semantic-selector",bindElement:this.getFinalStageSemanticSelector(),items:[{text:this.getSuccessStage().getName(),onclick:()=>{this.getFinalStageSelectorPopup(true);t.close()}},e?{text:e,onclick:()=>{this.getFinalStageSelectorPopup(false);t.close()}}:null]});t.show()}getSelectedFinalStage(){const e=this.getFinalStageSemanticSelector();if(e.classList.contains("ui-stageflow-stage-selector-option-success")){return this.getSuccessStage()}else{const e=this.getFailStages();if(e.length>1){const e=document.getElementById(p);if(e){const t=e.querySelector("input:checked");if(t){const e=this.getStageById(i.Text.toInteger(t.dataset.stageId));if(e){return e}}}}return this.getFirstFailStage()}}getFailStageName(){const e=this.getFailStages().length;if(e<=0){return null}else if(e===1){return this.getFirstFailStageName()}else{return this.labels.finalStagePopupFail}}getFirstFailStageName(){var e;return(e=this.getFirstFailStage())==null?void 0:e.getName()}increaseStageWidthForNameVisibility(e){if(!e.isNameCropped()){return}i.Dom.style(e.node,{flexGrow:0,flexBasis:`${e.getMinWidthForFullNameVisibility()}px`})}}const v={Chart:C,Stage:n};e.StageFlow=v})(this.BX.UI=this.BX.UI||{},BX.UI,BX,BX.Main);
//# sourceMappingURL=stageflow.bundle.map.js

Youez - 2016 - github.com/yon3zu
LinuXploit