vendor: 8,808 bytes, line 1
1"use strict";(self.webpackChunkfuse=self.webpackChunkfuse||[]).push([[4487],{4487:(k,Y,_)=>{_.d(Y,{R_:()=>g,N7:()=>Q});var P={};_.r(P),_.d(P,{JsonPatchError:()=>o,_areEquals:()=>E,applyOperation:()=>A,applyPatch:()=>L,applyReducer:()=>X,deepClone:()=>G,getValueByPointer:()=>T,validate:()=>F,validator:()=>N});var R={};_.r(R),_.d(R,{compare:()=>b,generate:()=>g,observe:()=>Q,unobserve:()=>V});var K=function(){var e=function(r,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,f){n.__proto__=f}||function(n,f){for(var a in f)f.hasOwnProperty(a)&&(n[a]=f[a])})(r,t)};return function(r,t){function n(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}}(),z=Object.prototype.hasOwnProperty;function y(e,r){return z.call(e,r)}function I(e){if(Array.isArray(e)){for(var r=new Array(e.length),t=0;t<r.length;t++)r[t]=""+t;return r}if(Object.keys)return Object.keys(e);var n=[];for(var f in e)y(e,f)&&n.push(f);return n}function h(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function m(e){for(var n,r=0,t=e.length;r<t;){if(!((n=e.charCodeAt(r))>=48&&n<=57))return!1;r++}return!0}function O(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function J(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function D(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var r=0,t=e.length;r<t;r++)if(D(e[r]))return!0}else if("object"==typeof e)for(var n=I(e),f=n.length,a=0;a<f;a++)if(D(e[n[a]]))return!0;return!1}function B(e,r){var t=[e];for(var n in r){var f="object"==typeof r[n]?JSON.stringify(r[n],null,2):r[n];typeof f<"u"&&t.push(n+": "+f)}return t.join("\n")}var H=function(e){function r(t,n,f,a,s){var i=this.constructor,l=e.call(this,B(t,{name:n,index:f,operation:a,tree:s}))||this;return l.name=n,l.index=f,l.operation=a,l.tree=s,Object.setPrototypeOf(l,i.prototype),l.message=B(t,{name:n,index:f,operation:a,tree:s}),l}return K(r,e),r}(Error),o=H,G=h,d={add:function(e,r,t){return e[r]=this.value,{newDocument:t}},remove:function(e,r,t){var n=e[r];return delete e[r],{newDocument:t,removed:n}},replace:function(e,r,t){var n=e[r];return e[r]=this.value,{newDocument:t,removed:n}},move:function(e,r,t){var n=T(t,this.path);n&&(n=h(n));var f=A(t,{op:"remove",path:this.from}).removed;return A(t,{op:"add",path:this.path,value:f}),{newDocument:t,removed:n}},copy:function(e,r,t){var n=T(t,this.from);return A(t,{op:"add",path:this.path,value:h(n)}),{newDocument:t}},test:function(e,r,t){return{newDocument:t,test:E(e[r],this.value)}},_get:function(e,r,t){return this.value=e[r],{newDocument:t}}},W={add:function(e,r,t){return m(r)?e.splice(r,0,this.value):e[r]=this.value,{newDocument:t,index:r}},remove:function(e,r,t){return{newDocument:t,removed:e.splice(r,1)[0]}},replace:function(e,r,t){var n=e[r];return e[r]=this.value,{newDocument:t,removed:n}},move:d.move,copy:d.copy,test:d.test,_get:d._get};function T(e,r){if(""==r)return e;var t={op:"_get",path:r};return A(e,t),t.value}function A(e,r,t,n,f,a){if(void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===f&&(f=!0),void 0===a&&(a=0),t&&("function"==typeof t?t(r,0,e,r.path):N(r,0)),""===r.path){var s={newDocument:e};if("add"===r.op)return s.newDocument=r.value,s;if("replace"===r.op)return s.newDocument=r.value,s.removed=e,s;if("move"===r.op||"copy"===r.op)return s.newDocument=T(e,r.from),"move"===r.op&&(s.removed=e),s;if("test"===r.op){if(s.test=E(e,r.value),!1===s.test)throw new o("Test operation failed","TEST_OPERATION_FAILED",a,r,e);return s.newDocument=e,s}if("remove"===r.op)return s.removed=e,s.newDocument=null,s;if("_get"===r.op)return r.value=e,s;if(t)throw new o("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,r,e);return s}n||(e=h(e));var l=(r.path||"").split("/"),v=e,u=1,c=l.length,w=void 0,p=void 0,U=void 0;for(U="function"==typeof t?t:N;;){if((p=l[u])&&-1!=p.indexOf("~")&&(p=J(p)),f&&("__proto__"==p||"prototype"==p&&u>0&&"constructor"==l[u-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(t&&void 0===w&&(void 0===v[p]?w=l.slice(0,u).join("/"):u==c-1&&(w=r.path),void 0!==w&&U(r,0,e,w)),u++,Array.isArray(v)){if("-"===p)p=v.length;else{if(t&&!m(p))throw new o("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,r,e);m(p)&&(p=~~p)}if(u>=c){if(t&&"add"===r.op&&p>v.length)throw new o("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,r,e);if(!1===(s=W[r.op].call(r,v,p,e)).test)throw new o("Test operation failed","TEST_OPERATION_FAILED",a,r,e);return s}}else if(u>=c){if(!1===(s=d[r.op].call(r,v,p,e)).test)throw new o("Test operation failed","TEST_OPERATION_FAILED",a,r,e);return s}if(v=v[p],t&&u<c&&(!v||"object"!=typeof v))throw new o("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,r,e)}}function L(e,r,t,n,f){if(void 0===n&&(n=!0),void 0===f&&(f=!0),t&&!Array.isArray(r))throw new o("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(e=h(e));for(var a=new Array(r.length),s=0,i=r.length;s<i;s++)a[s]=A(e,r[s],t,!0,f,s),e=a[s].newDocument;return a.newDocument=e,a}function X(e,r,t){var n=A(e,r);if(!1===n.test)throw new o("Test operation failed","TEST_OPERATION_FAILED",t,r,e);return n.newDocument}function N(e,r,t,n){if("object"!=typeof e||null===e||Array.isArray(e))throw new o("Operation is not an object","OPERATION_NOT_AN_OBJECT",r,e,t);if(!d[e.op])throw new o("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",r,e,t);if("string"!=typeof e.path)throw new o("Operation `path` property is not a string","OPERATION_PATH_INVALID",r,e,t);if(0!==e.path.indexOf("/")&&e.path.length>0)throw new o('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",r,e,t);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new o("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",r,e,t);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new o("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",r,e,t);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&D(e.value))throw new o("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",r,e,t);if(t)if("add"==e.op){var f=e.path.split("/").length,a=n.split("/").length;if(f!==a+1&&f!==a)throw new o("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",r,e,t)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==n)throw new o("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",r,e,t)}else if("move"===e.op||"copy"===e.op){var i=F([{op:"_get",path:e.from,value:void 0}],t);if(i&&"OPERATION_PATH_UNRESOLVABLE"===i.name)throw new o("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",r,e,t)}}function F(e,r,t){try{if(!Array.isArray(e))throw new o("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(r)L(h(r),h(e),t||!0);else{t=t||N;for(var n=0;n<e.length;n++)t(e[n],n,r,void 0)}}catch(f){if(f instanceof o)return f;throw f}}function E(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){var f,a,s,t=Array.isArray(e),n=Array.isArray(r);if(t&&n){if((a=e.length)!=r.length)return!1;for(f=a;0!=f--;)if(!E(e[f],r[f]))return!1;return!0}if(t!=n)return!1;var i=Object.keys(e);if((a=i.length)!==Object.keys(r).length)return!1;for(f=a;0!=f--;)if(!r.hasOwnProperty(i[f]))return!1;for(f=a;0!=f--;)if(!E(e[s=i[f]],r[s]))return!1;return!0}return e!=e&&r!=r}var S=new WeakMap,Z=function(){return function e(r){this.observers=new Map,this.obj=r}}(),$=function(){return function e(r,t){this.callback=r,this.observer=t}}();function V(e,r){r.unobserve()}function Q(e,r){var n,f=function q(e){return S.get(e)}(e);if(f){var a=function x(e,r){return e.observers.get(r)}(f,r);n=a&&a.observer}else f=new Z(e),S.set(e,f);if(n)return n;if(n={},f.value=h(e),r){n.callback=r,n.next=null;var s=function(){g(n)},i=function(){clearTimeout(n.next),n.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",i),window.addEventListener("keyup",i),window.addEventListener("mousedown",i),window.addEventListener("keydown",i),window.addEventListener("change",i
1))}return n.patches=[],n.object=e,n.unobserve=function(){g(n),clearTimeout(n.next),function j(e,r){e.observers.delete(r.callback)}(f,n),typeof window<"u"&&(window.removeEventListener("mouseup",i),window.removeEventListener("keyup",i),window.removeEventListener("mousedown",i),window.removeEventListener("keydown",i),window.removeEventListener("change",i))},f.observers.set(r,new $(r,n)),n}function g(e,r){void 0===r&&(r=!1);var t=S.get(e.object);C(t.value,e.object,e.patches,"",r),e.patches.length&&L(t.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function C(e,r,t,n,f){if(r!==e){"function"==typeof r.toJSON&&(r=r.toJSON());for(var a=I(r),s=I(e),l=!1,v=s.length-1;v>=0;v--){var c=e[u=s[v]];if(!y(r,u)||void 0===r[u]&&void 0!==c&&!1===Array.isArray(r))Array.isArray(e)===Array.isArray(r)?(f&&t.push({op:"test",path:n+"/"+O(u),value:h(c)}),t.push({op:"remove",path:n+"/"+O(u)}),l=!0):(f&&t.push({op:"test",path:n,value:e}),t.push({op:"replace",path:n,value:r}));else{var w=r[u];"object"==typeof c&&null!=c&&"object"==typeof w&&null!=w&&Array.isArray(c)===Array.isArray(w)?C(c,w,t,n+"/"+O(u),f):c!==w&&(f&&t.push({op:"test",path:n+"/"+O(u),value:h(c)}),t.push({op:"replace",path:n+"/"+O(u),value:h(w)}))}}if(l||a.length!=s.length)for(v=0;v<a.length;v++){var u;!y(e,u=a[v])&&void 0!==r[u]&&t.push({op:"add",path:n+"/"+O(u),value:h(r[u])})}}}function b(e,r,t){void 0===t&&(t=!1);var n=[];return C(e,r,n,"",t),n}Object.assign({},P,R,{JsonPatchError:H,deepClone:h,escapePathComponent:O,unescapePathComponent:J})}}]);
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.