PageSourceSearch

https://www.liveresult.ru/themes/adaptive/dist/js/npm.react-sortablejs.6e9fc83a.js

js liveresult.ru collected 2026-10-02 09:56:35 UTC 15,045 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkbehigh_build=self.webpackChunkbehigh_build||[]).push([[5750],{32559:function(e,n,t){t.r(n),t.d(n,{MultiDrag:function(){return o.MultiDrag},Sortable:function(){return o.default},Swap:function(){return o.Swap},ReactSortable:function(){return O}});var o=t(32197),r=t(23930),l=t.n(r),i=t(39156),a=t(40394),s=function(e,n){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},s(e,n)};var c=function(){return c=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},c.apply(this,arguments)};function u(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var o,r,l=t.call(e),i=[];try{for(;(void 0===n||n-- >0)&&!(o=l.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(t=l.return)&&t.call(l)}finally{if(r)throw r.error}}return i}function p(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(u(arguments[n]));return e}function d(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function f(e){e.forEach((function(e){return d(e.element)}))}function h(e){e.forEach((function(e){var n,t,o,r;n=e.parentElement,t=e.element,o=e.oldIndex,r=n.children[o]||null,n.insertBefore(t,r)}))}function m(e,n){var t=b(e),o={parentElement:e.from},r=[];switch(t){case"normal":r=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":r=[c({element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex},o),c({element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex},o)];break;case"multidrag":r=e.oldIndicies.map((function(n,t){return c({element:n.multiDragElement,oldIndex:n.index,newIndex:e.newIndicies[t].index},o)}))}var l=function(e,n){return e.map((function(e){return c(c({},e),{item:n[e.oldIndex]})})).sort((function(e,n){return e.oldIndex-n.oldIndex}))}(r,n);return l}function v(e,n){var t=p(n);return e.concat().reverse().forEach((function(e){return t.splice(e.oldIndex,1)})),t}function y(e,n){var t=p(n);return e.forEach((function(e){return t.splice(e.newIndex,0,e.item)})),t}function b(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}function g(e){e.list,e.setList,e.children,e.tag,e.style,e.className,e.clone,e.onAdd,e.onChange,e.onChoose,e.onClone,e.onEnd,e.onFilter,e.onRemove,e.onSort,e.onStart,e.onUnchoose,e.onUpdate,e.onMove,e.onSpill,e.onSelect,e.onDeselect;return function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t}(e,["list","setList","children","tag","style","className","clone","onAdd","onChange","onChoose","onClone","onEnd","onFilter","onRemove","onSort","onStart","onUnchoose","onUpdate","onMove","onSpill","onSelect","onDeselect"])}var I={dragging:null},O=function(e){function n(n){var t=e.call(this,n)||this;t.ref=(0,i.createRef)();var o=p(n.list).map((function(e){return c(c({},e),{chosen:!1,selected:!1})}));return n.setList(o,t.sortable,I),(0,a.default)(!n.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag(
1))"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n      '),t}return function(e,n){function t(){this.constructor=e}s(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}(n,e),n.prototype.componentDidMount=function(){if(null!==this.ref.current){var e=this.makeOptions();o.default.create(this.ref.current,e)}},n.prototype.render=function(){var e=this.props,n=e.tag,t={style:e.style,className:e.className,id:e.id},o=n&&null!==n?n:"div";return(0,i.createElement)(o,c({ref:this.ref},t),this.getChildren())},n.prototype.getChildren=function(){var e=this.props,n=e.children,t=e.dataIdAttr,o=e.selectedClass,r=void 0===o?"sortable-selected":o,a=e.chosenClass,s=void 0===a?"sortable-chosen":a,u=(e.dragClass,e.fallbackClass,e.ghostClass,e.swapClass,e.filter),p=void 0===u?"sortable-filter":u,d=e.list;if(!n||null==n)return null;var f=t||"data-id";return i.Children.map(n,(function(e,n){var t,o,a,u=d[n],h=e.props.className,m="string"==typeof p&&((t={})[p.replace(".","")]=!!u.filtered,t),v=l()(h,c(((o={})[r]=u.selected,o[s]=u.chosen,o),m));return(0,i.cloneElement)(e,((a={})[f]=e.key,a.className=v,a))}))},Object.defineProperty(n.prototype,"sortable",{get:function(){var e=this.ref.current;if(null===e)return null;var n=Object.keys(e).find((function(e){return e.includes("Sortable")}));return n?e[n]:null},enumerable:!0,configurable:!0}),n.prototype.makeOptions=function(){var e=this,n=g(this.props);["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((function(t){return n[t]=e.prepareOnHandlerPropAndDOM(t)})),["onChange","onClone","onFilter","onSort"].forEach((function(t){return n[t]=e.prepareOnHandlerProp(t)}));return c(c({},n),{onMove:function(n,t){var o=e.props.onMove,r=n.willInsertAfter||-1;if(!o)return r;var l=o(n,t,e.sortable,I);return void 0!==l&&l}})},n.prototype.prepareOnHandlerPropAndDOM=function(e){var n=this;return function(t){n.callOnHandlerProp(t,e),n[e](t)}},n.prototype.prepareOnHandlerProp=function(e){var n=this;return function(t){n.callOnHandlerProp(t,e)}},n.prototype.callOnHandlerProp=function(e,n){var t=this.props[n];t&&t(e,this.sortable,I)},n.prototype.onAdd=function(e){var n=this.props,t=n.list,o=n.setList,r=m(e,p(I.dragging.props.list));f(r),o(y(r,t),this.sortable,I)},n.prototype.onRemove=function(e){var n=this,t=this.props,o=t.list,r=t.setList,l=b(e),i=m(e,o);h(i);var s=p(o);if("clone"!==e.pullMode)s=v(i,s);else{var u=i;switch(l){case"multidrag":u=i.map((function(n,t){return c(c({},n),{element:e.clones[t]})}));break;case"normal":u=i.map((function(n,t){return c(c({},n),{element:e.clone})}));break;default:(0,a.default)(!0,'mode "'+l+'" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "'+l+'" plugin')}f(u),i.forEach((function(t){var o=t.oldIndex,r=n.props.clone(t.item,e);s.splice(o,1,r)}))}r(s=s.map((function(e){return c(c({},e),{selected:!1})})),this.sortable,I)},n.prototype.onUpdate=function(e){var n=this.props,t=n.list,o=n.setList,r=m(e,t);f(r),h(r);var l=function(e,n){return y(e,v(e,n))}(r,t);return o(l,this.sortable,I)},n.prototype.onStart=function(e){I.dragging=this},n.prototype.onEnd=function(e){I.dragging=null},n.prototype.onChoose=function(e){var n=this.props,t=n.list,o=n.setList,r=p(t);r[e.oldIndex].chosen=!0,o(r,this.sortable,I)},n.prototype.onUnchoose=function(e){var n=this.props,t=n.list,o=n.setList,r=p(t);r[e.oldIndex].chosen=!1,o(r,this.sortable,I)},n.prototype.onSpill=function(e){var n=this.props,t=n.removeOnSpill,o=n.revertOnSpill;t&&!o&&d(e.item)},n.prototype.onSelect=function(e){var n=this.props,t=n.list,o=n.setList,r=p(t).map((function(e){return c(c({},e),{selected:!1})}));e.newIndicies.forEach((function(e){var n=e.index;-1!==n&&(r[n].selected=!0)})),o(r,this.sortable,I)},n.prototype.onDeselect=function(e){var n=this.props,t=n.list,o=n.setList,r=p(t).map((function(e){return c(c({},e),{selected:!1})}));e.newIndicies.forEach((function(e){var n=e.index;-1!==n&&(r[n].selected=!0)})),o(r,this.sortable,I)},n.defaultProps={clone:function(e){return e}},n}(i.Component)},87350:function(e,n,t){function o(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(n,"__esModule",{value:!0});var r=t(32197),l=o(r),i=o(t(23930)),a=t(39156),s=o(t(40394)),c=function(e,n){return c=Object.
1setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},c(e,n)};var u=function(){return u=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},u.apply(this,arguments)};function p(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var o,r,l=t.call(e),i=[];try{for(;(void 0===n||n-- >0)&&!(o=l.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(t=l.return)&&t.call(l)}finally{if(r)throw r.error}}return i}function d(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(p(arguments[n]));return e}function f(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function h(e){e.forEach((function(e){return f(e.element)}))}function m(e){e.forEach((function(e){var n,t,o,r;n=e.parentElement,t=e.element,o=e.oldIndex,r=n.children[o]||null,n.insertBefore(t,r)}))}function v(e,n){var t=g(e),o={parentElement:e.from},r=[];switch(t){case"normal":r=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":r=[u({element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex},o),u({element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex},o)];break;case"multidrag":r=e.oldIndicies.map((function(n,t){return u({element:n.multiDragElement,oldIndex:n.index,newIndex:e.newIndicies[t].index},o)}))}var l=function(e,n){return e.map((function(e){return u(u({},e),{item:n[e.oldIndex]})})).sort((function(e,n){return e.oldIndex-n.oldIndex}))}(r,n);return l}function y(e,n){var t=d(n);return e.concat().reverse().forEach((function(e){return t.splice(e.oldIndex,1)})),t}function b(e,n){var t=d(n);return e.forEach((function(e){return t.splice(e.newIndex,0,e.item)})),t}function g(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}function I(e){e.list,e.setList,e.children,e.tag,e.style,e.className,e.clone,e.onAdd,e.onChange,e.onChoose,e.onClone,e.onEnd,e.onFilter,e.onRemove,e.onSort,e.onStart,e.onUnchoose,e.onUpdate,e.onMove,e.onSpill,e.onSelect,e.onDeselect;return function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t}(e,["list","setList","children","tag","style","className","clone","onAdd","onChange","onChoose","onClone","onEnd","onFilter","onRemove","onSort","onStart","onUnchoose","onUpdate","onMove","onSpill","onSelect","onDeselect"])}var O={dragging:null},w=function(e){function n(n){var t=e.call(this,n)||this;t.ref=a.createRef();var o=d(n.list).map((function(e){return u(u({},e),{chosen:!1,selected:!1})}));return n.setList(o,t.sortable,O),s(!n.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag(
1))"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n      '),t}return function(e,n){function t(){this.constructor=e}c(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}(n,e),n.prototype.componentDidMount=function(){if(null!==this.ref.current){var e=this.makeOptions();l.create(this.ref.current,e)}},n.prototype.render=function(){var e=this.props,n=e.tag,t={style:e.style,className:e.className,id:e.id},o=n&&null!==n?n:"div";return a.createElement(o,u({ref:this.ref},t),this.getChildren())},n.prototype.getChildren=function(){var e=this.props,n=e.children,t=e.dataIdAttr,o=e.selectedClass,r=void 0===o?"sortable-selected":o,l=e.chosenClass,s=void 0===l?"sortable-chosen":l,c=(e.dragClass,e.fallbackClass,e.ghostClass,e.swapClass,e.filter),p=void 0===c?"sortable-filter":c,d=e.list;if(!n||null==n)return null;var f=t||"data-id";return a.Children.map(n,(function(e,n){var t,o,l,c=d[n],h=e.props.className,m="string"==typeof p&&((t={})[p.replace(".","")]=!!c.filtered,t),v=i(h,u(((o={})[r]=c.selected,o[s]=c.chosen,o),m));return a.cloneElement(e,((l={})[f]=e.key,l.className=v,l))}))},Object.defineProperty(n.prototype,"sortable",{get:function(){var e=this.ref.current;if(null===e)return null;var n=Object.keys(e).find((function(e){return e.includes("Sortable")}));return n?e[n]:null},enumerable:!0,configurable:!0}),n.prototype.makeOptions=function(){var e=this,n=I(this.props);["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((function(t){return n[t]=e.prepareOnHandlerPropAndDOM(t)})),["onChange","onClone","onFilter","onSort"].forEach((function(t){return n[t]=e.prepareOnHandlerProp(t)}));return u(u({},n),{onMove:function(n,t){var o=e.props.onMove,r=n.willInsertAfter||-1;if(!o)return r;var l=o(n,t,e.sortable,O);return void 0!==l&&l}})},n.prototype.prepareOnHandlerPropAndDOM=function(e){var n=this;return function(t){n.callOnHandlerProp(t,e),n[e](t)}},n.prototype.prepareOnHandlerProp=function(e){var n=this;return function(t){n.callOnHandlerProp(t,e)}},n.prototype.callOnHandlerProp=function(e,n){var t=this.props[n];t&&t(e,this.sortable,O)},n.prototype.onAdd=function(e){var n=this.props,t=n.list,o=n.setList,r=v(e,d(O.dragging.props.list));h(r),o(b(r,t),this.sortable,O)},n.prototype.onRemove=function(e){var n=this,t=this.props,o=t.list,r=t.setList,l=g(e),i=v(e,o);m(i);var a=d(o);if("clone"!==e.pullMode)a=y(i,a);else{var c=i;switch(l){case"multidrag":c=i.map((function(n,t){return u(u({},n),{element:e.clones[t]})}));break;case"normal":c=i.map((function(n,t){return u(u({},n),{element:e.clone})}));break;default:s(!0,'mode "'+l+'" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "'+l+'" plugin')}h(c),i.forEach((function(t){var o=t.oldIndex,r=n.props.clone(t.item,e);a.splice(o,1,r)}))}r(a=a.map((function(e){return u(u({},e),{selected:!1})})),this.sortable,O)},n.prototype.onUpdate=function(e){var n=this.props,t=n.list,o=n.setList,r=v(e,t);h(r),m(r);var l=function(e,n){return b(e,y(e,n))}(r,t);return o(l,this.sortable,O)},n.prototype.onStart=function(e){O.dragging=this},n.prototype.onEnd=function(e){O.dragging=null},n.prototype.onChoose=function(e){var n=this.props,t=n.list,o=n.setList,r=d(t);r[e.oldIndex].chosen=!0,o(r,this.sortable,O)},n.prototype.onUnchoose=function(e){var n=this.props,t=n.list,o=n.setList,r=d(t);r[e.oldIndex].chosen=!1,o(r,this.sortable,O)},n.prototype.onSpill=function(e){var n=this.props,t=n.removeOnSpill,o=n.revertOnSpill;t&&!o&&f(e.item)},n.prototype.onSelect=function(e){var n=this.props,t=n.list,o=n.setList,r=d(t).map((function(e){return u(u({},e),{selected:!1})}));e.newIndicies.forEach((function(e){var n=e.index;-1!==n&&(r[n].selected=!0)})),o(r,this.sortable,O)},n.prototype.onDeselect=function(e){var n=this.props,t=n.list,o=n.setList,r=d(t).map((function(e){return u(u({},e),{selected:!1})}));e.newIndicies.forEach((function(e){var n=e.index;-1!==n&&(r[n].selected=!0)})),o(r,this.sortable,O)},n.defaultProps={clone:function(e){return e}},n}(a.Component);Object.defineProperty(n,"MultiDrag",{enumerable:!0,get:function(){return r.MultiDrag}}),n.Sortable=l,Object.defineProperty(n,"Swap",{enumerable:!0,get:function(){return r.Swap}}),n.ReactSortable=w}}]);

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.