@cleartrip/ct-platform-supercoins-chip 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"SupercoinsChip.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AActE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAa7D,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsMjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"SupercoinsChip.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AActE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAa7D,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyMjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),n=require("react/jsx-runtime"),r=require("react"),o=require("@cleartrip/ct-design-typography"),i=require("@cleartrip/ct-platform-shimmer"),t=require("@cleartrip/ct-platform-utils");function a(e){return e&&e.__esModule?e:{default:e}}var s=a(r);var c="index-module_supercoinsBalance__w9srh",l="index-module_superCoinsFloatingIslandContainer__5FNNa",u="index-module_supercoinsBalanceBackgroundColorShift__r6YWa",d="index-module_supercoinsBalanceTextColorShift__y7vva",_="index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",f="index-module_supercoinsBalanceTextColorShift_exit__JKt90";!function(e,n){void 0===n&&(n={});var r=n.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===r&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_supercoin_chip_loading_shimmer__0jquY .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_supercoin_chip_loading_shimmer__0jquY{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:rgba(0,62,162,0)}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var m="island_rendered_frquency",p="islandAnimationPlayed",g="island_expiration_frquency",x={requiredSupercoins:50,frequency:1,frequencyGapInDays:30,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function h(e){var n,r=e.renderFloatingIsland,o=e.supercoins;if(!r)return!1;if(o<x.requiredSupercoins)return!1;if(!("true"===t.getQueryParam("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(m);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=x.frequency){var i=(n=localStorage.getItem(g))&&"number"==typeof parseInt(n)?parseInt(n):null;return!i||!(i>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(m),localStorage.removeItem(g),!0)}return!sessionStorage.getItem(p)}function v(){var e=localStorage.getItem(m);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(m,n.toString()),n>=x.frequency){var r=Math.floor(Date.now()/1e3)+86400*x.frequencyGapInDays;localStorage.setItem(g,r.toString())}}var y=s.default.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))}));exports.SupercoinsChip=function(a){var s=a.supercoinsLoading,m=a.supercoinBurnBalance,g=a.ravenPayload,b=void 0===g?{}:g,S=a.onSupercoinsClick,k=a.renderFloatingIsland,I=void 0===k||k,w=r.useMemo((function(){var e;return null!==(e=t.getQueryParam("utm_source"))&&void 0!==e?e:"organic"}),[]),B=r.useMemo((function(){return"number"==typeof m&&m>=0&&!s}),[m,s]),C=r.useState(!1),q=C[0],j=C[1],T=r.useState(null),N=T[0],F=T[1],E=r.useState(!1),A=E[0],M=E[1],H="entry"===N?u:"exit"===N?_:"",P="entry"===N?d:"exit"===N?f:"";return r.useEffect((function(){var e=function(){window.scrollY>0&&(sessionStorage.getItem(p)||(M(!0),F(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),r.useEffect((function(){var e,n=h({renderFloatingIsland:I,supercoins:m});return n&&sessionStorage.setItem("disable_floater","true"),n&&!A&&(F("entry"),e=setTimeout((function(){j(!0)}),1500)),function(){clearTimeout(e)}}),[m]),r.useEffect((function(){if(I&&q){var e=setTimeout((function(){sessionStorage.getItem(p)||(j(!1),F("exit"))}),x.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),n.jsx(n.Fragment,{children:s?n.jsx("div",e.__assign({className:c},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx(i.Shimmer,{width:18,height:18,type:"rounded"}),n.jsx(i.Shimmer,{width:44,height:18,type:"rounded"})]}))})):B?n.jsxs("div",e.__assign({style:{position:"relative"}},{children:[n.jsx("div",e.__assign({className:"".concat(c," ").concat(H),onClick:function(){S&&"function"==typeof S&&S(),t.ravenSDKTrigger("u_ui_action",e.__assign({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:m,u_utm_source:w},b))}},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx("img",{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",alt:"supercoin_icon",width:18,height:18}),n.jsx(o.Typography,e.__assign({variant:"B2",style:{lineHeight:"18px"},className:P},{children:m}))]}))})),q&&!A&&n.jsx("div",e.__assign({className:l},{children:n.jsx(r.Suspense,e.__assign({fallback:n.jsx(n.Fragment,{})},{children:n.jsx(y,{superCoins:m,onAnimationStart:function(){return function(n){var r=n.supercoins,o=n.ravenPayload,i=n.utmSource,a=void 0===i?"":i;t.ravenSDKTrigger("u_impression",e.__assign({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:r,u_utm_source:a},o)),sessionStorage.setItem("islandAnimationPlayed","true"),v()}({supercoins:m,ravenPayload:b,utmSource:w})},onAnimationEnd:function(){F("exit")}})}))}))]})):null})};
1
+ "use strict";var e=require("tslib"),n=require("react/jsx-runtime"),r=require("react"),o=require("@cleartrip/ct-design-typography"),i=require("@cleartrip/ct-platform-shimmer"),t=require("@cleartrip/ct-platform-utils");function a(e){return e&&e.__esModule?e:{default:e}}var s=a(r);var c="index-module_supercoinsBalance__w9srh",l="index-module_superCoinsFloatingIslandContainer__5FNNa",u="index-module_supercoinsBalanceBackgroundColorShift__r6YWa",_="index-module_supercoinsBalanceTextColorShift__y7vva",d="index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",m="index-module_supercoinsBalanceTextColorShift_exit__JKt90";!function(e,n){void 0===n&&(n={});var r=n.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===r&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_supercoin_chip_loading_shimmer__0jquY .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_supercoin_chip_loading_shimmer__0jquY{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:rgba(0,62,162,0)}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var f="island_rendered_frquency",p="islandAnimationPlayed",g="island_expiration_frquency",x={requiredSupercoins:50,frequency:3,frequencyGapInDays:15,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function h(e){var n,r=e.renderFloatingIsland,o=e.supercoins;if(!r)return!1;if(o<x.requiredSupercoins)return!1;if(!("true"===t.getQueryParam("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(f);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=x.frequency){var i=(n=localStorage.getItem(g))&&"number"==typeof parseInt(n)?parseInt(n):null;return!i||!(i>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(f),localStorage.removeItem(g),!0)}return!sessionStorage.getItem(p)}function v(){var e=localStorage.getItem(f);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(f,n.toString()),n>=x.frequency){var r=Math.floor(Date.now()/1e3)+86400*x.frequencyGapInDays;localStorage.setItem(g,r.toString())}}var y=s.default.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))}));exports.SupercoinsChip=function(a){var s=a.supercoinsLoading,f=a.supercoinBurnBalance,g=a.ravenPayload,b=void 0===g?{}:g,S=a.onSupercoinsClick,k=a.renderFloatingIsland,I=void 0===k||k,w=r.useMemo((function(){var e;return null!==(e=t.getQueryParam("utm_source"))&&void 0!==e?e:"organic"}),[]),B=r.useMemo((function(){return"number"==typeof f&&f>=0&&!s}),[f,s]),C=r.useState(!1),q=C[0],j=C[1],T=r.useState(null),N=T[0],F=T[1],E=r.useState(!1),A=E[0],M=E[1],H="entry"===N?u:"exit"===N?d:"",P="entry"===N?_:"exit"===N?m:"";return r.useEffect((function(){var e=function(){window.scrollY>0&&(sessionStorage.getItem(p)||(M(!0),F(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),r.useEffect((function(){var e,n=h({renderFloatingIsland:I,supercoins:f});return n&&sessionStorage.setItem("disable_floater","true"),n&&!A&&(F("entry"),e=setTimeout((function(){j(!0)}),1500)),function(){clearTimeout(e)}}),[f]),r.useEffect((function(){if(I&&q){var e=setTimeout((function(){sessionStorage.getItem(p)||(j(!1),F("exit"))}),x.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),n.jsx(n.Fragment,{children:s?n.jsx("div",e.__assign({className:c},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx(i.Shimmer,{width:18,height:18,type:"rounded"}),n.jsx(i.Shimmer,{width:44,height:18,type:"rounded"})]}))})):B?n.jsxs("div",e.__assign({style:{position:"relative"}},{children:[n.jsx("div",e.__assign({className:"".concat(c," ").concat(H),onClick:function(){var n;S&&"function"==typeof S&&S();var r=b.action_event_name;b.impression_event_name;var o=e.__rest(b,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(n=r)&&void 0!==n?n:"u_ui_action",e.__assign({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:f,u_utm_source:w},o))}},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx("img",{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",alt:"supercoin_icon",width:18,height:18}),n.jsx(o.Typography,e.__assign({variant:"B2",style:{lineHeight:"18px"},className:P},{children:f}))]}))})),q&&!A&&n.jsx("div",e.__assign({className:l},{children:n.jsx(r.Suspense,e.__assign({fallback:n.jsx(n.Fragment,{})},{children:n.jsx(y,{superCoins:f,onAnimationStart:function(){return function(n){var r,o=n.supercoins,i=n.ravenPayload,a=void 0===i?{}:i,s=n.utmSource,c=void 0===s?"":s;a.action_event_name;var l=a.impression_event_name,u=e.__rest(a,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(r=l)&&void 0!==r?r:"u_impression",e.__assign({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:o,u_utm_source:c},u)),sessionStorage.setItem("islandAnimationPlayed","true"),v()}({supercoins:f,ravenPayload:b,utmSource:w})},onAnimationEnd:function(){F("exit")}})}))}))]})):null})};
2
2
  //# sourceMappingURL=ct-platform-supercoins-chip.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ct-platform-supercoins-chip.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","supercoinsLoading","supercoinBurnBalance","_b","ravenPayload","onSupercoinsClick","_c","utmSource","useMemo","shouldRenderSupercoins","_d","useState","renderSuperCoinIsland","setRenderSuperCoinIsland","_e","chipAnimationType","setChipAnimationType","_f","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","chipBackgroundAnimationClassname","styles","chipTextAnimationClassname","useEffect","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","setTimeout","clearTimeout","_jsx","_Fragment","children","jsx","__assign","className","_jsxs","jsxs","display","alignItems","gap","Shimmer","width","height","position","concat","onClick","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","src","alt","Typography","variant","lineHeight","Suspense","fallback","Fragment","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"snBAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,s1DCzBO,IAGMe,EAAsC,2BAEtCC,EAAoC,wBAEpCC,EACT,6BAISC,EAAmC,CAC5CC,mBAAoB,GACpBC,UAAW,EACXC,mBAAoB,GACpBC,eAAgB,IAChBC,mBAAmB,GCIC,SAAAC,EAA2BC,OALz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,OACnCG,EAAUH,EAAAG,WACV4B,EAAY/B,EAAA+B,aACZD,cAAAI,OAAY,IAAAJ,EAAA,GAAEA,EAGd+C,EAAAA,gBAAgB,eACZb,EAAAA,SAAA,CAAAc,YAAa,8BACbC,UAAW,mBACXC,kBAAmB7E,EACnB8E,aAAc/C,GACXH,IAIPhB,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CCsJwC4E,CAAuB,CACnBzF,WACI0B,EACJE,aAAYA,EACZG,UAASA,GACX,EAEN2D,eAnJhC,WACIlD,EAAqB,OACxB,cAuJW,MAGhB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ct-platform-supercoins-chip.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","supercoinsLoading","supercoinBurnBalance","_b","ravenPayload","onSupercoinsClick","_c","utmSource","useMemo","shouldRenderSupercoins","_d","useState","renderSuperCoinIsland","setRenderSuperCoinIsland","_e","chipAnimationType","setChipAnimationType","_f","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","chipBackgroundAnimationClassname","styles","chipTextAnimationClassname","useEffect","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","setTimeout","clearTimeout","_jsx","_Fragment","children","jsx","__assign","className","_jsxs","jsxs","display","alignItems","gap","Shimmer","width","height","position","concat","onClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","src","alt","Typography","variant","lineHeight","Suspense","fallback","Fragment","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"snBAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,s1DCzBO,IAGMe,EAAsC,2BAEtCC,EAAoC,wBAEpCC,EACT,6BAISC,EAAmC,CAC5CC,mBA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AWjB,GAAwC,CAAAc,SAEnDF,EAAAA,IAAC+B,EAAAA,SAAS3B,EAAAA,SAAA,CAAA4B,SAAUhC,EAAKG,IAAAF,EAAAgC,SAAA,CAAA,IAAA,CAAA/B,SACrBF,EAAAA,IAACxC,GACG0E,WAAYjE,EACZkE,iBAAkB,WACd,OD5KlC,SAAiC/F,SACnCG,EAAUH,EAAAG,WACV8B,EAAiBjC,EAAA+B,aAAjBA,OAAe,IAAAE,EAAA,CAAE,EAAAA,EACjBI,EAAcrC,EAAAkC,UAAdA,OAAS,IAAAG,EAAG,GAAEA,EAKVN,EADqB8C,sBAAEC,EACvB/C,EAD4C+C,sBAAKC,EACjDC,EAAAA,OAAAjD,EADE,CAAA,oBAAA,0BAENkD,kBAAqD,QAApCnD,EAAAgD,SAAoC,IAAAhD,EAAAA,EAAA,2BACjDoD,YAAa,8BACbC,UAAW,mBACXC,kBAAmBjF,EACnBkF,aAAcnD,GACX6C,IAIPhE,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CCsJwCgF,CAAuB,CACnB7F,WACI0B,EACJE,aAAYA,EACZG,UAASA,GACX,EAEN+D,eAtJhC,WACItD,EAAqB,OACxB,cA0JW,MAGhB","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as n,Fragment as o,jsxs as r}from"react/jsx-runtime";import i,{useMemo as t,useState as a,useEffect as l,Suspense as c}from"react";import{Typography as s}from"@cleartrip/ct-design-typography";import{Shimmer as u}from"@cleartrip/ct-platform-shimmer";import{getQueryParam as d,ravenSDKTrigger as _}from"@cleartrip/ct-platform-utils";var m="index-module_supercoinsBalance__w9srh",f="index-module_superCoinsFloatingIslandContainer__5FNNa",p="index-module_supercoinsBalanceBackgroundColorShift__r6YWa",g="index-module_supercoinsBalanceTextColorShift__y7vva",h="index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",x="index-module_supercoinsBalanceTextColorShift_exit__JKt90";!function(e,n){void 0===n&&(n={});var o=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_supercoin_chip_loading_shimmer__0jquY .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_supercoin_chip_loading_shimmer__0jquY{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:rgba(0,62,162,0)}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var v="island_rendered_frquency",y="islandAnimationPlayed",b="island_expiration_frquency",S={requiredSupercoins:50,frequency:1,frequencyGapInDays:30,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function k(e){var n,o=e.renderFloatingIsland,r=e.supercoins;if(!o)return!1;if(r<S.requiredSupercoins)return!1;if(!("true"===d("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(v);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=S.frequency){var i=(n=localStorage.getItem(b))&&"number"==typeof parseInt(n)?parseInt(n):null;return!i||!(i>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(v),localStorage.removeItem(b),!0)}return!sessionStorage.getItem(y)}function I(){var e=localStorage.getItem(v);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(v,n.toString()),n>=S.frequency){var o=Math.floor(Date.now()/1e3)+86400*S.frequencyGapInDays;localStorage.setItem(b,o.toString())}}var w=i.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))})),B=function(i){var v=i.supercoinsLoading,b=i.supercoinBurnBalance,B=i.ravenPayload,C=void 0===B?{}:B,q=i.onSupercoinsClick,T=i.renderFloatingIsland,N=void 0===T||T,F=t((function(){var e;return null!==(e=d("utm_source"))&&void 0!==e?e:"organic"}),[]),A=t((function(){return"number"==typeof b&&b>=0&&!v}),[b,v]),E=a(!1),H=E[0],U=E[1],Y=a(null),M=Y[0],P=Y[1],D=a(!1),J=D[0],j=D[1],L="entry"===M?p:"exit"===M?h:"",V="entry"===M?g:"exit"===M?x:"";return l((function(){var e=function(){window.scrollY>0&&(sessionStorage.getItem(y)||(j(!0),P(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),l((function(){var e,n=k({renderFloatingIsland:N,supercoins:b});return n&&sessionStorage.setItem("disable_floater","true"),n&&!J&&(P("entry"),e=setTimeout((function(){U(!0)}),1500)),function(){clearTimeout(e)}}),[b]),l((function(){if(N&&H){var e=setTimeout((function(){sessionStorage.getItem(y)||(U(!1),P("exit"))}),S.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),n(o,{children:v?n("div",e({className:m},{children:r("div",e({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n(u,{width:18,height:18,type:"rounded"}),n(u,{width:44,height:18,type:"rounded"})]}))})):A?r("div",e({style:{position:"relative"}},{children:[n("div",e({className:"".concat(m," ").concat(L),onClick:function(){q&&"function"==typeof q&&q(),_("u_ui_action",e({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:b,u_utm_source:F},C))}},{children:r("div",e({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n("img",{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",alt:"supercoin_icon",width:18,height:18}),n(s,e({variant:"B2",style:{lineHeight:"18px"},className:V},{children:b}))]}))})),H&&!J&&n("div",e({className:f},{children:n(c,e({fallback:n(o,{})},{children:n(w,{superCoins:b,onAnimationStart:function(){return function(n){var o=n.supercoins,r=n.ravenPayload,i=n.utmSource;_("u_impression",e({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:o,u_utm_source:void 0===i?"":i},r)),sessionStorage.setItem("islandAnimationPlayed","true"),I()}({supercoins:b,ravenPayload:C,utmSource:F})},onAnimationEnd:function(){P("exit")}})}))}))]})):null})};export{B as SupercoinsChip};
1
+ import{__rest as e,__assign as n}from"tslib";import{jsx as o,Fragment as r,jsxs as i}from"react/jsx-runtime";import t,{useMemo as a,useState as s,useEffect as l,Suspense as c}from"react";import{Typography as u}from"@cleartrip/ct-design-typography";import{Shimmer as d}from"@cleartrip/ct-platform-shimmer";import{getQueryParam as _,ravenSDKTrigger as m}from"@cleartrip/ct-platform-utils";var p="index-module_supercoinsBalance__w9srh",f="index-module_superCoinsFloatingIslandContainer__5FNNa",g="index-module_supercoinsBalanceBackgroundColorShift__r6YWa",h="index-module_supercoinsBalanceTextColorShift__y7vva",x="index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",v="index-module_supercoinsBalanceTextColorShift_exit__JKt90";!function(e,n){void 0===n&&(n={});var o=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_supercoin_chip_loading_shimmer__0jquY .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_supercoin_chip_loading_shimmer__0jquY{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:rgba(0,62,162,0)}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var y="island_rendered_frquency",b="islandAnimationPlayed",S="island_expiration_frquency",k={requiredSupercoins:50,frequency:3,frequencyGapInDays:15,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function I(e){var n,o=e.renderFloatingIsland,r=e.supercoins;if(!o)return!1;if(r<k.requiredSupercoins)return!1;if(!("true"===_("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(y);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=k.frequency){var i=(n=localStorage.getItem(S))&&"number"==typeof parseInt(n)?parseInt(n):null;return!i||!(i>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(y),localStorage.removeItem(S),!0)}return!sessionStorage.getItem(b)}function w(){var e=localStorage.getItem(y);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(y,n.toString()),n>=k.frequency){var o=Math.floor(Date.now()/1e3)+86400*k.frequencyGapInDays;localStorage.setItem(S,o.toString())}}var B=t.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))})),C=function(t){var y=t.supercoinsLoading,S=t.supercoinBurnBalance,C=t.ravenPayload,q=void 0===C?{}:C,T=t.onSupercoinsClick,N=t.renderFloatingIsland,F=void 0===N||N,A=a((function(){var e;return null!==(e=_("utm_source"))&&void 0!==e?e:"organic"}),[]),E=a((function(){return"number"==typeof S&&S>=0&&!y}),[S,y]),H=s(!1),U=H[0],Y=H[1],M=s(null),P=M[0],D=M[1],J=s(!1),j=J[0],L=J[1],V="entry"===P?g:"exit"===P?x:"",W="entry"===P?h:"exit"===P?v:"";return l((function(){var e=function(){window.scrollY>0&&(sessionStorage.getItem(b)||(L(!0),D(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),l((function(){var e,n=I({renderFloatingIsland:F,supercoins:S});return n&&sessionStorage.setItem("disable_floater","true"),n&&!j&&(D("entry"),e=setTimeout((function(){Y(!0)}),1500)),function(){clearTimeout(e)}}),[S]),l((function(){if(F&&U){var e=setTimeout((function(){sessionStorage.getItem(b)||(Y(!1),D("exit"))}),k.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),o(r,{children:y?o("div",n({className:p},{children:i("div",n({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[o(d,{width:18,height:18,type:"rounded"}),o(d,{width:44,height:18,type:"rounded"})]}))})):E?i("div",n({style:{position:"relative"}},{children:[o("div",n({className:"".concat(p," ").concat(V),onClick:function(){var o;T&&"function"==typeof T&&T();var r=q.action_event_name;q.impression_event_name;var i=e(q,["action_event_name","impression_event_name"]);m(null!==(o=r)&&void 0!==o?o:"u_ui_action",n({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:S,u_utm_source:A},i))}},{children:i("div",n({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[o("img",{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",alt:"supercoin_icon",width:18,height:18}),o(u,n({variant:"B2",style:{lineHeight:"18px"},className:W},{children:S}))]}))})),U&&!j&&o("div",n({className:f},{children:o(c,n({fallback:o(r,{})},{children:o(B,{superCoins:S,onAnimationStart:function(){return function(o){var r,i=o.supercoins,t=o.ravenPayload,a=void 0===t?{}:t,s=o.utmSource,l=void 0===s?"":s;a.action_event_name;var c=a.impression_event_name,u=e(a,["action_event_name","impression_event_name"]);m(null!==(r=c)&&void 0!==r?r:"u_impression",n({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:i,u_utm_source:l},u)),sessionStorage.setItem("islandAnimationPlayed","true"),w()}({supercoins:S,ravenPayload:q,utmSource:A})},onAnimationEnd:function(){D("exit")}})}))}))]})):null})};export{C as SupercoinsChip};
2
2
  //# sourceMappingURL=ct-platform-supercoins-chip.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ct-platform-supercoins-chip.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","SupercoinsChip","supercoinsLoading","supercoinBurnBalance","_b","ravenPayload","onSupercoinsClick","_c","utmSource","useMemo","shouldRenderSupercoins","_d","useState","renderSuperCoinIsland","setRenderSuperCoinIsland","_e","chipAnimationType","setChipAnimationType","_f","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","chipBackgroundAnimationClassname","styles","chipTextAnimationClassname","useEffect","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","setTimeout","clearTimeout","_jsx","_Fragment","children","__assign","className","_jsxs","display","alignItems","gap","Shimmer","width","height","position","concat","onClick","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","src","alt","Typography","variant","lineHeight","Suspense","fallback","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"stBAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,s1DCzBO,IAGMe,EAAsC,2BAEtCC,EAAoC,wBAEpCC,EACT,6BAISC,EAAmC,CAC5CC,mBAAoB,GACpBC,UAAW,EACXC,mBAAoB,GACpBC,eAAgB,IAChBC,mBAAmB,GCIC,SAAAC,EAA2BC,OALzCC,EAMNC,EAAoBF,EAAAE,qBACpBC,EAAUH,EAAAG,WAGV,IAAKD,EAAsB,OAAO,EAElC,GAAIC,EAAaV,EAAiCC,mBAC9C,OAAO,EAIX,KADqD,SAAjCU,EAAc,gBAChB,OAAO,EAIzB,GA5BJ,WACI,IAAMT,EAAYU,aAAaC,QAAQhB,GACvC,OAAKK,GAA4C,iBAAxBY,SAASZ,GAC3BY,SAASZ,GADkD,CAEtE,CAuBsBa,IACDf,EAAiCE,UAAW,CAEzD,IAAMc,GAvBJR,EAASI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GAC5BA,IAIJ2C,EAAgB,cACZZ,EAAA,CAAAa,YAAa,uBACbC,UAAW,mBACXC,kBAAmBjD,EACnBkD,aAAc7C,GACXH,GAEV,GA6FmB,CAAA+B,SAAAG,EAAA,MAAAF,EAAA,CACInF,MAAO,CACHsF,QAAS,OACTC,WAAY,SACZC,IAAK,QACR,CAAAN,SAAA,CAEDF,EACI,MAAA,CAAAoB,IH1L5B,sHG2L4BC,IAAK,iBACLX,MAAO,GACPC,OAAQ,KAEZX,EAACsB,EACGnB,EAAA,CAAAoB,QAAS,KACTvG,MAAO,CAAEwG,WAAY,QACrBpB,UAAWf,GAA0B,CAAAa,SAEpCjC,YAIZU,IAA0BM,GACvBe,EACI,MAAAG,EAAA,CAAAC,UAAWhB,GAAwC,CAAAc,SAEnDF,EAACyB,EAAStB,EAAA,CAAAuB,SAAU1B,EAAKC,EAAA,CAAA,IAAA,CAAAC,SACrBF,EAACzC,GACGoE,WAAY1D,EACZ2D,iBAAkB,WACd,ODzKlC,SAAiCzF,OACnCG,EAAUH,EAAAG,WACV6B,EAAYhC,EAAAgC,aACZD,cAGA6C,EAAgB,eACZZ,EAAA,CAAAa,YAAa,8BACbC,UAAW,mBACXC,kBAAmB5E,EACnB6E,kBAPQ,IAAAjD,EAAA,GAAEA,GAQPC,IAIPjB,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CCsJwC0E,CAAuB,CACnBvF,WACI2B,EACJE,aAAYA,EACZG,UAASA,GACX,EAENwD,eAnJhC,WACI/C,EAAqB,OACxB,cAuJW,MAGhB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ct-platform-supercoins-chip.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","SupercoinsChip","supercoinsLoading","supercoinBurnBalance","_b","ravenPayload","onSupercoinsClick","_c","utmSource","useMemo","shouldRenderSupercoins","_d","useState","renderSuperCoinIsland","setRenderSuperCoinIsland","_e","chipAnimationType","setChipAnimationType","_f","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","chipBackgroundAnimationClassname","styles","chipTextAnimationClassname","useEffect","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","setTimeout","clearTimeout","_jsx","_Fragment","children","__assign","className","_jsxs","display","alignItems","gap","Shimmer","width","height","position","concat","onClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","src","alt","Typography","variant","lineHeight","Suspense","fallback","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"kuBAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,s1DCzBO,IAGMe,EAAsC,2BAEtCC,EAAoC,wBAEpCC,EACT,6BAISC,EAAmC,CAC5CC,mBAAoB,GACpBC,UAAW,EACXC,mBAAoB,GACpBC,eAAgB,IAChBC,mBAAmB,GCIC,SAAAC,EAA2BC,OALzCC,EAMNC,EAAoBF,EAAAE,qBACpBC,EAAUH,EAAAG,WAGV,IAAKD,EAAsB,OAAO,EAElC,GAAIC,EAAaV,EAAiCC,mBAC9C,OAAO,EAIX,KADqD,SAAjCU,EAAc,gBAChB,OAAO,EAIzB,GA5BJ,WACI,IAAMT,EAAYU,aAAaC,QAAQhB,GACvC,OAAKK,GAA4C,iBAAxBY,SAASZ,GAC3BY,SAASZ,GADkD,CAEtE,CAuBsBa,IACDf,EAAiCE,UAAW,CAEzD,IAAMc,GAvBJR,EAASI,aAAaC,QAAQd,KACO,iBAArBe,SAASN,GACxBM,SAASN,GAD4C,KAuBxD,OAAKQ,KAEDA,EADiBC,KAAKC,MAAMC,KAAKC,MAAQ,QAK7CR,aAAaS,WAAWxB,GACxBe,aAAaS,WAAWtB,IACjB,EACV,CAID,OADiBuB,eAAeT,QAAQf,EAO5C,CC1CA,S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sD,aAAcjD,GACX2C,GAEV,GA6FmB,CAAAf,SAAAG,EAAA,MAAAF,EAAA,CACInF,MAAO,CACHsF,QAAS,OACTC,WAAY,SACZC,IAAK,QACR,CAAAN,SAAA,CAEDF,EACI,MAAA,CAAAwB,IH7L5B,sHG8L4BC,IAAK,iBACLf,MAAO,GACPC,OAAQ,KAEZX,EAAC0B,EACGvB,EAAA,CAAAwB,QAAS,KACT3G,MAAO,CAAE4G,WAAY,QACrBxB,UAAWf,GAA0B,CAAAa,SAEpCjC,YAIZU,IAA0BM,GACvBe,EACI,MAAAG,EAAA,CAAAC,UAAWhB,GAAwC,CAAAc,SAEnDF,EAAC6B,EAAS1B,EAAA,CAAA2B,SAAU9B,EAAKC,EAAA,CAAA,IAAA,CAAAC,SACrBF,EAACzC,GACGwE,WAAY9D,EACZ+D,iBAAkB,WACd,OD5KlC,SAAiC7F,SACnCG,EAAUH,EAAAG,WACV+B,EAAiBlC,EAAAgC,aAAjBA,OAAe,IAAAE,EAAA,CAAE,EAAAA,EACjBI,EAActC,EAAAmC,UAAdA,OAAS,IAAAG,EAAG,GAAEA,EAKVN,EADqB4C,sBAAEC,EACvB7C,EAD4C6C,sBAAKC,EACjDC,EAAA/C,EADE,CAAA,oBAAA,0BAENgD,EAAqD,QAApCjD,EAAA8C,SAAoC,IAAA9C,EAAAA,EAAA,kBACjDkD,YAAa,8BACbC,UAAW,mBACXC,kBAAmBhF,EACnBiF,aAAcjD,GACX2C,IAIP/D,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CCsJwC8E,CAAuB,CACnB3F,WACI2B,EACJE,aAAYA,EACZG,UAASA,GACX,EAEN4D,eAtJhC,WACInD,EAAqB,OACxB,cA0JW,MAGhB","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"onIslandAnimationStart.d.ts","sourceRoot":"","sources":["../../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAkCrE,wBAAgB,sBAAsB,CAAC,EACnC,UAAU,EACV,YAAY,EACZ,SAAc,GACjB,EAAE,0BAA0B,QAe5B"}
1
+ {"version":3,"file":"onIslandAnimationStart.d.ts","sourceRoot":"","sources":["../../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAkCrE,wBAAgB,sBAAsB,CAAC,EACnC,UAAU,EACV,YAAiB,EACjB,SAAc,GACjB,EAAE,0BAA0B,QAkB5B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleartrip/ct-platform-supercoins-chip",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "SuperCoins Chip Component",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/ct-platform-supercoins-chip.cjs.js",
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "@cleartrip/ct-design-typography": "2.6.0",
14
14
  "@cleartrip/ct-platform-shimmer": "3.0.2",
15
- "@cleartrip/ct-platform-supercoins-floating-island": "1.0.3",
15
+ "@cleartrip/ct-platform-supercoins-floating-island": "1.0.4",
16
16
  "@cleartrip/ct-platform-utils": "3.18.5"
17
17
  },
18
18
  "peerDependencies": {