@cleartrip/ct-platform-supercoins-chip 2.3.34 → 6.0.1-beta.0

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,KAAyD,MAAM,OAAO,CAAC;AAe9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAkB7D,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqWjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"SupercoinsChip.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAiB9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAqC7D,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkYjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),r=require("@cleartrip/ct-design-typography"),o=require("@cleartrip/ct-platform-shimmer"),t=require("@cleartrip/ct-platform-utils");function a(e){return e&&e.__esModule?e:{default:e}}var s=a(i);function l(e,n){void 0===n&&(n={});var i=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var u={supercoinsBalance:"index-module_supercoinsBalance__w9srh",supercoinsExpiryPill:"index-module_supercoinsExpiryPill__v4w06",supercoinChipWrapper:"index-module_supercoinChipWrapper__QPdUS",supercoinBurnTextAlign:"index-module_supercoinBurnTextAlign__g-go5",supercoinBurnExpiryColor:"index-module_supercoinBurnExpiryColor__FTFjA",supercoinExpiryText:"index-module_supercoinExpiryText__rkVbG",supercoinExpiryAnimating:"index-module_supercoinExpiryAnimating__Gdq0n",superCoinsFloatingIslandContainer:"index-module_superCoinsFloatingIslandContainer__5FNNa",supercoinsBalanceBackgroundColorShift:"index-module_supercoinsBalanceBackgroundColorShift__r6YWa",supercoins_balance_background_color_shift:"index-module_supercoins_balance_background_color_shift__1NHEU",supercoinsBalanceTextColorShift:"index-module_supercoinsBalanceTextColorShift__y7vva",supercoins_balance_text_color_shift:"index-module_supercoins_balance_text_color_shift__V8yxU",supercoinsBalanceBackgroundColorShift_exit:"index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",supercoins_balance_background_color_shift_exit:"index-module_supercoins_balance_background_color_shift_exit__qAHuv",supercoinsBalanceTextColorShift_exit:"index-module_supercoinsBalanceTextColorShift_exit__JKt90",supercoins_balance_text_color_shift_exit:"index-module_supercoins_balance_text_color_shift_exit__rluZH",supercoin_chip_loading_shimmer:"index-module_supercoin_chip_loading_shimmer__0jquY",supercoins_balance_background_shimmer:"index-module_supercoins_balance_background_shimmer__2lOFp"};l('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_supercoinsExpiryPill__v4w06{background-color:#fbefef;border:1.5px solid #c83232;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 0 6px 8px}.index-module_supercoinChipWrapper__QPdUS{align-items:center;display:flex;justify-content:center;padding:0 4px}.index-module_supercoinBurnTextAlign__g-go5{line-height:18px;margin-right:4px}.index-module_supercoinBurnExpiryColor__FTFjA{color:#c83232!important}.index-module_supercoinExpiryText__rkVbG{color:#c83232!important;display:inline-block;line-height:18px;opacity:0;overflow:hidden;transition:width .5s ease-in-out,opacity .5s ease-in-out;white-space:nowrap;width:0}.index-module_supercoinExpiryAnimating__Gdq0n{opacity:1;width:97px}.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:#fff}}@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 c="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",_="https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",p="island_rendered_frquency",d="islandAnimationPlayed",m="island_expiration_frquency",x=5,f=2,g=2e3,h=500,v=1500,y={requiredSupercoins:50,frequency:1,frequencyGapInDays:1,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function b(e){var n,i=e.renderFloatingIsland,r=e.supercoins;if(!i)return!1;if(r<y.requiredSupercoins)return!1;if(!("true"===t.getQueryParam("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(p);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=y.frequency){var o=(n=localStorage.getItem(m))&&"number"==typeof parseInt(n)?parseInt(n):null;return!o||!(o>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(p),localStorage.removeItem(m),!0)}return!sessionStorage.getItem(d)}function w(){var e=localStorage.getItem(p);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(p,n.toString()),n>=y.frequency){var i=Math.floor(Date.now()/1e3)+86400*y.frequencyGapInDays;localStorage.setItem(m,i.toString())}}var S={chipWrapper:"index-module_chipWrapper__EwpUk",chipTextWrapper:"index-module_chipTextWrapper__Uburn",textWrapper:"index-module_textWrapper__BysJP",pillContainer:"index-module_pillContainer__bz7P4","width-animation":"index-module_width-animation__Ap-Ga","spring-up-wallet":"index-module_spring-up-wallet__GJrXW","spring-up1":"index-module_spring-up1__OLe4L","spring-up-wallet-sc":"index-module_spring-up-wallet-sc__KKKf0","spring-up2":"index-module_spring-up2__SIbCp"};l(".index-module_chipWrapper__EwpUk{align-items:center;display:flex;gap:4px;margin-bottom:20px;text-align:center}.index-module_chipTextWrapper__Uburn{align-items:center;display:flex;justify-content:center;padding:0 4px;text-align:center;width:100%}.index-module_textWrapper__BysJP{margin-right:4px}.index-module_pillContainer__bz7P4{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;box-sizing:border-box;display:inline-block;overflow:hidden;padding:5px 8px}@keyframes index-module_spring-up1__OLe4L{0%{transform:translateY(0)}60%{transform:translateY(-44px)}90%{transform:translateY(-40px)}to{transform:translateY(-40px)}}@keyframes index-module_spring-up2__SIbCp{0%{transform:translateY(-40px)}60%{transform:translateY(-84px)}90%{transform:translateY(-80px)}to{transform:translateY(-80px)}}@keyframes index-module_width-animation__Ap-Ga{0%{width:var(--wallet-initial-width)}to{width:var(--wallet-final-width)}}.index-module_width-animation__Ap-Ga{animation:index-module_width-animation__Ap-Ga .7s ease-in-out forwards}.index-module_spring-up-wallet__GJrXW{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards}.index-module_spring-up-wallet-sc__KKKf0{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards,index-module_spring-up2__SIbCp .7s ease-in-out 5s forwards}");var B={2:58,3:66,4:74,5:82,6:90,7:120};function k(i){var o=i.supercoinBalance;return n.jsxs("div",e.__assign({className:S.chipWrapper},{children:[n.jsx("img",{src:c,alt:"supercoin_icon",width:18,height:18}),n.jsx("div",e.__assign({className:S.chipTextWrapper},{children:n.jsx(r.Typography,e.__assign({variant:"B2",className:S.textWrapper},{children:o}))}))]}))}function C(i){var o=i.walletBalance;return n.jsxs("div",e.__assign({className:S.chipWrapper},{children:[n.jsx("img",{src:_,alt:"supercoin_icon",width:18,height:18}),n.jsx("div",e.__assign({className:S.chipTextWrapper},{children:n.jsxs(r.Typography,e.__assign({variant:"B2",className:S.textWrapper},{children:["₹",o]}))}))]}))}function T(i){var r,o=i.supercoinBalance,t=i.walletBalance,a=i.handleClick,s=i.chipWidthRef,l=0===t&&o>0||0===o&&0===t,u=l?S["spring-up-wallet-sc"]:S["spring-up-wallet"],c=Math.max(t.toString().length,o.toString().length)+1;!function(e,n){var i=document.querySelector(":root");null==i||i.style.setProperty("--wallet-initial-width","".concat(e,"px"));var r=B[n];null==i||i.style.setProperty("--wallet-final-width","".concat(Math.max(r,e),"px"))}(null!==(r=null==s?void 0:s.current)&&void 0!==r?r:0,c);var _=0===(null==s?void 0:s.current)?"auto":"".concat(null==s?void 0:s.current,"px"),p=0===(null==s?void 0:s.current)?"":S["width-animation"];return n.jsx("div",e.__assign({onClick:a},{children:n.jsx("div",e.__assign({className:"".concat(S.pillContainer," ").concat(p),style:{height:"32px",width:_}},{children:n.jsxs("div",e.__assign({className:u},{children:[n.jsx(k,{supercoinBalance:o}),n.jsx(C,{walletBalance:t}),l?n.jsx(k,{supercoinBalance:o}):null]}))}))}))}var j=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,l=a.supercoinBurnBalance,_=a.ravenPayload,p=void 0===_?{}:_,m=a.onSupercoinsClick,S=a.supercoinsExpiryCount,B=a.renderFloatingIsland,k=void 0===B||B,C=a.walletEnabled,E=void 0!==C&&C,I=a.walletBalance,N=a.supercoinsFetchError,W=i.useMemo((function(){var e;return null!==(e=t.getQueryParam("utm_source"))&&void 0!==e?e:"organic"}),[]),q=i.useState(!1),A=q[0],F=q[1],P=i.useState(0),Y=P[0],U=P[1],G=i.useState(!1),M=G[0],H=G[1],K=i.useState(!1),L=K[0],J=K[1],D=i.useState(!1),O=D[0],V=D[1],z=i.useMemo((function(){return"number"==typeof l&&l>=0&&!s}),[l,s]),Q=i.useState(!1),R=Q[0],Z=Q[1],X=i.useState(null),$=X[0],ee=X[1],ne=i.useState(!1),ie=ne[0],re=ne[1],oe=i.useRef(0),te=i.useRef(!1),ae="entry"===$?u.supercoinsBalanceBackgroundColorShift:"exit"===$?u.supercoinsBalanceBackgroundColorShift_exit:"",se="entry"===$?u.supercoinsBalanceTextColorShift:"exit"===$?u.supercoinsBalanceTextColorShift_exit:"";function le(){var n;m&&"function"==typeof m&&m();var i=p.action_event_name;p.impression_event_name;var r=e.__rest(p,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(n=i)&&void 0!==n?n:"u_ui_action",e.__assign({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:l,u_utm_source:W},r))}if(i.useEffect((function(){U(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));var e=function(){window.scrollY>0&&(sessionStorage.getItem(d)||(re(!0),ee(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),i.useEffect((function(){if(!s){var e,n=b({renderFloatingIsland:k,supercoins:l}),i="number"==typeof S&&S>=x&&!n;return F(i),n&&sessionStorage.setItem("disable_floater","true"),n&&!ie?(ee("entry"),e=setTimeout((function(){Z(!0)}),1500),V(!0)):i?(V(!0),setTimeout((function(){E&&J(!0)}),1e4)):(E&&J(!0),V(!0)),function(){clearTimeout(e)}}}),[l,S,s]),i.useEffect((function(){if(k&&R){var e=setTimeout((function(){sessionStorage.getItem(d)||(Z(!1),ee("exit"),J(!0))}),y.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),i.useEffect((function(){var n;if("number"==typeof l&&l>=0&&!s&&null!==S){p.action_event_name;var i=p.impression_event_name,r=e.__rest(p,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(n=i)&&void 0!==n?n:"u_impression",e.__assign({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:l,u_utm_source:W,supercoinsExpiryCount:S||"N/A"},r))}}),[s,S]),i.useEffect((function(){if(A&&!(Y>=f)){var e=setTimeout((function(){H(!0);var e=setTimeout((function(){H(!1);var e=Y+1;U(e),sessionStorage.setItem("expiryAnimationCount",e.toString())}),v);return function(){return clearTimeout(e)}}),0===Y?h:g);return function(){return clearTimeout(e)}}}),[A,Y]),N)return n.jsx(n.Fragment,{});var ue=function(){return n.jsx("div",e.__assign({className:"px-2 br-16 ba-solid bc-line-500 bg-neutral-100 o-hidden",style:{paddingTop:"6px",paddingBottom:"6px",display:"inline-block"}},{children:n.jsxs("div",e.__assign({className:"flex flex-middle flex-gap-1"},{children:[n.jsx(o.Shimmer,{width:18,height:18,type:"rounded"}),n.jsx(o.Shimmer,{width:44,height:18,type:"rounded"})]}))}))};if(t.isServer())return n.jsx(ue,{});if(s||!R&&!L&&!O)return n.jsx(ue,{});if(!z)return null;var ce=A?"HM4":"B2",_e=A?u.supercoinsExpiryPill:u.supercoinsBalance,pe=A?u.supercoinBurnExpiryColor:"";return L?n.jsx(T,{walletBalance:I,supercoinBalance:Number(l),handleClick:le,chipWidthRef:oe}):n.jsxs("div",e.__assign({style:{position:"relative"}},{children:[n.jsx("div",e.__assign({ref:function(e){var n;te.current||(te.current=!0,oe.current=null!==(n=null==e?void 0:e.offsetWidth)&&void 0!==n?n:0)},className:"".concat(_e," ").concat(ae),onClick:le},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx("img",{src:c,alt:"supercoin_icon",width:18,height:18}),n.jsxs("div",e.__assign({className:u.supercoinChipWrapper},{children:[n.jsx(r.Typography,e.__assign({variant:ce,className:[se,u.supercoinBurnTextAlign,pe].join(" ")},{children:M?S:l})),A&&n.jsx(r.Typography,e.__assign({variant:"HM4",className:"".concat(u.supercoinExpiryText," ").concat(M?u.supercoinExpiryAnimating:"")},{children:"expiring soon"}))]}))]}))})),R&&!ie&&n.jsx("div",e.__assign({className:u.superCoinsFloatingIslandContainer},{children:n.jsx(i.Suspense,e.__assign({fallback:n.jsx(n.Fragment,{})},{children:n.jsx(j,{superCoins:l,onAnimationStart:function(){return function(n){var i,r=n.supercoins,o=n.ravenPayload,a=void 0===o?{}:o,s=n.utmSource,l=void 0===s?"":s;a.action_event_name;var u=a.impression_event_name,c=e.__rest(a,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(i=u)&&void 0!==i?i:"u_impression",e.__assign({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:r,u_utm_source:l},c)),sessionStorage.setItem("islandAnimationPlayed","true"),w()}({supercoins:l,ravenPayload:p,utmSource:W})},onAnimationEnd:function(){setTimeout((function(){E&&J(!0)}),500),ee("exit")}})}))}))]}))};
1
+ "use strict";var e=require("tslib"),n=require("react/jsx-runtime"),t=require("@cleartrip/ct-design-style-manager"),i=require("react"),r=require("@cleartrip/ct-design-typography"),o=require("@cleartrip/ct-platform-shimmer"),a=require("@emotion/css"),s=require("@cleartrip/ct-platform-utils"),l=require("@cleartrip/ct-design-components");function c(e){return e&&e.__esModule?e:{default:e}}var u=c(i);const p=a.keyframes({"0%":{left:"-30%"},"100%":{left:"120%"}}),d=a.keyframes({"0%":{backgroundColor:"rgba(0, 62, 162, 0.1)"},"100%":{backgroundColor:"#003ea2"}}),g=a.keyframes({"0%":{backgroundColor:"#003ea2"},"100%":{backgroundColor:"white"}}),f=a.keyframes({"0%":{color:"#000"},"100%":{color:"#fff"}}),m=a.keyframes({"0%":{color:"#fff"},"100%":{color:"#000"}}),h=t.makeWebStyles((()=>({supercoinsBalance:{paddingTop:6,paddingRight:8,paddingBottom:6,paddingLeft:8,borderRadius:16,borderWidth:1,borderStyle:"solid",borderColor:"#e6e6e6",display:"inline-block",backgroundColor:"#fff",overflow:"hidden"},supercoinsExpiryPill:{paddingTop:6,paddingRight:0,paddingBottom:6,paddingLeft:8,borderRadius:16,borderWidth:1.5,borderStyle:"solid",borderColor:"#c83232",display:"inline-block",backgroundColor:"#fbefef",overflow:"hidden"},supercoinChipWrapper:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4},supercoinBurnTextAlign:{lineHeight:18,marginRight:4},supercoinBurnExpiryColor:{color:"#c83232"},supercoinExpiryText:{lineHeight:18,display:"inline-block",overflow:"hidden",whiteSpace:"nowrap",width:0,opacity:0,color:"#c83232",transition:"width 0.5s ease-in-out, opacity 0.5s ease-in-out"},supercoinExpiryAnimating:{width:97,opacity:1},superCoinsFloatingIslandContainer:{position:"relative",width:1,marginLeft:"100%"},supercoinsBalanceBackgroundColorShift:{position:"relative",overflow:"hidden",animation:`${d} 600ms forwards`,"&::before":{content:'""',position:"absolute",left:"-30%",top:-10,width:8,height:64,background:"rgba(255, 255, 255, 0.8)",transform:"rotate(25deg)",animation:`${p} 400ms ease-in 0.5s`}},supercoinsBalanceTextColorShift:{animation:`${f} 600ms forwards`},supercoinsBalanceBackgroundColorShift_exit:{position:"relative",overflow:"hidden",animation:`${g} 600ms forwards`},supercoinsBalanceTextColorShift_exit:{animation:`${m} 600ms forwards`}}))),y="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",x="https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",_="island_rendered_frquency",v="islandAnimationPlayed",C="island_expiration_frquency",w=5,b=2,S=2e3,B=500,j=1500,k={requiredSupercoins:50,frequency:1,frequencyGapInDays:1,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function T({renderFloatingIsland:e,supercoins:n}){if(!e)return!1;if(n<k.requiredSupercoins)return!1;if(!("true"===s.getQueryParam("isMobileApp")))return!1;if(function(){const e=localStorage.getItem(_);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=k.frequency){const e=function(){const e=localStorage.getItem(C);return e&&"number"==typeof parseInt(e)?parseInt(e):null}();if(!e)return!0;return!(e>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(_),localStorage.removeItem(C),!0)}return!sessionStorage.getItem(v)}function I(){let e=localStorage.getItem(_);e||(e="0");const n=parseInt(e)+1;if(localStorage.setItem(_,n.toString()),n>=k.frequency){const e=Math.floor(Date.now()/1e3)+86400*k.frequencyGapInDays;localStorage.setItem(C,e.toString())}}const q=a.keyframes({"0%":{transform:"translateY(0px)"},"60%":{transform:"translateY(-44px)"},"90%":{transform:"translateY(-40px)"},"100%":{transform:"translateY(-40px)"}}),E=a.keyframes({"0%":{transform:"translateY(-40px)"},"60%":{transform:"translateY(-84px)"},"90%":{transform:"translateY(-80px)"},"100%":{transform:"translateY(-80px)"}}),W=a.keyframes({"0%":{width:"var(--wallet-initial-width)"},"100%":{width:"var(--wallet-final-width)"}}),A=t.makeWebStyles((()=>({chipWrapper:{display:"flex",alignItems:"center",gap:4,marginBottom:20,textAlign:"center"},chipTextWrapper:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,width:"100%",textAlign:"center"},textWrapper:{marginRight:4},pillContainer:{boxSizing:"border-box",paddingTop:5,paddingRight:8,paddingBottom:5,paddingLeft:8,borderRadius:16,borderWidth:1,borderStyle:"solid",borderColor:"#e6e6e6",display:"inline-block",backgroundColor:"#fff",overflow:"hidden"},"width-animation":{animation:`${W} 0.7s ease-in-out forwards`},"spring-up-wallet":{animation:`${q} 0.7s ease-in-out forwards 2s`},"spring-up-wallet-sc":{animation:`${q} 0.7s ease-in-out forwards 2s, ${E} 0.7s ease-in-out forwards 5s`}}))),R={2:58,3:66,4:74,5:82,6:90,7:120};function M({supercoinBalance:e}){return n.jsxs(l.Container,{as:"div",styleConfig:{root:[A.chipWrapper]},children:[n.jsx("img",{src:y,alt:"supercoin_icon",width:18,height:18}),n.jsx(l.Container,{as:"div",styleConfig:{root:[A.chipTextWrapper]},children:n.jsx(r.Typography,{variant:"B2",styleConfig:{root:[A.textWrapper]},children:e})})]})}function P({walletBalance:e}){return n.jsxs(l.Container,{as:"div",styleConfig:{root:[A.chipWrapper]},children:[n.jsx("img",{src:x,alt:"supercoin_icon",width:18,height:18}),n.jsx(l.Container,{as:"div",styleConfig:{root:[A.chipTextWrapper]},children:n.jsxs(r.Typography,{variant:"B2",styleConfig:{root:[A.textWrapper]},children:["₹",e]})})]})}function $({supercoinBalance:e,walletBalance:t,handleClick:i,chipWidthRef:r}){var o;const a=0===t&&e>0||0===e&&0===t,s=a?A["spring-up-wallet-sc"]:A["spring-up-wallet"],c=Math.max(t.toString().length,e.toString().length)+1;!function(e,n){const t=document.querySelector(":root");null==t||t.style.setProperty("--wallet-initial-width",`${e}px`);const i=R[n];null==t||t.style.setProperty("--wallet-final-width",`${Math.max(i,e)}px`)}(null!==(o=null==r?void 0:r.current)&&void 0!==o?o:0,c);const u=0===(null==r?void 0:r.current)?"auto":null==r?void 0:r.current,p=0===(null==r?void 0:r.current)?"":A["width-animation"];return n.jsx(l.Container,{as:"div",onClick:i,children:n.jsx(l.Container,{as:"div",styleConfig:{root:[A.pillContainer,p,{height:32,width:u}]},children:n.jsxs(l.Container,{as:"div",styleConfig:{root:[s]},children:[n.jsx(M,{supercoinBalance:e}),n.jsx(P,{walletBalance:t}),a?n.jsx(M,{supercoinBalance:e}):null]})})})}const F=t.makeStyles((()=>({"ba-solid":{},"bc-line-500":{},"width-18":{width:18},"height-18":{height:18},"width-44":{width:44}}))),L=u.default.lazy((()=>import("@cleartrip/ct-platform-supercoins-floating-island").then((e=>({default:e.SupercoinsFloatingIsland})))));exports.SupercoinsChip=({supercoinsLoading:a,supercoinBurnBalance:c,ravenPayload:u={},onSupercoinsClick:p,supercoinsExpiryCount:d,renderFloatingIsland:g=!0,walletEnabled:f=!1,walletBalance:m,supercoinsFetchError:x})=>{const _=i.useMemo((()=>{var e;return null!==(e=s.getQueryParam("utm_source"))&&void 0!==e?e:"organic"}),[]),[C,q]=i.useState(!1),[E,W]=i.useState(0),[A,R]=i.useState(!1),[M,P]=i.useState(!1),[Y,D]=i.useState(!1),H=i.useMemo((()=>"number"==typeof c&&c>=0&&!a),[c,a]),[O,K]=i.useState(!1),[N,z]=i.useState(null),[G,Q]=i.useState(!1),V=i.useRef(0),J="entry"===N?h.supercoinsBalanceBackgroundColorShift:"exit"===N?h.supercoinsBalanceBackgroundColorShift_exit:"",U="entry"===N?h.supercoinsBalanceTextColorShift:"exit"===N?h.supercoinsBalanceTextColorShift_exit:"";function X(){var n;p&&"function"==typeof p&&p();const{action_event_name:t,impression_event_name:i}=u,r=e.__rest(u,["action_event_name","impression_event_name"]);s.ravenSDKTrigger(null!==(n=t)&&void 0!==n?n:"u_ui_action",Object.assign({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:c,u_utm_source:_},r))}if(i.useEffect((()=>{W(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));const e=()=>{if(window.scrollY>0){sessionStorage.getItem(v)||(Q(!0),z(null))}};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),i.useEffect((()=>{if(a)return;const e=T({renderFloatingIsland:g,supercoins:c}),n="number"==typeof d&&d>=w&&!e;let t;return q(n),e&&sessionStorage.setItem("disable_floater","true"),e&&!G?(z("entry"),t=setTimeout((()=>{K(!0)}),1500),D(!0)):n?(D(!0),setTimeout((()=>{f&&P(!0)}),1e4)):(f&&P(!0),D(!0)),()=>{clearTimeout(t)}}),[c,d,a]),i.useEffect((()=>{if(!g||!O)return;const e=setTimeout((()=>{sessionStorage.getItem(v)||(K(!1),z("exit"),P(!0))}),k.cutoffTimeInMs);return()=>{clearTimeout(e)}}),[]),i.useEffect((()=>{var n;if("number"==typeof c&&c>=0&&!a&&null!==d){const{action_event_name:t,impression_event_name:i}=u,r=e.__rest(u,["action_event_name","impression_event_name"]);s.ravenSDKTrigger(null!==(n=i)&&void 0!==n?n:"u_impression",Object.assign({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:c,u_utm_source:_,supercoinsExpiryCount:d||"N/A"},r))}}),[a,d]),i.useEffect((()=>{if(!C||E>=b)return;const e=setTimeout((()=>{R(!0);const e=setTimeout((()=>{R(!1);const e=E+1;W(e),sessionStorage.setItem("expiryAnimationCount",e.toString())}),j);return()=>clearTimeout(e)}),0===E?B:S);return()=>clearTimeout(e)}),[C,E]),x)return n.jsx(n.Fragment,{});const Z=()=>n.jsx(l.Container,{as:"div",styleConfig:{root:[t.gs["px-2"],t.gs["br-16"],F["ba-solid"],F["bc-line-500"],t.gs["bg-neutral-100"],t.gs["o-hidden"],{paddingTop:6,paddingBottom:6,display:"inline-block"}]},children:n.jsxs(l.Container,{as:"div",styleConfig:{root:[t.gs.flex,t.gs["flex-middle"],t.gs["flex-gap-1"]]},children:[n.jsx(o.Shimmer,{type:"rounded",width:18,height:18}),n.jsx(o.Shimmer,{type:"rounded",width:44,height:18})]})});if(s.isServer())return n.jsx(Z,{});if(a||!O&&!M&&!Y)return n.jsx(Z,{});if(!H)return null;const ee=C?"HM4":"B2",ne=C?h.supercoinsExpiryPill:h.supercoinsBalance,te=C?h.supercoinBurnExpiryColor:"";return M?n.jsx($,{walletBalance:m,supercoinBalance:Number(c),handleClick:X,chipWidthRef:V}):n.jsxs(l.Container,{as:"div",styleConfig:{root:[{position:"relative"}]},children:[n.jsx(l.Container,{as:"div",onClick:X,styleConfig:{root:[ne,J]},children:n.jsxs(l.Container,{as:"div",styleConfig:{root:[{display:"flex",alignItems:"center",gap:4}]},children:[n.jsx("img",{src:y,alt:"supercoin_icon",width:18,height:18}),n.jsxs(l.Container,{as:"div",styleConfig:{root:[h.supercoinChipWrapper]},children:[n.jsx(r.Typography,{variant:ee,styleConfig:{root:[U,h.supercoinBurnTextAlign,te]},children:A?d:c}),C&&n.jsx(r.Typography,{variant:"HM4",styleConfig:{root:[h.supercoinExpiryText,A?h.supercoinExpiryAnimating:{}]},children:"expiring soon"})]})]})}),O&&!G&&n.jsx(l.Container,{as:"div",styleConfig:{root:[h.superCoinsFloatingIslandContainer]},children:n.jsx(i.Suspense,{fallback:n.jsx(n.Fragment,{}),children:n.jsx(L,{superCoins:c,onAnimationStart:()=>function({supercoins:n,ravenPayload:t={},utmSource:i=""}){var r;const{action_event_name:o,impression_event_name:a}=t,l=e.__rest(t,["action_event_name","impression_event_name"]);s.ravenSDKTrigger(null!==(r=a)&&void 0!==r?r:"u_impression",Object.assign({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:n,u_utm_source:i},l)),sessionStorage.setItem("islandAnimationPlayed","true"),I()}({supercoins:c,ravenPayload:u,utmSource:_}),onAnimationEnd:function(){setTimeout((()=>{f&&P(!0)}),500),z("exit")}})})})]})};
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/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../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,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOINS_CHIP_ICON","WALLET_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","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","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","className","styles","chipWrapper","children","_jsx","jsx","src","alt","width","height","__assign","chipTextWrapper","Typography","variant","textWrapper","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","querySelector","setProperty","concat","setWalletCSSVariables","_b","current","containerClass","onClick","pillContainer","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","_c","_d","walletEnabled","supercoinsFetchError","utmSource","useMemo","_e","useState","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","_f","animationCount","setAnimationCount","_g","isAnimating","setIsAnimating","_h","startWalletAnimation","setStartWalletAnimation","_j","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","_k","renderSuperCoinIsland","setRenderSuperCoinIsland","_l","chipAnimationType","setChipAnimationType","_m","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipWidthCalculatedRef","chipBackgroundAnimationClassname","supercoinsBalanceBackgroundColorShift","supercoinsBalanceBackgroundColorShift_exit","chipTextAnimationClassname","supercoinsBalanceTextColorShift","supercoinsBalanceTextColorShift_exit","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","renderSupercoinExpiry","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","SupercoinLoadingPill","paddingTop","paddingBottom","display","Shimmer","isServer","typographyVariant","chipClassName","supercoinsExpiryPill","supercoinsBalance","expiryColorClass","supercoinBurnExpiryColor","position","offsetWidth","jsxs","alignItems","gap","supercoinChipWrapper","supercoinBurnTextAlign","join","supercoinExpiryText","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","Suspense","fallback","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"uRAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAb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ArI,SAAA,8BAM5BuE,IAA0BM,IACvB5E,EAAAA,IAAA,MAAAM,EAAAA,SAAA,CAAKV,UAAWC,EAAOwI,mCACnB,CAAAtI,SAAAC,EAAAA,IAACsI,EAAAA,SAAQhI,EAAAA,SAAA,CAACiI,SAAUvI,EAAAA,oBAChB,CAAAD,SAAAC,EAAAA,IAACiC,EAA4B,CACzBuG,WAAY9F,EACZ+F,iBAAkB,WACd,OHjV1B,SAAiCrK,SACnCG,EAAUH,EAAAG,WACVuE,EAAiB1E,EAAAuE,aAAjBA,OAAe,IAAAG,EAAA,CAAE,EAAAA,EACjBC,EAAc3E,EAAA8E,UAAdA,OAAS,IAAAH,EAAG,GAAEA,EAKVJ,EADqB4C,sBAAEC,EACvB7C,EAD4C6C,sBAAKC,EACjDC,EAAAA,OAAA/C,EADE,CAAA,oBAAA,0BAENgD,kBAAqD,QAApC/D,EAAA4D,SAAoC,IAAA5D,EAAAA,EAAA,2BACjDgE,YAAa,8BACbC,UAAW,mBACXC,kBAAmBvH,EACnBwH,aAAc7C,GACXuC,IAIPtG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CG2TgCsJ,CAAuB,CACnBnK,WAAYmE,EACZC,aAAYA,EACZO,UAASA,KAGjByF,eAvSxB,WACIjC,YAAW,WACH1D,GAAegB,GAAwB,EAC9C,GAAE,KACHU,GAAqB,OACxB,aAySL","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ct-platform-supercoins-chip.cjs.js","sources":["../packages/components/SupercoinsChip/src/index.module.ts","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.module.ts","../packages/components/SupercoinsChip/src/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["supercoin_chip_loading_shimmer","keyframes","left","supercoins_balance_background_color_shift","backgroundColor","supercoins_balance_background_color_shift_exit","supercoins_balance_text_color_shift","color","supercoins_balance_text_color_shift_exit","styles","makeWebStyles","supercoinsBalance","paddingTop","paddingRight","paddingBottom","paddingLeft","borderRadius","borderWidth","borderStyle","borderColor","display","overflow","supercoinsExpiryPill","supercoinChipWrapper","alignItems","justifyContent","supercoinBurnTextAlign","lineHeight","marginRight","supercoinBurnExpiryColor","supercoinExpiryText","whiteSpace","width","opacity","transition","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","position","marginLeft","supercoinsBalanceBackgroundColorShift","animation","content","top","height","background","transform","supercoinsBalanceTextColorShift","supercoinsBalanceBackgroundColorShift_exit","supercoinsBalanceTextColorShift_exit","SUPERCOINS_CHIP_ICON","WALLET_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","expiry","getExpiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","springUp1","springUp2","widthAnimation","chipWrapper","gap","marginBottom","textAlign","chipTextWrapper","textWrapper","pillContainer","boxSizing","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","Container","as","styleConfig","root","children","_jsx","src","alt","Typography","variant","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","document","querySelector","style","setProperty","setWalletCSSVariables","_a","current","containerClass","onClick","jsx","staticStyles","makeStyles","LazySuperCoinsFloatingIsland","React","default","lazy","import","then","module","SupercoinsFloatingIsland","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","walletEnabled","supercoinsFetchError","utmSource","useMemo","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","useState","animationCount","setAnimationCount","isAnimating","setIsAnimating","startWalletAnimation","setStartWalletAnimation","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","renderSuperCoinIsland","setRenderSuperCoinIsland","chipAnimationType","setChipAnimationType","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipBackgroundAnimationClassname","chipTextAnimationClassname","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","shouldRender","renderSupercoinExpiry","timeout","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","SupercoinLoadingPill","gs","Shimmer","type","isServer","typographyVariant","chipClassName","expiryColorClass","Suspense","fallback","_Fragment","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"8YAEA,MAAMA,EAAiCC,EAAAA,UAAU,CAC/C,KAAM,CACJC,KAAM,QAER,OAAQ,CACNA,KAAM,UAIJC,EAA4CF,EAAAA,UAAU,CAC1D,KAAM,CACJG,gBAAiB,yBAEnB,OAAQ,CACNA,gBAAiB,aAIfC,EAAiDJ,EAAAA,UAAU,CAC/D,KAAM,CACJG,gBAAiB,WAEnB,OAAQ,CACNA,gBAAiB,WAIfE,EAAsCL,EAAAA,UAAU,CACpD,KAAM,CACJM,MAAO,QAET,OAAQ,CACNA,MAAO,UAILC,EAA2CP,EAAAA,UAAU,CACzD,KAAM,CACJM,MAAO,QAET,OAAQ,CACNA,MAAO,UAMLE,EAASC,EAAaA,eAAC,KAAO,CAClCC,kBAAmB,CACjBC,WAAY,EACZC,aAAc,EACdC,cAAe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EAAUA,YACPC,QAAQ,MACRP,YAAa,CACTC,KAAM,CACF3F,EAAOqB,oBACP4H,EAAcjJ,EAAO0B,yBAA2B,CAAE,IAEzDkE,SAAA,0BASpB4D,IAA0BI,GACvB/D,MAACL,EAAAA,UAAU,CAAAC,GAAG,MAAMC,YAAa,CAC7BC,KAAM,CAAC3F,EAAO2B,oCAEdiE,SAAAC,EAAAA,IAACqG,EAAQA,SAAC,CAAAC,SAAUtG,EAAAA,IAAKuG,EAAAA,SAAA,CAAA,GAAAxG,SACrBC,EAAAA,IAAC8B,EAA4B,CACzB0E,WAAYjE,EACZkE,iBAAkB,IJnY9B,UAAuBhJ,WACnCA,EAAU+E,aACVA,EAAe,CAAA,EAAEK,UACjBA,EAAY,WAIZ,MAAMwB,kBAAEA,EAAiBC,sBAAEA,GACvB9B,EADiD+B,EACjDC,EAAAA,OAAAhC,EADE,CAAA,oBAAA,0BAENiC,kBAAqD,QAApClD,EAAA+C,SAAoC,IAAA/C,EAAAA,EAAA,8BACjDmD,YAAa,8BACbC,UAAW,mBACXC,kBAAmBnH,EACnBoH,aAAchC,GACX0B,IAIPhG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CI8WgCkI,CAAuB,CACnBjJ,WAAY8E,EACZC,eACAK,cAGR8D,eArUxB,WACInB,YAAW,KACH7C,GAAeY,GAAwB,EAAK,GACjD,KACHO,EAAqB,OACxB,UAsUC"}
@@ -1,2 +1,2 @@
1
- import{__rest as e,__assign as n}from"tslib";import{jsx as i,jsxs as r,Fragment as o}from"react/jsx-runtime";import t,{useMemo as a,useState as l,useRef as s,useEffect as c,Suspense as u}from"react";import{Typography as d}from"@cleartrip/ct-design-typography";import{Shimmer as p}from"@cleartrip/ct-platform-shimmer";import{getQueryParam as _,ravenSDKTrigger as m,isServer as f}from"@cleartrip/ct-platform-utils";function x(e,n){void 0===n&&(n={});var i=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var h={supercoinsBalance:"index-module_supercoinsBalance__w9srh",supercoinsExpiryPill:"index-module_supercoinsExpiryPill__v4w06",supercoinChipWrapper:"index-module_supercoinChipWrapper__QPdUS",supercoinBurnTextAlign:"index-module_supercoinBurnTextAlign__g-go5",supercoinBurnExpiryColor:"index-module_supercoinBurnExpiryColor__FTFjA",supercoinExpiryText:"index-module_supercoinExpiryText__rkVbG",supercoinExpiryAnimating:"index-module_supercoinExpiryAnimating__Gdq0n",superCoinsFloatingIslandContainer:"index-module_superCoinsFloatingIslandContainer__5FNNa",supercoinsBalanceBackgroundColorShift:"index-module_supercoinsBalanceBackgroundColorShift__r6YWa",supercoins_balance_background_color_shift:"index-module_supercoins_balance_background_color_shift__1NHEU",supercoinsBalanceTextColorShift:"index-module_supercoinsBalanceTextColorShift__y7vva",supercoins_balance_text_color_shift:"index-module_supercoins_balance_text_color_shift__V8yxU",supercoinsBalanceBackgroundColorShift_exit:"index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",supercoins_balance_background_color_shift_exit:"index-module_supercoins_balance_background_color_shift_exit__qAHuv",supercoinsBalanceTextColorShift_exit:"index-module_supercoinsBalanceTextColorShift_exit__JKt90",supercoins_balance_text_color_shift_exit:"index-module_supercoins_balance_text_color_shift_exit__rluZH",supercoin_chip_loading_shimmer:"index-module_supercoin_chip_loading_shimmer__0jquY",supercoins_balance_background_shimmer:"index-module_supercoins_balance_background_shimmer__2lOFp"};x('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_supercoinsExpiryPill__v4w06{background-color:#fbefef;border:1.5px solid #c83232;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 0 6px 8px}.index-module_supercoinChipWrapper__QPdUS{align-items:center;display:flex;justify-content:center;padding:0 4px}.index-module_supercoinBurnTextAlign__g-go5{line-height:18px;margin-right:4px}.index-module_supercoinBurnExpiryColor__FTFjA{color:#c83232!important}.index-module_supercoinExpiryText__rkVbG{color:#c83232!important;display:inline-block;line-height:18px;opacity:0;overflow:hidden;transition:width .5s ease-in-out,opacity .5s ease-in-out;white-space:nowrap;width:0}.index-module_supercoinExpiryAnimating__Gdq0n{opacity:1;width:97px}.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:#fff}}@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 g="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",v="https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",y="island_rendered_frquency",b="islandAnimationPlayed",w="island_expiration_frquency",B=5,k=2,C=2e3,S=500,T=1500,I={requiredSupercoins:50,frequency:1,frequencyGapInDays:1,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function E(e){var n,i=e.renderFloatingIsland,r=e.supercoins;if(!i)return!1;if(r<I.requiredSupercoins)return!1;if(!("true"===_("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(y);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=I.frequency){var o=(n=localStorage.getItem(w))&&"number"==typeof parseInt(n)?parseInt(n):null;return!o||!(o>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(y),localStorage.removeItem(w),!0)}return!sessionStorage.getItem(b)}function N(){var e=localStorage.getItem(y);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(y,n.toString()),n>=I.frequency){var i=Math.floor(Date.now()/1e3)+86400*I.frequencyGapInDays;localStorage.setItem(w,i.toString())}}var W={chipWrapper:"index-module_chipWrapper__EwpUk",chipTextWrapper:"index-module_chipTextWrapper__Uburn",textWrapper:"index-module_textWrapper__BysJP",pillContainer:"index-module_pillContainer__bz7P4","width-animation":"index-module_width-animation__Ap-Ga","spring-up-wallet":"index-module_spring-up-wallet__GJrXW","spring-up1":"index-module_spring-up1__OLe4L","spring-up-wallet-sc":"index-module_spring-up-wallet-sc__KKKf0","spring-up2":"index-module_spring-up2__SIbCp"};x(".index-module_chipWrapper__EwpUk{align-items:center;display:flex;gap:4px;margin-bottom:20px;text-align:center}.index-module_chipTextWrapper__Uburn{align-items:center;display:flex;justify-content:center;padding:0 4px;text-align:center;width:100%}.index-module_textWrapper__BysJP{margin-right:4px}.index-module_pillContainer__bz7P4{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;box-sizing:border-box;display:inline-block;overflow:hidden;padding:5px 8px}@keyframes index-module_spring-up1__OLe4L{0%{transform:translateY(0)}60%{transform:translateY(-44px)}90%{transform:translateY(-40px)}to{transform:translateY(-40px)}}@keyframes index-module_spring-up2__SIbCp{0%{transform:translateY(-40px)}60%{transform:translateY(-84px)}90%{transform:translateY(-80px)}to{transform:translateY(-80px)}}@keyframes index-module_width-animation__Ap-Ga{0%{width:var(--wallet-initial-width)}to{width:var(--wallet-final-width)}}.index-module_width-animation__Ap-Ga{animation:index-module_width-animation__Ap-Ga .7s ease-in-out forwards}.index-module_spring-up-wallet__GJrXW{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards}.index-module_spring-up-wallet-sc__KKKf0{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards,index-module_spring-up2__SIbCp .7s ease-in-out 5s forwards}");var A={2:58,3:66,4:74,5:82,6:90,7:120};function q(e){var o=e.supercoinBalance;return r("div",n({className:W.chipWrapper},{children:[i("img",{src:g,alt:"supercoin_icon",width:18,height:18}),i("div",n({className:W.chipTextWrapper},{children:i(d,n({variant:"B2",className:W.textWrapper},{children:o}))}))]}))}function F(e){var o=e.walletBalance;return r("div",n({className:W.chipWrapper},{children:[i("img",{src:v,alt:"supercoin_icon",width:18,height:18}),i("div",n({className:W.chipTextWrapper},{children:r(d,n({variant:"B2",className:W.textWrapper},{children:["₹",o]}))}))]}))}function P(e){var o,t=e.supercoinBalance,a=e.walletBalance,l=e.handleClick,s=e.chipWidthRef,c=0===a&&t>0||0===t&&0===a,u=c?W["spring-up-wallet-sc"]:W["spring-up-wallet"],d=Math.max(a.toString().length,t.toString().length)+1;!function(e,n){var i=document.querySelector(":root");null==i||i.style.setProperty("--wallet-initial-width","".concat(e,"px"));var r=A[n];null==i||i.style.setProperty("--wallet-final-width","".concat(Math.max(r,e),"px"))}(null!==(o=null==s?void 0:s.current)&&void 0!==o?o:0,d);var p=0===(null==s?void 0:s.current)?"auto":"".concat(null==s?void 0:s.current,"px"),_=0===(null==s?void 0:s.current)?"":W["width-animation"];return i("div",n({onClick:l},{children:i("div",n({className:"".concat(W.pillContainer," ").concat(_),style:{height:"32px",width:p}},{children:r("div",n({className:u},{children:[i(q,{supercoinBalance:t}),i(F,{walletBalance:a}),c?i(q,{supercoinBalance:t}):null]}))}))}))}var Y=t.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))})),U=function(t){var x=t.supercoinsLoading,v=t.supercoinBurnBalance,y=t.ravenPayload,w=void 0===y?{}:y,W=t.onSupercoinsClick,A=t.supercoinsExpiryCount,q=t.renderFloatingIsland,F=void 0===q||q,U=t.walletEnabled,G=void 0!==U&&U,H=t.walletBalance,L=t.supercoinsFetchError,j=a((function(){var e;return null!==(e=_("utm_source"))&&void 0!==e?e:"organic"}),[]),M=l(!1),J=M[0],K=M[1],O=l(0),V=O[0],z=O[1],D=l(!1),Z=D[0],Q=D[1],R=l(!1),X=R[0],$=R[1],ee=l(!1),ne=ee[0],ie=ee[1],re=a((function(){return"number"==typeof v&&v>=0&&!x}),[v,x]),oe=l(!1),te=oe[0],ae=oe[1],le=l(null),se=le[0],ce=le[1],ue=l(!1),de=ue[0],pe=ue[1],_e=s(0),me=s(!1),fe="entry"===se?h.supercoinsBalanceBackgroundColorShift:"exit"===se?h.supercoinsBalanceBackgroundColorShift_exit:"",xe="entry"===se?h.supercoinsBalanceTextColorShift:"exit"===se?h.supercoinsBalanceTextColorShift_exit:"";function he(){var i;W&&"function"==typeof W&&W();var r=w.action_event_name;w.impression_event_name;var o=e(w,["action_event_name","impression_event_name"]);m(null!==(i=r)&&void 0!==i?i:"u_ui_action",n({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:v,u_utm_source:j},o))}if(c((function(){z(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));var e=function(){window.scrollY>0&&(sessionStorage.getItem(b)||(pe(!0),ce(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),c((function(){if(!x){var e,n=E({renderFloatingIsland:F,supercoins:v}),i="number"==typeof A&&A>=B&&!n;return K(i),n&&sessionStorage.setItem("disable_floater","true"),n&&!de?(ce("entry"),e=setTimeout((function(){ae(!0)}),1500),ie(!0)):i?(ie(!0),setTimeout((function(){G&&$(!0)}),1e4)):(G&&$(!0),ie(!0)),function(){clearTimeout(e)}}}),[v,A,x]),c((function(){if(F&&te){var e=setTimeout((function(){sessionStorage.getItem(b)||(ae(!1),ce("exit"),$(!0))}),I.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),c((function(){var i;if("number"==typeof v&&v>=0&&!x&&null!==A){w.action_event_name;var r=w.impression_event_name,o=e(w,["action_event_name","impression_event_name"]);m(null!==(i=r)&&void 0!==i?i:"u_impression",n({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:v,u_utm_source:j,supercoinsExpiryCount:A||"N/A"},o))}}),[x,A]),c((function(){if(J&&!(V>=k)){var e=setTimeout((function(){Q(!0);var e=setTimeout((function(){Q(!1);var e=V+1;z(e),sessionStorage.setItem("expiryAnimationCount",e.toString())}),T);return function(){return clearTimeout(e)}}),0===V?S:C);return function(){return clearTimeout(e)}}}),[J,V]),L)return i(o,{});var ge=function(){return i("div",n({className:"px-2 br-16 ba-solid bc-line-500 bg-neutral-100 o-hidden",style:{paddingTop:"6px",paddingBottom:"6px",display:"inline-block"}},{children:r("div",n({className:"flex flex-middle flex-gap-1"},{children:[i(p,{width:18,height:18,type:"rounded"}),i(p,{width:44,height:18,type:"rounded"})]}))}))};if(f())return i(ge,{});if(x||!te&&!X&&!ne)return i(ge,{});if(!re)return null;var ve=J?"HM4":"B2",ye=J?h.supercoinsExpiryPill:h.supercoinsBalance,be=J?h.supercoinBurnExpiryColor:"";return X?i(P,{walletBalance:H,supercoinBalance:Number(v),handleClick:he,chipWidthRef:_e}):r("div",n({style:{position:"relative"}},{children:[i("div",n({ref:function(e){var n;me.current||(me.current=!0,_e.current=null!==(n=null==e?void 0:e.offsetWidth)&&void 0!==n?n:0)},className:"".concat(ye," ").concat(fe),onClick:he},{children:r("div",n({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[i("img",{src:g,alt:"supercoin_icon",width:18,height:18}),r("div",n({className:h.supercoinChipWrapper},{children:[i(d,n({variant:ve,className:[xe,h.supercoinBurnTextAlign,be].join(" ")},{children:Z?A:v})),J&&i(d,n({variant:"HM4",className:"".concat(h.supercoinExpiryText," ").concat(Z?h.supercoinExpiryAnimating:"")},{children:"expiring soon"}))]}))]}))})),te&&!de&&i("div",n({className:h.superCoinsFloatingIslandContainer},{children:i(u,n({fallback:i(o,{})},{children:i(Y,{superCoins:v,onAnimationStart:function(){return function(i){var r,o=i.supercoins,t=i.ravenPayload,a=void 0===t?{}:t,l=i.utmSource,s=void 0===l?"":l;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:o,u_utm_source:s},u)),sessionStorage.setItem("islandAnimationPlayed","true"),N()}({supercoins:v,ravenPayload:w,utmSource:j})},onAnimationEnd:function(){setTimeout((function(){G&&$(!0)}),500),ce("exit")}})}))}))]}))};export{U as SupercoinsChip};
1
+ import{__rest as e}from"tslib";import{jsx as n,jsxs as t,Fragment as i}from"react/jsx-runtime";import{makeWebStyles as o,makeStyles as r,gs as a}from"@cleartrip/ct-design-style-manager";import s,{useMemo as l,useState as c,useRef as p,useEffect as d,Suspense as u}from"react";import{Typography as m}from"@cleartrip/ct-design-typography";import{Shimmer as f}from"@cleartrip/ct-platform-shimmer";import{keyframes as g}from"@emotion/css";import{getQueryParam as h,ravenSDKTrigger as y,isServer as _}from"@cleartrip/ct-platform-utils";import{Container as v}from"@cleartrip/ct-design-components";const w=g({"0%":{left:"-30%"},"100%":{left:"120%"}}),x=g({"0%":{backgroundColor:"rgba(0, 62, 162, 0.1)"},"100%":{backgroundColor:"#003ea2"}}),b=g({"0%":{backgroundColor:"#003ea2"},"100%":{backgroundColor:"white"}}),C=g({"0%":{color:"#000"},"100%":{color:"#fff"}}),S=g({"0%":{color:"#fff"},"100%":{color:"#000"}}),B=o((()=>({supercoinsBalance:{paddingTop:6,paddingRight:8,paddingBottom:6,paddingLeft:8,borderRadius:16,borderWidth:1,borderStyle:"solid",borderColor:"#e6e6e6",display:"inline-block",backgroundColor:"#fff",overflow:"hidden"},supercoinsExpiryPill:{paddingTop:6,paddingRight:0,paddingBottom:6,paddingLeft:8,borderRadius:16,borderWidth:1.5,borderStyle:"solid",borderColor:"#c83232",display:"inline-block",backgroundColor:"#fbefef",overflow:"hidden"},supercoinChipWrapper:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4},supercoinBurnTextAlign:{lineHeight:18,marginRight:4},supercoinBurnExpiryColor:{color:"#c83232"},supercoinExpiryText:{lineHeight:18,display:"inline-block",overflow:"hidden",whiteSpace:"nowrap",width:0,opacity:0,color:"#c83232",transition:"width 0.5s ease-in-out, opacity 0.5s ease-in-out"},supercoinExpiryAnimating:{width:97,opacity:1},superCoinsFloatingIslandContainer:{position:"relative",width:1,marginLeft:"100%"},supercoinsBalanceBackgroundColorShift:{position:"relative",overflow:"hidden",animation:`${x} 600ms forwards`,"&::before":{content:'""',position:"absolute",left:"-30%",top:-10,width:8,height:64,background:"rgba(255, 255, 255, 0.8)",transform:"rotate(25deg)",animation:`${w} 400ms ease-in 0.5s`}},supercoinsBalanceTextColorShift:{animation:`${C} 600ms forwards`},supercoinsBalanceBackgroundColorShift_exit:{position:"relative",overflow:"hidden",animation:`${b} 600ms forwards`},supercoinsBalanceTextColorShift_exit:{animation:`${S} 600ms forwards`}}))),I="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",T="https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",k="island_rendered_frquency",W="islandAnimationPlayed",E="island_expiration_frquency",A=5,q=2,R=2e3,$=500,L=1500,M={requiredSupercoins:50,frequency:1,frequencyGapInDays:1,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function P({renderFloatingIsland:e,supercoins:n}){if(!e)return!1;if(n<M.requiredSupercoins)return!1;if(!("true"===h("isMobileApp")))return!1;if(function(){const e=localStorage.getItem(k);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=M.frequency){const e=function(){const e=localStorage.getItem(E);return e&&"number"==typeof parseInt(e)?parseInt(e):null}();if(!e)return!0;return!(e>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(k),localStorage.removeItem(E),!0)}return!sessionStorage.getItem(W)}function Y(){let e=localStorage.getItem(k);e||(e="0");const n=parseInt(e)+1;if(localStorage.setItem(k,n.toString()),n>=M.frequency){const e=Math.floor(Date.now()/1e3)+86400*M.frequencyGapInDays;localStorage.setItem(E,e.toString())}}const F=g({"0%":{transform:"translateY(0px)"},"60%":{transform:"translateY(-44px)"},"90%":{transform:"translateY(-40px)"},"100%":{transform:"translateY(-40px)"}}),j=g({"0%":{transform:"translateY(-40px)"},"60%":{transform:"translateY(-84px)"},"90%":{transform:"translateY(-80px)"},"100%":{transform:"translateY(-80px)"}}),D=g({"0%":{width:"var(--wallet-initial-width)"},"100%":{width:"var(--wallet-final-width)"}}),H=o((()=>({chipWrapper:{display:"flex",alignItems:"center",gap:4,marginBottom:20,textAlign:"center"},chipTextWrapper:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,width:"100%",textAlign:"center"},textWrapper:{marginRight:4},pillContainer:{boxSizing:"border-box",paddingTop:5,paddingRight:8,paddingBottom:5,paddingLeft:8,borderRadius:16,borderWidth:1,borderStyle:"solid",borderColor:"#e6e6e6",display:"inline-block",backgroundColor:"#fff",overflow:"hidden"},"width-animation":{animation:`${D} 0.7s ease-in-out forwards`},"spring-up-wallet":{animation:`${F} 0.7s ease-in-out forwards 2s`},"spring-up-wallet-sc":{animation:`${F} 0.7s ease-in-out forwards 2s, ${j} 0.7s ease-in-out forwards 5s`}}))),O={2:58,3:66,4:74,5:82,6:90,7:120};function N({supercoinBalance:e}){return t(v,{as:"div",styleConfig:{root:[H.chipWrapper]},children:[n("img",{src:I,alt:"supercoin_icon",width:18,height:18}),n(v,{as:"div",styleConfig:{root:[H.chipTextWrapper]},children:n(m,{variant:"B2",styleConfig:{root:[H.textWrapper]},children:e})})]})}function z({walletBalance:e}){return t(v,{as:"div",styleConfig:{root:[H.chipWrapper]},children:[n("img",{src:T,alt:"supercoin_icon",width:18,height:18}),n(v,{as:"div",styleConfig:{root:[H.chipTextWrapper]},children:t(m,{variant:"B2",styleConfig:{root:[H.textWrapper]},children:["₹",e]})})]})}function G({supercoinBalance:e,walletBalance:i,handleClick:o,chipWidthRef:r}){var a;const s=0===i&&e>0||0===e&&0===i,l=s?H["spring-up-wallet-sc"]:H["spring-up-wallet"],c=Math.max(i.toString().length,e.toString().length)+1;!function(e,n){const t=document.querySelector(":root");null==t||t.style.setProperty("--wallet-initial-width",`${e}px`);const i=O[n];null==t||t.style.setProperty("--wallet-final-width",`${Math.max(i,e)}px`)}(null!==(a=null==r?void 0:r.current)&&void 0!==a?a:0,c);const p=0===(null==r?void 0:r.current)?"auto":null==r?void 0:r.current,d=0===(null==r?void 0:r.current)?"":H["width-animation"];return n(v,{as:"div",onClick:o,children:n(v,{as:"div",styleConfig:{root:[H.pillContainer,d,{height:32,width:p}]},children:t(v,{as:"div",styleConfig:{root:[l]},children:[n(N,{supercoinBalance:e}),n(z,{walletBalance:i}),s?n(N,{supercoinBalance:e}):null]})})})}const V=r((()=>({"ba-solid":{},"bc-line-500":{},"width-18":{width:18},"height-18":{height:18},"width-44":{width:44}}))),J=s.lazy((()=>import("@cleartrip/ct-platform-supercoins-floating-island").then((e=>({default:e.SupercoinsFloatingIsland}))))),K=({supercoinsLoading:o,supercoinBurnBalance:r,ravenPayload:s={},onSupercoinsClick:g,supercoinsExpiryCount:w,renderFloatingIsland:x=!0,walletEnabled:b=!1,walletBalance:C,supercoinsFetchError:S})=>{const T=l((()=>{var e;return null!==(e=h("utm_source"))&&void 0!==e?e:"organic"}),[]),[k,E]=c(!1),[F,j]=c(0),[D,H]=c(!1),[O,N]=c(!1),[z,K]=c(!1),Q=l((()=>"number"==typeof r&&r>=0&&!o),[r,o]),[U,X]=c(!1),[Z,ee]=c(null),[ne,te]=c(!1),ie=p(0),oe="entry"===Z?B.supercoinsBalanceBackgroundColorShift:"exit"===Z?B.supercoinsBalanceBackgroundColorShift_exit:"",re="entry"===Z?B.supercoinsBalanceTextColorShift:"exit"===Z?B.supercoinsBalanceTextColorShift_exit:"";function ae(){var n;g&&"function"==typeof g&&g();const{action_event_name:t,impression_event_name:i}=s,o=e(s,["action_event_name","impression_event_name"]);y(null!==(n=t)&&void 0!==n?n:"u_ui_action",Object.assign({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:r,u_utm_source:T},o))}if(d((()=>{j(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));const e=()=>{if(window.scrollY>0){sessionStorage.getItem(W)||(te(!0),ee(null))}};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),d((()=>{if(o)return;const e=P({renderFloatingIsland:x,supercoins:r}),n="number"==typeof w&&w>=A&&!e;let t;return E(n),e&&sessionStorage.setItem("disable_floater","true"),e&&!ne?(ee("entry"),t=setTimeout((()=>{X(!0)}),1500),K(!0)):n?(K(!0),setTimeout((()=>{b&&N(!0)}),1e4)):(b&&N(!0),K(!0)),()=>{clearTimeout(t)}}),[r,w,o]),d((()=>{if(!x||!U)return;const e=setTimeout((()=>{sessionStorage.getItem(W)||(X(!1),ee("exit"),N(!0))}),M.cutoffTimeInMs);return()=>{clearTimeout(e)}}),[]),d((()=>{var n;if("number"==typeof r&&r>=0&&!o&&null!==w){const{action_event_name:t,impression_event_name:i}=s,o=e(s,["action_event_name","impression_event_name"]);y(null!==(n=i)&&void 0!==n?n:"u_impression",Object.assign({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:r,u_utm_source:T,supercoinsExpiryCount:w||"N/A"},o))}}),[o,w]),d((()=>{if(!k||F>=q)return;const e=setTimeout((()=>{H(!0);const e=setTimeout((()=>{H(!1);const e=F+1;j(e),sessionStorage.setItem("expiryAnimationCount",e.toString())}),L);return()=>clearTimeout(e)}),0===F?$:R);return()=>clearTimeout(e)}),[k,F]),S)return n(i,{});const se=()=>n(v,{as:"div",styleConfig:{root:[a["px-2"],a["br-16"],V["ba-solid"],V["bc-line-500"],a["bg-neutral-100"],a["o-hidden"],{paddingTop:6,paddingBottom:6,display:"inline-block"}]},children:t(v,{as:"div",styleConfig:{root:[a.flex,a["flex-middle"],a["flex-gap-1"]]},children:[n(f,{type:"rounded",width:18,height:18}),n(f,{type:"rounded",width:44,height:18})]})});if(_())return n(se,{});if(o||!U&&!O&&!z)return n(se,{});if(!Q)return null;const le=k?"HM4":"B2",ce=k?B.supercoinsExpiryPill:B.supercoinsBalance,pe=k?B.supercoinBurnExpiryColor:"";return O?n(G,{walletBalance:C,supercoinBalance:Number(r),handleClick:ae,chipWidthRef:ie}):t(v,{as:"div",styleConfig:{root:[{position:"relative"}]},children:[n(v,{as:"div",onClick:ae,styleConfig:{root:[ce,oe]},children:t(v,{as:"div",styleConfig:{root:[{display:"flex",alignItems:"center",gap:4}]},children:[n("img",{src:I,alt:"supercoin_icon",width:18,height:18}),t(v,{as:"div",styleConfig:{root:[B.supercoinChipWrapper]},children:[n(m,{variant:le,styleConfig:{root:[re,B.supercoinBurnTextAlign,pe]},children:D?w:r}),k&&n(m,{variant:"HM4",styleConfig:{root:[B.supercoinExpiryText,D?B.supercoinExpiryAnimating:{}]},children:"expiring soon"})]})]})}),U&&!ne&&n(v,{as:"div",styleConfig:{root:[B.superCoinsFloatingIslandContainer]},children:n(u,{fallback:n(i,{}),children:n(J,{superCoins:r,onAnimationStart:()=>function({supercoins:n,ravenPayload:t={},utmSource:i=""}){var o;const{action_event_name:r,impression_event_name:a}=t,s=e(t,["action_event_name","impression_event_name"]);y(null!==(o=a)&&void 0!==o?o:"u_impression",Object.assign({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:n,u_utm_source:i},s)),sessionStorage.setItem("islandAnimationPlayed","true"),Y()}({supercoins:r,ravenPayload:s,utmSource:T}),onAnimationEnd:function(){setTimeout((()=>{b&&N(!0)}),500),ee("exit")}})})})]})};export{K 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/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../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,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOINS_CHIP_ICON","WALLET_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","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","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","className","styles","chipWrapper","children","_jsx","src","alt","width","height","__assign","chipTextWrapper","Typography","variant","textWrapper","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","querySelector","setProperty","concat","setWalletCSSVariables","_b","current","containerClass","onClick","pillContainer","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","SupercoinsChip","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","_c","_d","walletEnabled","supercoinsFetchError","utmSource","useMemo","_e","useState","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","_f","animationCount","setAnimationCount","_g","isAnimating","setIsAnimating","_h","startWalletAnimation","setStartWalletAnimation","_j","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","_k","renderSuperCoinIsland","setRenderSuperCoinIsland","_l","chipAnimationType","setChipAnimationType","_m","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipWidthCalculatedRef","chipBackgroundAnimationClassname","supercoinsBalanceBackgroundColorShift","supercoinsBalanceBackgroundColorShift_exit","chipTextAnimationClassname","supercoinsBalanceTextColorShift","supercoinsBalanceTextColorShift_exit","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","renderSupercoinExpiry","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","SupercoinLoadingPill","paddingTop","paddingBottom","display","Shimmer","isServer","typographyVariant","chipClassName","supercoinsExpiryPill","supercoinsBalance","expiryColorClass","supercoinBurnExpiryColor","position","offsetWidth","alignItems","gap","supercoinChipWrapper","supercoinBurnTextAlign","join","supercoinExpiryText","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","Suspense","fallback","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"6ZAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,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,8hICzBO,IAAMe,EACT,sHAESC,EACT,4GAESC,EAAsC,2BAEtCC,EAAoC,wBAEpCC,EACT,6BAISC,EACkB,EADlBA,EAEK,EAFLA,EAGyB,IAHzBA,EAIkB,IAJlBA,EAKkB,KAGlBC,EAAmC,CAC5CC,mBAAoB,GACpBC,UAAW,EACXC,mBAAoB,EACpBC,eAAgB,IAChBC,mBAAmB,GCPC,SAAAC,EAA2BC,OALzCC,EAMNC,EAAoBF,EAAAE,qBACpBC,EAAUH,EAAAG,WAGV,IAAKD,EAAsB,OAAO,EAElC,GAAI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FQ,KAAK,gBAENrE,EACKf,EACAH,KAGTY,GACGtD,EAACO,EAAUF,EAAA,CACPG,QAAQ,MACRZ,UAAW,GAAA6B,OAAG5B,EAAOqI,oBAAmB,KAAAzG,OAAImC,EAAc/D,EAAOsI,yBAA2B,KAGnF,CAAApI,SAAA,8BAM5BuE,KAA0BM,IACvB5E,EAAA,MAAAK,EAAA,CAAKT,UAAWC,EAAOuI,mCACnB,CAAArI,SAAAC,EAACqI,EAAQhI,EAAA,CAACiI,SAAUtI,SAChB,CAAAD,SAAAC,EAACgC,EAA4B,CACzBuG,WAAY7F,EACZ8F,iBAAkB,WACd,OHjV1B,SAAiCpK,SACnCG,EAAUH,EAAAG,WACVuE,EAAiB1E,EAAAuE,aAAjBA,OAAe,IAAAG,EAAA,CAAE,EAAAA,EACjBC,EAAc3E,EAAA8E,UAAdA,OAAS,IAAAH,EAAG,GAAEA,EAKVJ,EADqB4C,sBAAEC,EACvB7C,EAD4C6C,sBAAKC,EACjDC,EAAA/C,EADE,CAAA,oBAAA,0BAENgD,EAAqD,QAApChE,EAAA6D,SAAoC,IAAA7D,EAAAA,EAAA,kBACjDiE,YAAa,8BACbC,UAAW,mBACXC,kBAAmBvH,EACnBwH,aAAc7C,GACXuC,IAIPtG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CG2TgCqJ,CAAuB,CACnBlK,WAAYmE,EACZC,aAAYA,EACZO,UAASA,KAGjBwF,eAvSxB,WACIhC,YAAW,WACH1D,GAAegB,GAAwB,EAC9C,GAAE,KACHU,GAAqB,OACxB,aAySL","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ct-platform-supercoins-chip.esm.js","sources":["../packages/components/SupercoinsChip/src/index.module.ts","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.module.ts","../packages/components/SupercoinsChip/src/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["supercoin_chip_loading_shimmer","keyframes","left","supercoins_balance_background_color_shift","backgroundColor","supercoins_balance_background_color_shift_exit","supercoins_balance_text_color_shift","color","supercoins_balance_text_color_shift_exit","styles","makeWebStyles","supercoinsBalance","paddingTop","paddingRight","paddingBottom","paddingLeft","borderRadius","borderWidth","borderStyle","borderColor","display","overflow","supercoinsExpiryPill","supercoinChipWrapper","alignItems","justifyContent","supercoinBurnTextAlign","lineHeight","marginRight","supercoinBurnExpiryColor","supercoinExpiryText","whiteSpace","width","opacity","transition","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","position","marginLeft","supercoinsBalanceBackgroundColorShift","animation","content","top","height","background","transform","supercoinsBalanceTextColorShift","supercoinsBalanceBackgroundColorShift_exit","supercoinsBalanceTextColorShift_exit","SUPERCOINS_CHIP_ICON","WALLET_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","expiry","getExpiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","springUp1","springUp2","widthAnimation","chipWrapper","gap","marginBottom","textAlign","chipTextWrapper","textWrapper","pillContainer","boxSizing","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","Container","as","styleConfig","root","children","_jsx","src","alt","Typography","variant","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","document","querySelector","style","setProperty","setWalletCSSVariables","_a","current","containerClass","onClick","staticStyles","makeStyles","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","SupercoinsChip","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","walletEnabled","supercoinsFetchError","utmSource","useMemo","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","useState","animationCount","setAnimationCount","isAnimating","setIsAnimating","startWalletAnimation","setStartWalletAnimation","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","renderSuperCoinIsland","setRenderSuperCoinIsland","chipAnimationType","setChipAnimationType","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipBackgroundAnimationClassname","chipTextAnimationClassname","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","shouldRender","renderSupercoinExpiry","timeout","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","SupercoinLoadingPill","gs","Shimmer","type","isServer","typographyVariant","chipClassName","expiryColorClass","Suspense","fallback","_Fragment","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"+kBAEA,MAAMA,EAAiCC,EAAU,CAC/C,KAAM,CACJC,KAAM,QAER,OAAQ,CACNA,KAAM,UAIJC,EAA4CF,EAAU,CAC1D,KAAM,CACJG,gBAAiB,yBAEnB,OAAQ,CACNA,gBAAiB,aAIfC,EAAiDJ,EAAU,CAC/D,KAAM,CACJG,gBAAiB,WAEnB,OAAQ,CACNA,gBAAiB,WAIfE,EAAsCL,EAAU,CACpD,KAAM,CACJM,MAAO,QAET,OAAQ,CACNA,MAAO,UAILC,EAA2CP,EAAU,CACzD,KAAM,CACJM,MAAO,QAET,OAAQ,CACNA,MAAO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IZ,MAAMwB,kBAAEA,EAAiBC,sBAAEA,GACvB9B,EADiD+B,EACjDC,EAAAhC,EADE,CAAA,oBAAA,0BAENiC,EAAqD,QAApClD,EAAA+C,SAAoC,IAAA/C,EAAAA,EAAA,8BACjDmD,YAAa,8BACbC,UAAW,mBACXC,kBAAmBnH,EACnBoH,aAAchC,GACX0B,IAIPhG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CI8WgCkI,CAAuB,CACnBjJ,WAAY8E,EACZC,eACAK,cAGR8D,eArUxB,WACInB,YAAW,KACH7C,GAAeY,GAAwB,EAAK,GACjD,KACHO,GAAqB,OACxB,UAsUC"}
@@ -0,0 +1,16 @@
1
+ declare const styles: import("@cleartrip/ct-design-types").NamedStyles<{
2
+ supercoinsBalance: unknown;
3
+ supercoinsExpiryPill: unknown;
4
+ supercoinChipWrapper: unknown;
5
+ supercoinBurnTextAlign: unknown;
6
+ supercoinBurnExpiryColor: unknown;
7
+ supercoinExpiryText: unknown;
8
+ supercoinExpiryAnimating: unknown;
9
+ superCoinsFloatingIslandContainer: unknown;
10
+ supercoinsBalanceBackgroundColorShift: unknown;
11
+ supercoinsBalanceTextColorShift: unknown;
12
+ supercoinsBalanceBackgroundColorShift_exit: unknown;
13
+ supercoinsBalanceTextColorShift_exit: unknown;
14
+ }>;
15
+ export default styles;
16
+ //# sourceMappingURL=index.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.module.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/index.module.ts"],"names":[],"mappings":"AAiDA,QAAA,MAAM,MAAM;;;;;;;;;;;;;EAoGT,CAAC;AAEJ,eAAe,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/SupercoinsChip/src/walletAnimation/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAMhD,UAAU,gBAAgB;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;CAC1C;AAsCD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACpC,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,YAAY,GACf,EAAE,gBAAgB,2CA0ClB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/SupercoinsChip/src/walletAnimation/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAShD,UAAU,gBAAgB;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;CAC1C;AAkDD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACpC,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,YAAY,GACf,EAAE,gBAAgB,2CA6ClB"}
@@ -0,0 +1,11 @@
1
+ declare const styles: import("@cleartrip/ct-design-types").NamedStyles<{
2
+ chipWrapper: unknown;
3
+ chipTextWrapper: unknown;
4
+ textWrapper: unknown;
5
+ pillContainer: unknown;
6
+ 'width-animation': unknown;
7
+ 'spring-up-wallet': unknown;
8
+ 'spring-up-wallet-sc': unknown;
9
+ }>;
10
+ export default styles;
11
+ //# sourceMappingURL=index.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.module.d.ts","sourceRoot":"","sources":["../../packages/components/SupercoinsChip/src/walletAnimation/index.module.ts"],"names":[],"mappings":"AA2CA,QAAA,MAAM,MAAM;;;;;;;;EAmDT,CAAC;AAEJ,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleartrip/ct-platform-supercoins-chip",
3
- "version": "2.3.34",
3
+ "version": "6.0.1-beta.0",
4
4
  "description": "SuperCoins Chip Component",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/ct-platform-supercoins-chip.cjs.js",
@@ -10,15 +10,15 @@
10
10
  "dist"
11
11
  ],
12
12
  "dependencies": {
13
- "@cleartrip/ct-design-typography": "2.6.0",
14
- "@cleartrip/ct-platform-shimmer": "4.3.34",
15
- "@cleartrip/ct-platform-utils": "4.3.34",
16
- "@cleartrip/ct-platform-supercoins-floating-island": "2.3.34"
13
+ "@cleartrip/ct-platform-supercoins-floating-island": "6.0.1-beta.0",
14
+ "@cleartrip/ct-platform-utils": "6.0.1-beta.0",
15
+ "@cleartrip/ct-platform-shimmer": "6.0.1-beta.0"
17
16
  },
18
17
  "peerDependencies": {
19
18
  "react": ">=16.8.0",
20
19
  "react-dom": ">=16.8.0",
21
- "styled-components": "^6.1.8"
20
+ "@cleartrip/ct-design-typography": "5.27.0-SNAPSHOT-native-main.0",
21
+ "@cleartrip/ct-design-types": "5.27.0-SNAPSHOT-native-main.0"
22
22
  },
23
23
  "author": "Cleartrip",
24
24
  "license": "ISC",