(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8946],{8641:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/tiff-to-pdf",function(){return n(9245)}])},9245:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return Z}});var a=n(5893),i=n(9008),l=n.n(i),s=n(7294),o=n(3658),r=n(2125),c=n(5518),d=n(8493),h=n(6963),g=n(9628),p=n(7694),u=n(9822),x=n(386),m=n(7311),f=n(5135),v=n(2711),j=n(7984),F=n(3555),P=n(6294),S=n(1169),T=(n(41),n(9072)),I=n(7858),y=n(842),D=n(4996),C=n(6640),w=n(3115),_=n.n(w),N=n(3260),R=n.n(N),b=n(1163),E=n(5498);var Z=!0;t.default=e=>{let{myData:t}=e;const n=(0,b.useRouter)().asPath,{TIFFToPDFTool:i}=(0,D.Z)(),[w,N]=(0,s.useState)(!1),[Z,A]=(0,s.useState)(0),M=(0,s.useRef)(!1),[k,O]=(0,s.useState)(0),[z,U]=(0,s.useState)({}),[L,q]=(0,s.useState)(!0),[B,G]=(0,s.useState)();const{pages:K,hoverIndex:X,insertIndex:V,handleResetInitialState:W,handleAddPage:Y,handleClearPageSelection:H,handlePageSelection:J,handleRemovePageSelection:Q,handlePagesSelection:$,handleRotatePageRight:ee,handleRotateSelectedPagesToRight:te,handleMarginChange:ne,handleDeleteSelectedPages:ae,handleSetInsertIndex:ie,handleRearrangePages:le,handleDeletePage:se,handleUpdateDocument:oe,handleOrientationChange:re,handlePageSizeChange:ce}=(0,y.Z)(),{resultsInfoVisibility:de,resultsErrors:he,handleResetInitialUploadState:ge,handleResetCurrentUploadingStatus:pe,handleUpdateResultsDisplay:ue}=(0,C.Z)(),xe=e=>{(0,x.fG)(e,O,Y,undefined,M,i),e.target.value=null};(0,s.useEffect)((()=>{M.current=!0;const e=new AbortController,t=e.signal;return G(t),U({container:document.body,getScrollPosition:()=>[document.body.scrollLeft,document.body.scrollTop],throttleTime:0,threshold:0}),()=>{e.abort(),M.current=!1}}),[]),(0,s.useEffect)((()=>{k>0?M.current&&N(!0):M.current&&N(!1)}),[k]),(0,s.useEffect)((()=>{K.length<=0?A(0):A(1)}),[K.length]);const me=(0,a.jsx)(d.W,{backend:c.tq?g.zr:h.PD,options:c.tq?{scrollAngleRanges:[{start:30,end:150},{start:210,end:330}]}:null,children:(0,a.jsxs)("div",{className:"previewer_content ".concat(R().previewer_content," d-flex flex-wrap ").concat(R().previewer_content_scrollable),children:[!c.tq&&(0,a.jsx)(p.ZP,{dragContainer:".previewer_content",selectableTargets:[".preview"],selectByClick:!1,selectFromInside:!1,toggleContinueSelect:["ctrl"],boundContainer:!1,hitRate:0,ratio:0,onSelectStart:e=>{K.filter((e=>!0===e.selected)).length>0&&!e.inputEvent.ctrlKey&&H()},onSelect:e=>{e.added.forEach((e=>{const t=parseInt(e.getAttribute("data-index"));J(t)})),e.removed.forEach((t=>{const n=parseInt(t.getAttribute("data-index"));0===e.selected.length?H():Q(n)}))},scrollOptions:z,onScroll:e=>{document.body.scrollBy(10*e.direction[0],10*e.direction[1])}}),(0,a.jsx)(u.Z,{}),K.map(((e,t)=>{const n=X===t&&V===t,i=X===t&&V===t+1;return(0,a.jsx)(F.Z,{index:t,page:e,selectedPages:K.filter((e=>!0===e.selected)),handleRearrangePages:le,handleSetInsertIndex:ie,onSelectionChange:$,handleClearPageSelection:H,insertLineOnLeft:n,insertLineOnRight:i,handleDeletePage:()=>se(e.id),handleRotatePageRight:t=>{t.stopPropagation(),ee(e.id)}},"page-"+e.id)}))]})});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(l(),{children:[t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("meta",{property:"og:title",content:t.ogTitle}),(0,a.jsx)("meta",{property:"og:description",content:t.ogDescription}),(0,a.jsx)("meta",{property:"og:image",content:t.ogImage}),(0,a.jsx)("meta",{property:"og:image:alt",content:t.ogImageAlt})]}),(0,a.jsx)("title",{children:t.metaTitle?t.metaTitle:t.title}),(0,a.jsx)("meta",{name:"description",content:t.metaDescription?t.metaDescription:t.shortDescription}),(0,a.jsx)("meta",{name:"Keywords",content:"TIFF to PDF converter, online TIFF to PDF converter, convert TIFF to PDF, free TIFF to PDF converter, TIFF to PDF conversion, TIFF to PDF online converter"}),(0,a.jsx)("link",{rel:"canonical",href:"".concat(E.G).concat(n)},"canonical")]}),(0,a.jsxs)("main",{children:[(0,a.jsxs)("header",{className:" mb-0",children:[(0,a.jsx)("h1",{className:"text-center text-[##262323] text-[40px] font-[800]",children:null===t||void 0===t?void 0:t.title}),(0,a.jsx)("p",{className:"text-[##6F6767] text-center text-[16px] leading-[22px] font-[400] mt-[16px]",children:null===t||void 0===t?void 0:t.shortDescription})]}),(0,a.jsx)("section",{className:"page_section mt-0",children:(0,a.jsx)("article",{className:"container",children:(0,a.jsxs)("section",{className:_().tool_container_wrapper,children:[0===Z&&(0,a.jsx)(I.Z,{handleChange:xe,isSpinnerActive:w,isMultipleInput:!0,acceptedMimeType:i.acceptedInputMimeType}),1===Z&&(0,a.jsx)(S.Z,{acceptedMimeType:i.acceptedInputMimeType,files:K,enableAddingMoreFiles:!0,filesComponents:me,handleChange:xe,isSpinnerActive:w,isMultipleInput:!0,deleteFiles:ae,rotateFilesToRight:te,action:async()=>{pe(),A(2);const{successfullyConvertedFiles:e,failedFiles:t}=await(0,x.GE)(i.outputFileMimeType,B,K,oe,i.URI);e.length===K.length?ue(!0,[]):t.length===K.length?ue(!1,t):ue(!0,t),A(3)},actionTitle:"Convert To PDF",handleCheckboxChange:e=>{q(e.target.checked)},handleMarginChange:ne,handleOrientationChange:re,handlePageSizeChange:ce,mergePages:L}),2===Z&&(0,a.jsx)(P.Z,{progress:"Converting Images To PDF"}),3===Z&&(0,a.jsxs)(v.Z,{title:"Your images conversion is complete!",handleDownload:()=>{L?(0,x.ME)(K,i.newFileNameSuffix):(0,x.wj)(K)},handleResetInitialState:()=>{W(),ge(),q(!0),A(0)},children:[de&&(0,a.jsx)("div",{className:"row w-100 d-flex justify-content-center text-center mt-5 mb-5",children:(0,a.jsx)(o.Z,{size:130,color:"#EE1B22"})}),he.length>0&&(0,a.jsx)(f.Z,{alerts:he,type:"error",icon:(0,a.jsx)(r.Z,{size:22})})]})]})})}),(0,a.jsx)(T.Z,{title:null===t||void 0===t?void 0:t.stepDescription,stepsArray:(null===t||void 0===t?void 0:t.Steps)&&t.Steps.map(((e,t)=>({number:t+1,description:e.title})))}),(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.Z,{title:null===t||void 0===t?void 0:t.featuresTitle,featuresArray:(null===t||void 0===t?void 0:t.Features)&&t.Features.map((e=>({title:e.title,description:e.description,icon:e.icon})))})}),(0,a.jsx)("section",{className:" ",children:(0,a.jsx)("article",{className:"mt-[100px] ",children:(0,a.jsxs)("div",{className:"lg:flex ",children:[(0,a.jsx)("header",{className:"",children:(0,a.jsx)("h4",{className:"text-[#262323] lg:w-[200%] text-[32px] font-[600] tracking-wide",children:null===t||void 0===t?void 0:t.longDescriptionTitle})}),(0,a.jsx)("section",{className:"lg:ml-[220px] text-[16px] font-[400] leading-[24px] lg:mt-0 mt-5 text-[##6F6767]",children:(null===t||void 0===t?void 0:t.longDescription)&&(0,m.ZP)(t.longDescription)})]})})})]})]})}}},function(e){e.O(0,[7311,2657,7943,2080,7961,8720,7418,3891,2888,9774,179],(function(){return t=8641,e(e.s=t);var t}));var t=e.O();_N_E=t}]);