2026-08-24 06:08:38 +00:00
// Module ID: 10366
// Function ID: 10367
2026-07-29 08:29:29 +00:00
// Name: getCommonVariables
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 17, 1654]
2026-07-29 08:29:29 +00:00
// Exports: horizontalStackLayout, useHorizontalStackLayout, verticalStackLayout
2026-08-24 06:08:38 +00:00
// Module 10366 (getCommonVariables)
import get _ActivityIndicator from "get ActivityIndicator" /* 17 */ ;
import noop from "noop" /* 19 */ ;
import cancelAnimation from "cancelAnimation" /* 1654 */ ;
2026-07-29 08:29:29 +00:00
2026-08-24 06:08:38 +00:00
const useMemo = noop . useMemo ;
const Dimensions = get _ActivityIndicator . Dimensions ;
2026-07-29 08:29:29 +00:00
let closure _3 = Dimensions . get ( "window" ) ;
let closure _4 = { code : "function pnpm_stackTs1(_value){const{screen,modeConfig,getCommonVariables,getCommonStyles,interpolate,Extrapolation}=this.__closure;const{showLength:showLength,snapDirection=\"left\",moveSize=screen.width,stackInterval=18,scaleInterval=0.04,opacityInterval=0.1,rotateZDeg=30}=modeConfig;const{validLength:validLength,value:value,inputRange:inputRange}=getCommonVariables({showLength:showLength,value:_value,snapDirection:snapDirection});const{zIndex:zIndex,opacity:opacity}=getCommonStyles({validLength:validLength,value:value,opacityInterval:opacityInterval,snapDirection:snapDirection});let translateX;let scale;let rotateZ;if(snapDirection===\"left\"){translateX=interpolate(value,inputRange,[-moveSize,0,validLength*stackInterval],Extrapolation.CLAMP);scale=interpolate(value,inputRange,[1,1,1-validLength*scaleInterval],Extrapolation.CLAMP);rotateZ=interpolate(value,inputRange,[-rotateZDeg,0,0],Extrapolation.CLAMP)+\"deg\";}else if(snapDirection===\"right\"){translateX=interpolate(value,inputRange,[-validLength*stackInterval,0,moveSize],Extrapolation.CLAMP);scale=interpolate(value,inputRange,[1-validLength*scaleInterval,1,1],Extrapolation.CLAMP);rotateZ=interpolate(value,inputRange,[0,0,rotateZDeg],Extrapolation.CLAMP)+\"deg\";}const transform=[{translateX:translateX},{scale:scale},{rotateZ:rotateZ}];const styles={transform:transform,zIndex:zIndex,opacity:opacity};return styles;}" } ;
let closure _5 = { code : "function pnpm_stackTs2(_value){const{screen,modeConfig,getCommonVariables,getCommonStyles,interpolate,Extrapolation}=this.__closure;const{showLength:showLength,snapDirection=\"left\",moveSize=screen.width,stackInterval=18,scaleInterval=0.04,opacityInterval=0.1,rotateZDeg=30}=modeConfig;const{validLength:validLength,value:value,inputRange:inputRange}=getCommonVariables({showLength:showLength,value:_value,snapDirection:snapDirection});const{zIndex:zIndex,opacity:opacity}=getCommonStyles({validLength:validLength,value:value,opacityInterval:opacityInterval,snapDirection:snapDirection});let translateX;let scale;let rotateZ;let translateY;if(snapDirection===\"left\"){translateX=interpolate(value,inputRange,[-moveSize,0,0],Extrapolation.CLAMP);scale=interpolate(value,inputRange,[1,1,1-validLength*scaleInterval],Extrapolation.CLAMP);rotateZ=interpolate(value,inputRange,[-rotateZDeg,0,0],Extrapolation.CLAMP)+\"deg\";translateY=interpolate(value,inputRange,[0,0,validLength*stackInterval],Extrapolation.CLAMP);}else if(snapDirection===\"right\"){translateX=interpolate(value,inputRange,[0,0,moveSize],Extrapolation.CLAMP);scale=interpolate(value,inputRange,[1-validLength*scaleInterval,1,1],Extrapolation.CLAMP);rotateZ=interpolate(value,inputRange,[0,0,rotateZDeg],Extrapolation.CLAMP)+\"deg\";translateY=interpolate(value,inputRange,[validLength*stackInterval,0,0],Extrapolation.CLAMP);}const transform=[{translateX:translateX},{scale:scale},{rotateZ:rotateZ},{translateY:translateY}];const styles={transform:transform,zIndex:zIndex,opacity:opacity};return styles;}" } ;
function getCommonVariables ( showLength ) {
( { value , snapDirection } = showLength ) ;
let rounded = Math . floor ( Math . abs ( value ) ) ;
const result = Math . abs ( value ) % 1 ;
if ( value < 0 ) {
if ( result < 0.5 ) {
let result1 = 4 * result * result * result ;
} else {
result1 = 1 - ( - 2 * result + 2 ) * * 3 / 2 ;
}
rounded = rounded + result1 ;
} else {
if ( result < 0.5 ) {
let result2 = 4 * result * result * result ;
} else {
result2 = 1 - ( - 2 * result + 2 ) * * 3 / 2 ;
}
const diff = showLength . showLength - 1 ;
const sum = rounded + result2 ;
if ( "left" === snapDirection ) {
const items = [ - 1 , 0 , diff ] ;
let items1 = items ;
} else if ( "right" !== snapDirection ) {
const _Error = Error ;
2026-08-24 06:08:38 +00:00
error = new Error ( "snapDirection must be set to either left or right" ) ;
2026-07-29 08:29:29 +00:00
throw error ;
} else {
items1 = [ - diff , 0 , 1 ] ;
}
const obj = { inputRange : null , validLength : null , value : null } ;
obj [ 0 ] = items1 ;
obj [ 1 ] = diff ;
obj [ 2 ] = sum ;
return obj ;
}
}
getCommonVariables . _ _closure = { } ;
getCommonVariables . _ _workletHash = 9545327827217 ;
getCommonVariables . _ _initData = { code : "function getCommonVariables_Pnpm_stackTs3(opts){const{showLength:showLength,value:_value,snapDirection:snapDirection}=opts;function easeInOutCubic(v){return v<0.5?4*v*v*v:1-(-2*v+2)**3/2;}const page=Math.floor(Math.abs(_value));const diff=Math.abs(_value)%1;const value=_value<0?-(page+easeInOutCubic(diff)):page+easeInOutCubic(diff);const validLength=showLength-1;let inputRange;if(snapDirection===\"left\")inputRange=[-1,0,validLength];else if(snapDirection===\"right\")inputRange=[-validLength,0,1];else throw new Error(\"snapDirection must be set to either left or right\");return{inputRange:inputRange,validLength:validLength,value:value};}" } ;
function getCommonStyles ( arg0 ) {
( { snapDirection , validLength , value , opacityInterval } = arg0 ) ;
if ( "left" === snapDirection ) {
const _Math = Math ;
2026-08-24 06:08:38 +00:00
let obj = cancelAnimation ;
2026-07-29 08:29:29 +00:00
const _Number = Number ;
const items = [ - 1.5 , - 1 , - 1 + Number . MIN _VALUE , 0 , validLength ] ;
const _Number2 = Number ;
const items1 = [ Number . MIN _VALUE , validLength , validLength , validLength - 1 , - 1 ] ;
let result = Math . floor ( 10000 * obj . interpolate ( value , items , items1 ) ) / 100 ;
const items2 = [ - 1 , 0 , validLength - 1 , validLength ] ;
const items3 = [ 0.25 , 1 , 1 - ( validLength - 1 ) * opacityInterval , 0.25 ] ;
2026-08-24 06:08:38 +00:00
let interpolateResult = cancelAnimation . interpolate ( value , items2 , items3 ) ;
const obj2 = cancelAnimation ;
2026-07-29 08:29:29 +00:00
} else if ( "right" !== snapDirection ) {
const _Error = Error ;
2026-08-24 06:08:38 +00:00
error = new Error ( "snapDirection must be set to either left or right" ) ;
2026-07-29 08:29:29 +00:00
throw error ;
} else {
const _Math2 = Math ;
const items4 = [ - validLength , 0 , , , ] ;
const _Number3 = Number ;
items4 [ 2 ] = 1 - Number . MIN _VALUE ;
items4 [ 3 ] = 1 ;
items4 [ 4 ] = 1.5 ;
const items5 = [ 1 , validLength - 1 , validLength , validLength ] ;
const _Number4 = Number ;
items5 [ 4 ] = Number . MIN _VALUE ;
2026-08-24 06:08:38 +00:00
result = Math . floor ( 10000 * cancelAnimation . interpolate ( value , items4 , items5 ) ) / 100 ;
const obj4 = cancelAnimation ;
2026-07-29 08:29:29 +00:00
const items6 = [ - validLength , 1 - validLength , 0 , 1 ] ;
const items7 = [ 0.25 , 1 - ( validLength - 1 ) * opacityInterval , 1 , 0.25 ] ;
2026-08-24 06:08:38 +00:00
interpolateResult = cancelAnimation . interpolate ( value , items6 , items7 ) ;
const obj5 = cancelAnimation ;
2026-07-29 08:29:29 +00:00
}
obj = { zIndex : Math . round ( result ) , opacity : interpolateResult } ;
return obj ;
}
2026-08-24 06:08:38 +00:00
getCommonStyles . _ _closure = { interpolate : cancelAnimation . interpolate } ;
2026-07-29 08:29:29 +00:00
getCommonStyles . _ _workletHash = 9067239849373 ;
getCommonStyles . _ _initData = { code : "function getCommonStyles_Pnpm_stackTs4(opts){const{interpolate}=this.__closure;const{snapDirection:snapDirection,validLength:validLength,value:value,opacityInterval:opacityInterval}=opts;let zIndex;let opacity;if(snapDirection===\"left\"){zIndex=Math.floor(interpolate(value,[-1.5,-1,-1+Number.MIN_VALUE,0,validLength],[Number.MIN_VALUE,validLength,validLength,validLength-1,-1])*10000)/100;opacity=interpolate(value,[-1,0,validLength-1,validLength],[0.25,1,1-(validLength-1)*opacityInterval,0.25]);}else if(snapDirection===\"right\"){zIndex=Math.floor(interpolate(value,[-validLength,0,1-Number.MIN_VALUE,1,1.5],[1,validLength-1,validLength,validLength,Number.MIN_VALUE])*10000)/100;opacity=interpolate(value,[-validLength,1-validLength,0,1],[0.25,1-(validLength-1)*opacityInterval,1,0.25]);}else{throw new Error(\"snapDirection must be set to either left or right\");}return{zIndex:Math.round(zIndex),opacity:opacity};}" } ;
export const horizontalStackLayout = function horizontalStackLayout ( ) {
let obj = arg0 ;
if ( arg0 === undefined ) {
obj = { } ;
}
const fn = function l ( value ) {
const snapDirection = obj . snapDirection ;
let str = "left" ;
if ( undefined !== snapDirection ) {
str = snapDirection ;
}
let width = tmp . moveSize ;
if ( undefined === width ) {
2026-08-24 06:08:38 +00:00
width = closure _1 _3 . width ;
2026-07-29 08:29:29 +00:00
}
const stackInterval = tmp . stackInterval ;
let num = 18 ;
if ( undefined !== stackInterval ) {
num = stackInterval ;
}
const scaleInterval = tmp . scaleInterval ;
let num2 = 0.04 ;
if ( undefined !== scaleInterval ) {
num2 = scaleInterval ;
}
const opacityInterval = tmp . opacityInterval ;
let num3 = 0.1 ;
if ( undefined !== opacityInterval ) {
num3 = opacityInterval ;
}
const rotateZDeg = tmp . rotateZDeg ;
let num4 = 30 ;
if ( undefined !== rotateZDeg ) {
num4 = rotateZDeg ;
}
obj = { showLength : obj . showLength , value , snapDirection : str } ;
2026-08-24 06:08:38 +00:00
( { validLength , value , inputRange } = closure _1 _6 ( obj ) ) ;
const tmp3 = closure _1 _6 ( obj ) ;
( { zIndex , opacity } = closure _1 _7 ( { validLength , value , opacityInterval : num3 , snapDirection : str } ) ) ;
2026-07-29 08:29:29 +00:00
if ( "left" === str ) {
const obj2 = obj ( obj [ 2 ] ) ;
const items = [ - width , 0 , validLength * num ] ;
let interpolateResult = obj2 . interpolate ( value , inputRange , items , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj3 = obj ( obj [ 2 ] ) ;
const items1 = [ 1 , 1 , 1 - validLength * num2 ] ;
let interpolateResult1 = obj3 . interpolate ( value , inputRange , items1 , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj4 = obj ( obj [ 2 ] ) ;
const items2 = [ - num4 , 0 , 0 ] ;
const _HermesInternal = HermesInternal ;
let combined = "" + obj4 . interpolate ( value , inputRange , items2 , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) + "deg" ;
} else if ( "right" === str ) {
const obj5 = obj ( obj [ 2 ] ) ;
const items3 = [ - validLength * num , 0 , width ] ;
interpolateResult = obj5 . interpolate ( value , inputRange , items3 , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj6 = obj ( obj [ 2 ] ) ;
const items4 = [ 1 - validLength * num2 , 1 , 1 ] ;
interpolateResult1 = obj6 . interpolate ( value , inputRange , items4 , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj7 = obj ( obj [ 2 ] ) ;
const items5 = [ 0 , 0 , num4 ] ;
const _HermesInternal2 = HermesInternal ;
combined = "" + obj7 . interpolate ( value , inputRange , items5 , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) + "deg" ;
}
const transform = [ { translateX : interpolateResult } , { scale : interpolateResult1 } , { rotateZ : combined } ] ;
return { transform , zIndex , opacity } ;
} ;
2026-08-15 05:55:55 +00:00
obj = { screen : closure _3 , modeConfig : obj , getCommonVariables , getCommonStyles , interpolate : obj ( 1654 ) . interpolate , Extrapolation : obj ( 1654 ) . Extrapolation } ;
2026-07-29 08:29:29 +00:00
fn . _ _closure = obj ;
fn . _ _workletHash = 13118376883684 ;
fn . _ _initData = closure _4 ;
return fn ;
} ;
export const useHorizontalStackLayout = function useHorizontalStackLayout ( ) {
let obj = arg0 ;
if ( arg0 === undefined ) {
obj = { } ;
}
obj = arg1 ;
if ( arg1 === undefined ) {
obj = { } ;
}
let items = [ obj , obj ] ;
obj = undefined ;
if ( obj === undefined ) {
obj = { } ;
}
obj = { layout : null , config : null } ;
const fn = function l ( value ) {
const snapDirection = obj . snapDirection ;
let str = "left" ;
if ( undefined !== snapDirection ) {
str = snapDirection ;
}
let width = tmp . moveSize ;
if ( undefined === width ) {
2026-08-24 06:08:38 +00:00
width = closure _1 _3 . width ;
2026-07-29 08:29:29 +00:00
}
const stackInterval = tmp . stackInterval ;
let num = 18 ;
if ( undefined !== stackInterval ) {
num = stackInterval ;
}
const scaleInterval = tmp . scaleInterval ;
let num2 = 0.04 ;
if ( undefined !== scaleInterval ) {
num2 = scaleInterval ;
}
const opacityInterval = tmp . opacityInterval ;
let num3 = 0.1 ;
if ( undefined !== opacityInterval ) {
num3 = opacityInterval ;
}
const rotateZDeg = tmp . rotateZDeg ;
let num4 = 30 ;
if ( undefined !== rotateZDeg ) {
num4 = rotateZDeg ;
}
obj = { showLength : obj . showLength , value , snapDirection : str } ;
2026-08-24 06:08:38 +00:00
( { validLength , value , inputRange } = closure _1 _6 ( obj ) ) ;
const tmp3 = closure _1 _6 ( obj ) ;
( { zIndex , opacity } = closure _1 _7 ( { validLength , value , opacityInterval : num3 , snapDirection : str } ) ) ;
2026-07-29 08:29:29 +00:00
if ( "left" === str ) {
const obj2 = obj ( obj [ 2 ] ) ;
const items = [ - width , 0 , validLength * num ] ;
let interpolateResult = obj2 . interpolate ( value , inputRange , items , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj3 = obj ( obj [ 2 ] ) ;
const items1 = [ 1 , 1 , 1 - validLength * num2 ] ;
let interpolateResult1 = obj3 . interpolate ( value , inputRange , items1 , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj4 = obj ( obj [ 2 ] ) ;
const items2 = [ - num4 , 0 , 0 ] ;
const _HermesInternal = HermesInternal ;
let combined = "" + obj4 . interpolate ( value , inputRange , items2 , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) + "deg" ;
} else if ( "right" === str ) {
const obj5 = obj ( obj [ 2 ] ) ;
const items3 = [ - validLength * num , 0 , width ] ;
interpolateResult = obj5 . interpolate ( value , inputRange , items3 , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj6 = obj ( obj [ 2 ] ) ;
const items4 = [ 1 - validLength * num2 , 1 , 1 ] ;
interpolateResult1 = obj6 . interpolate ( value , inputRange , items4 , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj7 = obj ( obj [ 2 ] ) ;
const items5 = [ 0 , 0 , num4 ] ;
const _HermesInternal2 = HermesInternal ;
combined = "" + obj7 . interpolate ( value , inputRange , items5 , obj ( obj [ 2 ] ) . Extrapolation . CLAMP ) + "deg" ;
}
const transform = [ { translateX : interpolateResult } , { scale : interpolateResult1 } , { rotateZ : combined } ] ;
return { transform , zIndex , opacity } ;
} ;
const tmp = useMemo ( ( ) => {
let str = "positive" ;
if ( "right" === obj . snapDirection ) {
str = "negative" ;
}
obj = { type : str , viewCount : obj . showLength } ;
const merged = Object . assign ( obj ) ;
return obj ;
} , items ) ;
fn . _ _closure = { screen : closure _3 , modeConfig : obj , getCommonVariables , getCommonStyles , interpolate : obj ( obj [ 2 ] ) . interpolate , Extrapolation : obj ( obj [ 2 ] ) . Extrapolation } ;
fn . _ _workletHash = 13118376883684 ;
fn . _ _initData = closure _4 ;
obj [ 0 ] = fn ;
obj [ 1 ] = tmp ;
return obj ;
} ;
export const verticalStackLayout = function verticalStackLayout ( ) {
let obj = arg0 ;
if ( arg0 === undefined ) {
obj = { } ;
}
const fn = function o ( value ) {
const snapDirection = obj . snapDirection ;
let str = "left" ;
if ( undefined !== snapDirection ) {
str = snapDirection ;
}
let width = tmp . moveSize ;
if ( undefined === width ) {
2026-08-24 06:08:38 +00:00
width = closure _1 _3 . width ;
2026-07-29 08:29:29 +00:00
}
const stackInterval = tmp . stackInterval ;
let num = 18 ;
if ( undefined !== stackInterval ) {
num = stackInterval ;
}
const scaleInterval = tmp . scaleInterval ;
let num2 = 0.04 ;
if ( undefined !== scaleInterval ) {
num2 = scaleInterval ;
}
const opacityInterval = tmp . opacityInterval ;
let num3 = 0.1 ;
if ( undefined !== opacityInterval ) {
num3 = opacityInterval ;
}
const rotateZDeg = tmp . rotateZDeg ;
let num4 = 30 ;
if ( undefined !== rotateZDeg ) {
num4 = rotateZDeg ;
}
obj = { showLength : obj . showLength , value , snapDirection : str } ;
2026-08-24 06:08:38 +00:00
( { validLength , value , inputRange } = closure _1 _6 ( obj ) ) ;
const tmp3 = closure _1 _6 ( obj ) ;
( { zIndex , opacity } = closure _1 _7 ( { validLength , value , opacityInterval : num3 , snapDirection : str } ) ) ;
2026-07-29 08:29:29 +00:00
if ( "left" === str ) {
2026-08-24 06:08:38 +00:00
const obj2 = obj ( closure _1 _1 [ 2 ] ) ;
2026-07-29 08:29:29 +00:00
const items = [ - width , 0 , 0 ] ;
2026-08-24 06:08:38 +00:00
let interpolateResult = obj2 . interpolate ( value , inputRange , items , obj ( closure _1 _1 [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj3 = obj ( closure _1 _1 [ 2 ] ) ;
2026-07-29 08:29:29 +00:00
const items1 = [ 1 , 1 , 1 - validLength * num2 ] ;
2026-08-24 06:08:38 +00:00
let interpolateResult1 = obj3 . interpolate ( value , inputRange , items1 , obj ( closure _1 _1 [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj4 = obj ( closure _1 _1 [ 2 ] ) ;
2026-07-29 08:29:29 +00:00
const items2 = [ - num4 , 0 , 0 ] ;
const _HermesInternal = HermesInternal ;
2026-08-24 06:08:38 +00:00
let combined = "" + obj4 . interpolate ( value , inputRange , items2 , obj ( closure _1 _1 [ 2 ] ) . Extrapolation . CLAMP ) + "deg" ;
const obj5 = obj ( closure _1 _1 [ 2 ] ) ;
2026-07-29 08:29:29 +00:00
const items3 = [ 0 , 0 , validLength * num ] ;
2026-08-24 06:08:38 +00:00
let interpolateResult2 = obj5 . interpolate ( value , inputRange , items3 , obj ( closure _1 _1 [ 2 ] ) . Extrapolation . CLAMP ) ;
2026-07-29 08:29:29 +00:00
} else if ( "right" === str ) {
2026-08-24 06:08:38 +00:00
const obj6 = obj ( closure _1 _1 [ 2 ] ) ;
2026-07-29 08:29:29 +00:00
const items4 = [ 0 , 0 , width ] ;
2026-08-24 06:08:38 +00:00
interpolateResult = obj6 . interpolate ( value , inputRange , items4 , obj ( closure _1 _1 [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj7 = obj ( closure _1 _1 [ 2 ] ) ;
2026-07-29 08:29:29 +00:00
const items5 = [ 1 - validLength * num2 , 1 , 1 ] ;
2026-08-24 06:08:38 +00:00
interpolateResult1 = obj7 . interpolate ( value , inputRange , items5 , obj ( closure _1 _1 [ 2 ] ) . Extrapolation . CLAMP ) ;
const obj8 = obj ( closure _1 _1 [ 2 ] ) ;
2026-07-29 08:29:29 +00:00
const items6 = [ 0 , 0 , num4 ] ;
const _HermesInternal2 = HermesInternal ;
2026-08-24 06:08:38 +00:00
combined = "" + obj8 . interpolate ( value , inputRange , items6 , obj ( closure _1 _1 [ 2 ] ) . Extrapolation . CLAMP ) + "deg" ;
const obj9 = obj ( closure _1 _1 [ 2 ] ) ;
2026-07-29 08:29:29 +00:00
const items7 = [ validLength * num , 0 , 0 ] ;
2026-08-24 06:08:38 +00:00
interpolateResult2 = obj9 . interpolate ( value , inputRange , items7 , obj ( closure _1 _1 [ 2 ] ) . Extrapolation . CLAMP ) ;
2026-07-29 08:29:29 +00:00
}
const transform = [ { translateX : interpolateResult } , { scale : interpolateResult1 } , { rotateZ : combined } , { translateY : interpolateResult2 } ] ;
return { transform , zIndex , opacity } ;
} ;
2026-08-15 05:55:55 +00:00
obj = { screen : closure _3 , modeConfig : obj , getCommonVariables , getCommonStyles , interpolate : obj ( 1654 ) . interpolate , Extrapolation : obj ( 1654 ) . Extrapolation } ;
2026-07-29 08:29:29 +00:00
fn . _ _closure = obj ;
fn . _ _workletHash = 9752649608963 ;
fn . _ _initData = closure _5 ;
return fn ;
} ;