305 lines
9.1 KiB
JavaScript
305 lines
9.1 KiB
JavaScript
// Metro module 1643 (f1644).
|
|
import * as _Module1609 from "./Module1609";
|
|
import * as _Module1644 from "./Module1644";
|
|
import { makeShareableCloneRecursive } from "./freezeObjectInDev";
|
|
import { executeOnUIRuntimeSync, runOnUI } from "./runWorkletOnJS";
|
|
import { ReanimatedError } from "./Module1617";
|
|
import { shareableMappingCache } from "./Module1637";
|
|
function $mk102392($env) {
|
|
return () => $env[0].value;
|
|
}
|
|
function $mk102393($env) {
|
|
return (a0) => {
|
|
const r1 = $env;
|
|
if (typeof a0 === "function" && !a0.__isAnimationDefinition) {
|
|
const r4 = r1[0];
|
|
r4.value = a0(r4.value);
|
|
} else {
|
|
r1[0].value = a0;
|
|
}
|
|
};
|
|
}
|
|
let addCompilerSafeGetAndSet, hideInternalValueProp, makeMutableUI, __initData, __initData2, __initData3, __initData4;
|
|
const shouldBeUseWeb = _Module1609.shouldBeUseWeb();
|
|
const isJest = _Module1609.isJest();
|
|
const addCompilerSafeGetAndSet2 = function addCompilerSafeGetAndSet(a0) {
|
|
let env24487;
|
|
const r6 = env24487 = {};
|
|
env24487[0] = a0;
|
|
Object.defineProperties(a0, {
|
|
get: {
|
|
value: $mk102392(r6),
|
|
configurable: false,
|
|
enumerable: false
|
|
},
|
|
set: {
|
|
value: $mk102393(r6),
|
|
configurable: false,
|
|
enumerable: false
|
|
}
|
|
});
|
|
};
|
|
addCompilerSafeGetAndSet2.__closure = {};
|
|
addCompilerSafeGetAndSet2.__workletHash = 14094096506039;
|
|
addCompilerSafeGetAndSet2.__initData = {
|
|
code: "function addCompilerSafeGetAndSet_Pnpm_mutablesTs1(mutable){Object.defineProperties(mutable,{get:{value:function(){return mutable.value;},configurable:false,enumerable:false},set:{value:function(newValue){if(typeof newValue==='function'&&!newValue.__isAnimationDefinition){mutable.value=newValue(mutable.value);}else{mutable.value=newValue;}},configurable:false,enumerable:false}});}"
|
|
};
|
|
addCompilerSafeGetAndSet = addCompilerSafeGetAndSet2;
|
|
const hideInternalValueProp2 = function hideInternalValueProp(a0) {
|
|
Object.defineProperty(a0, "_value", {
|
|
configurable: false,
|
|
enumerable: false
|
|
});
|
|
};
|
|
hideInternalValueProp2.__closure = {};
|
|
hideInternalValueProp2.__workletHash = 3380393180484;
|
|
hideInternalValueProp2.__initData = {
|
|
code: "function hideInternalValueProp_Pnpm_mutablesTs2(mutable){Object.defineProperty(mutable,'_value',{configurable:false,enumerable:false});}"
|
|
};
|
|
hideInternalValueProp = hideInternalValueProp2;
|
|
const makeMutableUI2 = function makeMutableUI(c24488_1) {
|
|
let c24488_2;
|
|
let c24488_0 = new Map();
|
|
const r15 = {};
|
|
Object.defineProperty(r15, "value", {
|
|
get: function() {
|
|
return c24488_1;
|
|
},
|
|
set: function(a0) {
|
|
_Module1644.valueSetter(c24488_2, a0);
|
|
},
|
|
enumerable: true,
|
|
configurable: true
|
|
});
|
|
Object.defineProperty(r15, "_value", {
|
|
get: function() {
|
|
return c24488_1;
|
|
},
|
|
set: function(a0) {
|
|
c24488_1 = a0;
|
|
c24488_0.forEach((item) => {
|
|
item(a0);
|
|
});
|
|
},
|
|
enumerable: true,
|
|
configurable: true
|
|
});
|
|
r15.modify = function modify(a0, r6 = true) {
|
|
_Module1644.valueSetter(c24488_2, a0 !== void 0 ? a0(c24488_1) : c24488_1, r6);
|
|
};
|
|
r15.addListener = (a0, a1) => {
|
|
c24488_0.set(a0, a1);
|
|
};
|
|
r15.removeListener = (a0) => {
|
|
c24488_0.delete(a0);
|
|
};
|
|
r15._animation = null;
|
|
r15._isReanimatedSharedValue = true;
|
|
c24488_2 = r15;
|
|
Object.defineProperty(r15, "_value", {
|
|
configurable: false,
|
|
enumerable: false
|
|
});
|
|
let env24489;
|
|
const r33 = env24489 = {};
|
|
env24489[0] = r15;
|
|
Object.defineProperties(r15, {
|
|
get: {
|
|
value: $mk102392(r33),
|
|
configurable: false,
|
|
enumerable: false
|
|
},
|
|
set: {
|
|
value: $mk102393(r33),
|
|
configurable: false,
|
|
enumerable: false
|
|
}
|
|
});
|
|
return r15;
|
|
};
|
|
makeMutableUI2.__closure = {
|
|
valueSetter: _Module1644.valueSetter,
|
|
hideInternalValueProp,
|
|
addCompilerSafeGetAndSet
|
|
};
|
|
makeMutableUI2.__workletHash = 8132940328790;
|
|
makeMutableUI2.__initData = {
|
|
code: "function makeMutableUI_Pnpm_mutablesTs3(initial){const{valueSetter,hideInternalValueProp,addCompilerSafeGetAndSet}=this.__closure;const listeners=new Map();let value=initial;const mutable={get value(){return value;},set value(newValue){valueSetter(mutable,newValue);},get _value(){return value;},set _value(newValue){value=newValue;listeners.forEach(function(listener){listener(newValue);});},modify:function(modifier,forceUpdate=true){valueSetter(mutable,modifier!==undefined?modifier(value):value,forceUpdate);},addListener:function(id,listener){listeners.set(id,listener);},removeListener:function(id){listeners.delete(id);},_animation:null,_isReanimatedSharedValue:true};hideInternalValueProp(mutable);addCompilerSafeGetAndSet(mutable);return mutable;}"
|
|
};
|
|
makeMutableUI = makeMutableUI2;
|
|
__initData = {
|
|
code: "function pnpm_mutablesTs4(){const{makeMutableUI,initial}=this.__closure;return makeMutableUI(initial);}"
|
|
};
|
|
__initData2 = {
|
|
code: "function pnpm_mutablesTs5(sv){return sv.value;}"
|
|
};
|
|
__initData3 = {
|
|
code: "function pnpm_mutablesTs6(){const{mutable,newValue}=this.__closure;mutable.value=newValue;}"
|
|
};
|
|
__initData4 = {
|
|
code: "function pnpm_mutablesTs7(){const{mutable,modifier,forceUpdate}=this.__closure;mutable.modify(modifier,forceUpdate);}"
|
|
};
|
|
const r38 = shouldBeUseWeb ? function makeMutableWeb(c13144_0) {
|
|
let c13144_2;
|
|
let c13144_1 = new Map();
|
|
const r17 = {};
|
|
Object.defineProperty(r17, "value", {
|
|
get: function() {
|
|
return c13144_0;
|
|
},
|
|
set: function(a0) {
|
|
_Module1644.valueSetter(c13144_2, a0);
|
|
},
|
|
enumerable: true,
|
|
configurable: true
|
|
});
|
|
Object.defineProperty(r17, "_value", {
|
|
get: function() {
|
|
return c13144_0;
|
|
},
|
|
set: function(a0) {
|
|
c13144_0 = a0;
|
|
c13144_1.forEach((item) => {
|
|
item(a0);
|
|
});
|
|
},
|
|
enumerable: true,
|
|
configurable: true
|
|
});
|
|
r17.modify = function modify(a0, r6 = true) {
|
|
_Module1644.valueSetter(c13144_2, a0 !== void 0 ? a0(c13144_2.value) : c13144_2.value, r6);
|
|
};
|
|
r17.addListener = (a0, a1) => {
|
|
c13144_1.set(a0, a1);
|
|
};
|
|
r17.removeListener = (a0) => {
|
|
c13144_1.delete(a0);
|
|
};
|
|
r17._isReanimatedSharedValue = true;
|
|
c13144_2 = r17;
|
|
Object.defineProperty(r17, "_value", {
|
|
configurable: false,
|
|
enumerable: false
|
|
});
|
|
let env13145;
|
|
const r33 = env13145 = {};
|
|
env13145[0] = r17;
|
|
Object.defineProperties(r17, {
|
|
get: {
|
|
value: $mk102392(r33),
|
|
configurable: false,
|
|
enumerable: false
|
|
},
|
|
set: {
|
|
value: $mk102393(r33),
|
|
configurable: false,
|
|
enumerable: false
|
|
}
|
|
});
|
|
if (isJest) {
|
|
r17.toJSON = () => JSON.stringify(c13144_0);
|
|
}
|
|
return r17;
|
|
} : function makeMutableNative(a0) {
|
|
let mutable;
|
|
let c13146_0 = a0;
|
|
const __init = function n() {
|
|
return makeMutableUI(c13146_0);
|
|
};
|
|
__init.__closure = {
|
|
makeMutableUI,
|
|
initial: a0
|
|
};
|
|
__init.__workletHash = 38746935544;
|
|
__init.__initData = __initData;
|
|
const r19 = makeShareableCloneRecursive({
|
|
__init
|
|
});
|
|
const r20 = {};
|
|
Object.defineProperty(r20, "value", {
|
|
get: function() {
|
|
const t = function t(a0) {
|
|
return a0.value;
|
|
};
|
|
t.__closure = {};
|
|
t.__workletHash = 5375306386445;
|
|
t.__initData = __initData2;
|
|
return executeOnUIRuntimeSync(t)(mutable);
|
|
},
|
|
set: function(a0) {
|
|
const value2 = a0;
|
|
const r12 = function n() {
|
|
mutable.value = value2;
|
|
};
|
|
r12.__closure = {
|
|
mutable,
|
|
newValue: a0
|
|
};
|
|
r12.__workletHash = 11269088169577;
|
|
r12.__initData = __initData3;
|
|
runOnUI(r12)();
|
|
},
|
|
enumerable: true,
|
|
configurable: true
|
|
});
|
|
Object.defineProperty(r20, "_value", {
|
|
get: function() {
|
|
throw new ReanimatedError("Reading from `_value` directly is only possible on the UI runtime. Perhaps you passed an Animated Style to a non-animated component?");
|
|
},
|
|
set: function(a0) {
|
|
throw new ReanimatedError("Setting `_value` directly is only possible on the UI runtime. Perhaps you want to assign to `value` instead?");
|
|
},
|
|
enumerable: true,
|
|
configurable: true
|
|
});
|
|
r20.modify = function modify(a0) {
|
|
let forceUpdate = arguments[1];
|
|
if (forceUpdate === void 0) {
|
|
forceUpdate = true;
|
|
}
|
|
let c24492_1 = forceUpdate;
|
|
const u = function u() {
|
|
mutable.modify(a0, c24492_1);
|
|
};
|
|
u.__closure = {
|
|
mutable,
|
|
modifier: a0,
|
|
forceUpdate
|
|
};
|
|
u.__workletHash = 15983399508815;
|
|
u.__initData = __initData4;
|
|
runOnUI(u)();
|
|
};
|
|
r20.addListener = () => {
|
|
throw new ReanimatedError("Adding listeners is only possible on the UI runtime.");
|
|
};
|
|
r20.removeListener = () => {
|
|
throw new ReanimatedError("Removing listeners is only possible on the UI runtime.");
|
|
};
|
|
r20._isReanimatedSharedValue = true;
|
|
mutable = r20;
|
|
Object.defineProperty(mutable, "_value", {
|
|
configurable: false,
|
|
enumerable: false
|
|
});
|
|
let env13147;
|
|
const r40 = env13147 = {};
|
|
env13147[0] = mutable;
|
|
Object.defineProperties(mutable, {
|
|
get: {
|
|
value: $mk102392(r40),
|
|
configurable: false,
|
|
enumerable: false
|
|
},
|
|
set: {
|
|
value: $mk102393(r40),
|
|
configurable: false,
|
|
enumerable: false
|
|
}
|
|
});
|
|
shareableMappingCache.set(mutable, r19);
|
|
return mutable;
|
|
};
|
|
export { makeMutableUI };
|
|
export { r38 as makeMutable };
|