<|start_filename|>tests/reference-check.js<|end_filename|>
describe('Check Conversational Form in global scope', function() {
	it('Should exist', function() {
		expect(window.cf.ConversationalForm).not.toBeNull();

		var instance = window.cf.ConversationalForm.startTheConversation({
			formEl: document.createElement("form")
		});
	
		expect(instance).not.toBeNull();
	});
});

<|start_filename|>tests/tag-validation.js<|end_filename|>
describe('Validate tag attributes', function() {

	var instance = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
			"submitCallback": function(){

			}
		},
		"tags": [
			{
				"tag": "input",
				"type": "text",
				"name": "max-min-length",
				"minlength": 5,
				"maxlength": 15,
			}
		]
	});

	var instanceMinMaxValue = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
			"submitCallback": function(){

			}
		},
		"tags": [
			{
				"tag": "input",
				"type": "number",
				"name": "max-min-value",
				"min": 4,
				"max": 6,
				"required": true
			},
		]
	});

	var instanceMinValue = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
			"submitCallback": function(){

			}
		},
		"tags": [
			{
				"tag": "input",
				"type": "number",
				"name": "max-min-value",
				"min": 4,
				"required": true
			},
		]
	});

	var instanceMaxValue = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
			"submitCallback": function(){

			}
		},
		"tags": [
			{
				"tag": "input",
				"type": "number",
				"name": "max-min-value",
				"max": 4,
				"required": true
			},
		]
	});

	var instancePhone = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
			"submitCallback": function(){

			}
		},
		"tags": [
			{
				"tag": "input",
				"type": "tel",
				"name": "telWithPattern",
				"pattern": "[0-9]{3}-[0-9]{3}-[0-9]{4}",
				"required": true
			},
		]
	});

	var instanceEmail = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
			"submitCallback": function(){

			}
		},
		"tags": [
			{
				"tag": "input",
				"type": "email",
				"name": "email",
			},
		]
	});

	var instanceEmailRequired = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
			"submitCallback": function(){

			}
		},
		"tags": [
			{
				"tag": "input",
				"type": "email",
				"name": "email",
				"required": true,
			},
		]
	});

	var instanceEmailWithCustomPattern = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
			"submitCallback": function(){

			}
		},
		"tags": [
			{
				"tag": "input",
				"type": "email",
				"name": "email",
				"pattern": "[0-9]{3}-[0-9]{3}-[0-9]{4}",
			},
		]
	});
	
	var instanceTextRequired = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
			"submitCallback": function(){

			}
		},
		"tags": [
			{
				"tag": "input",
				"type": "text",
				"name": "firstname",
				"required": true,
			},
		]
	});

	it('max+min-length test', function(done) {
		// under min
		var isValid = instance.tags[0].setTagValueAndIsValid({text: "0123"});
		expect(isValid).toBe(false);

		// over max
		var isValid = instance.tags[0].setTagValueAndIsValid({text: "0123456789123456789"});
		expect(isValid).toBe(false);

		//expect to fail

		var isValid = instance.tags[0].setTagValueAndIsValid({text: "0123456789"});
		expect(isValid).toBe(true);

		done();
	});

	it('min + max value test', function(done) {
		// under min
		var isValid = instanceMinMaxValue.tags[0].setTagValueAndIsValid({text: "1"});
		expect(isValid).toBe(false);

		// over max
		var isValid = instanceMinMaxValue.tags[0].setTagValueAndIsValid({text: "10000"});
		expect(isValid).toBe(false);

		var isValid = instanceMinMaxValue.tags[0].setTagValueAndIsValid({text: "5"});
		expect(isValid).toBe(true);

		done();
	});

	it('min value test', function(done) {
		// under min
		var isValid = instanceMinValue.tags[0].setTagValueAndIsValid({text: "1"});
		expect(isValid).toBe(false);

		// == min
		var isValid = instanceMinValue.tags[0].setTagValueAndIsValid({text: "4"});
		expect(isValid).toBe(true);

		var isValid = instanceMinValue.tags[0].setTagValueAndIsValid({text: "100"});
		expect(isValid).toBe(true);

		done();
	});

	it('max value test', function(done) {
		// over max
		var isValid = instanceMaxValue.tags[0].setTagValueAndIsValid({text: "5"});
		expect(isValid).toBe(false);

		// == max
		var isValid = instanceMaxValue.tags[0].setTagValueAndIsValid({text: "4"});
		expect(isValid).toBe(true);

		// < max
		var isValid = instanceMaxValue.tags[0].setTagValueAndIsValid({text: "2"});
		expect(isValid).toBe(true);

		done();
	});

	it('tel with pattern', function(done) {
		var isValid = instancePhone.tags[0].setTagValueAndIsValid({text: "123123"});
		expect(isValid).toBe(false);

		var isValid = instancePhone.tags[0].setTagValueAndIsValid({text: "123 123 1234"});
		expect(isValid).toBe(false);
		
		var isValid = instancePhone.tags[0].setTagValueAndIsValid({text: "123 123 123"});
		expect(isValid).toBe(false);
		
		var isValid = instancePhone.tags[0].setTagValueAndIsValid({text: "123 123 1234"});
		expect(isValid).toBe(false);
		
		var isValid = instancePhone.tags[0].setTagValueAndIsValid({text: "123-123-1234"});
		expect(isValid).toBe(true);

		done();
	});
	
	it('email', function(done) {
		var isValid = instanceEmail.tags[0].setTagValueAndIsValid({text: "inputting something but regrets"});
		expect(isValid).toBe(false);

		var isValid = instanceEmail.tags[0].setTagValueAndIsValid({text: ""});
		expect(isValid).toBe(true);

		var isValid = instanceEmail.tags[0].setTagValueAndIsValid({text: "jens"});
		expect(isValid).toBe(false);
		
		var isValid = instanceEmail.tags[0].setTagValueAndIsValid({text: "jens@"});
		expect(isValid).toBe(false);
		
		var isValid = instanceEmail.tags[0].setTagValueAndIsValid({text: "<EMAIL>"});
		expect(isValid).toBe(false);
		
		var isValid = instanceEmail.tags[0].setTagValueAndIsValid({text: "<EMAIL>"});
		expect(isValid).toBe(false);

		var isValid = instanceEmail.tags[0].setTagValueAndIsValid({text: "<EMAIL>"});
		expect(isValid).toBe(true);

		done();
	});

	it('email required', function(done) {
		var isValid = instanceEmailRequired.tags[0].setTagValueAndIsValid({text: ""});
		expect(isValid).toBe(false);
		
		var isValid = instanceEmailRequired.tags[0].setTagValueAndIsValid({text: "jens"});
		expect(isValid).toBe(false);
		
		var isValid = instanceEmailRequired.tags[0].setTagValueAndIsValid({text: "jens@"});
		expect(isValid).toBe(false);
		
		var isValid = instanceEmailRequired.tags[0].setTagValueAndIsValid({text: "<EMAIL>"});
		expect(isValid).toBe(false);
		
		var isValid = instanceEmailRequired.tags[0].setTagValueAndIsValid({text: "<EMAIL>"});
		expect(isValid).toBe(false);

		var isValid = instanceEmailRequired.tags[0].setTagValueAndIsValid({text: "<EMAIL>"});
		expect(isValid).toBe(true);

		done();
	});
	
	it('email with custom pattern', function(done) {
		var isValid = instanceEmailWithCustomPattern.tags[0].setTagValueAndIsValid({text: "jens"});
		expect(isValid).toBe(false);
		
		var isValid = instanceEmailWithCustomPattern.tags[0].setTagValueAndIsValid({text: "jens@"});
		expect(isValid).toBe(false);
		
		var isValid = instanceEmailWithCustomPattern.tags[0].setTagValueAndIsValid({text: "<EMAIL>"});
		expect(isValid).toBe(false);
		
		var isValid = instanceEmailWithCustomPattern.tags[0].setTagValueAndIsValid({text: "<EMAIL>"});
		expect(isValid).toBe(false);

		var isValid = instanceEmailWithCustomPattern.tags[0].setTagValueAndIsValid({text: "123-456-7890"});
		expect(isValid).toBe(true);

		done();
	});
	
	it('text required', function(done) {
		var isValid = instanceTextRequired.tags[0].setTagValueAndIsValid({text: ""});
		expect(isValid).toBe(false);
	
		var isValid = instanceTextRequired.tags[0].setTagValueAndIsValid({text: "Jens"});
		expect(isValid).toBe(true);

		done();
	});
});

<|start_filename|>tests/theme-option.js<|end_filename|>
describe('Test theme option', function() {
    var tags = [
        {
            "tag": "input",
            "type": "text",
            "name": "max-min-length",
            "minlength": 5,
            "maxlength": 15,
        }
    ];

	var instanceDefault = window.cf.ConversationalForm.startTheConversation({
		"options": {
            formEl: document.createElement("form"),
			"submitCallback": function(){}
		},
		"tags": tags
    });
    
	var instanceDark = window.cf.ConversationalForm.startTheConversation({
		"options": {
            theme: 'dark',
			formEl: document.createElement("form"),
			"submitCallback": function(){}
		},
		"tags": tags
	});
    
	var instanceGreen = window.cf.ConversationalForm.startTheConversation({
		"options": {
            theme: 'green',
			formEl: document.createElement("form"),
			"submitCallback": function(){}
		},
		"tags": tags
	});
    
    var instanceBlue = window.cf.ConversationalForm.startTheConversation({
		"options": {
            theme: 'blue',
			formEl: document.createElement("form"),
			"submitCallback": function(){}
		},
		"tags": tags
	});
    
    var instancePurple = window.cf.ConversationalForm.startTheConversation({
		"options": {
            theme: 'purple',
			formEl: document.createElement("form"),
			"submitCallback": function(){}
		},
		"tags": tags
	});
    
    var instanceRed = window.cf.ConversationalForm.startTheConversation({
		"options": {
            theme: 'red',
			formEl: document.createElement("form"),
			"submitCallback": function(){}
		},
		"tags": tags
	});
    
    var instanceWrongTheme = window.cf.ConversationalForm.startTheConversation({
		"options": {
            theme: 'some-non-existent-theme',
			formEl: document.createElement("form"),
			"submitCallback": function(){}
		},
		"tags": tags
	});

	it('Theme should be default (light)', function() {
		expect(instanceDefault.theme).toEqual('conversational-form.min.css');
	});
    
    it('Theme should be "dark"', function() {
		expect(instanceDark.theme).toEqual('conversational-form-dark.min.css');
	});
    
    it('Theme should be "green"', function() {
		expect(instanceGreen.theme).toEqual('conversational-form-green.min.css');
	});
    
    it('Theme should be "blue"', function() {
		expect(instanceBlue.theme).toEqual('conversational-form-irisblue.min.css');
	});
    
    it('Theme should be "purple"', function() {
		expect(instancePurple.theme).toEqual('conversational-form-purple.min.css');
	});
    
    it('Theme should be "red"', function() {
		expect(instanceRed.theme).toEqual('conversational-form-red.min.css');
	});
    
    it('Theme should be "default" because wrong option provided', function() {
		expect(instanceWrongTheme.theme).toEqual('conversational-form.min.css');
	});
    
    it('cdn path should not be relative', function() {
		expect(instanceDefault.cdnPath).toContain('https://cdn.jsdelivr.net/gh/space10-community/conversational-form');
	});
});


<|start_filename|>tests/option-preventSubmitOnEnter.js<|end_filename|>
describe('Validate tag attributes', function() {

	var preventSubmitOnEnterTestInstance = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
			preventSubmitOnEnter: true,
		},
		"tags": [
			{
				"tag": "input",
				"type": "text",
				"name": "somefield32434"
			}
		]
	});

	it('max+min-length test', function(done) {
		expect(preventSubmitOnEnterTestInstance.preventSubmitOnEnter).toBe(true);
		done();
	});

	var preventSubmitOnEnterTestInstanceFalse = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
			preventSubmitOnEnter: false,
		},
		"tags": [
			{
				"tag": "input",
				"type": "text",
				"name": "somefield32434234324"
			}
		]
	});

	it('max+min-length test', function(done) {
		expect(preventSubmitOnEnterTestInstanceFalse.preventSubmitOnEnter).toBe(false);
		done();
	});

	var preventSubmitOnEnterTestInstanceNotSet = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form"),
		},
		"tags": [
			{
				"tag": "input",
				"type": "text",
				"name": "somefield123"
			}
		]
	});

	it('max+min-length test', function(done) {
		expect(preventSubmitOnEnterTestInstanceNotSet.preventSubmitOnEnter).not.toBe(true);
		done();
	});
});

<|start_filename|>landingpage/conversational-form-dark.css<|end_filename|>
@charset "UTF-8";
.conversational-form {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; }

/**
 * Source: https://gist.github.com/certainlyakey/e9c0d8f5c87ff47e3d5b
 */
/**
 * Source: https://gist.github.com/certainlyakey/e9c0d8f5c87ff47e3d5b
 */
/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
.conversational-form {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  visibility: visible !important;
  font-family: "Helvetica Neue", "Neue Helvetica W01", Helvetica, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  font-size: 18px;
  line-height: 22px;
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  z-index: 999;
  margin: auto;
  background: #2C2C2E;
  overflow: hidden;
  opacity: 0;
  will-change: opacity; }
  .conversational-form *, .conversational-form *:before, .conversational-form *:after {
    box-sizing: border-box;
    outline: none; }
  .conversational-form:before {
    content: "";
    width: 100%;
    height: 50px;
    pointer-events: none;
    background: linear-gradient(to bottom, #2c2c2e 0%, rgba(44, 44, 46, 0) 100%);
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 2; }
  .conversational-form button {
    border: none;
    background: none;
    margin: 0px;
    padding: 0px;
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important; }
  .conversational-form menu {
    padding: 0px;
    margin: 0px; }
  .conversational-form ul, .conversational-form ol, .conversational-form li {
    margin: 0;
    padding: 0; }
  .conversational-form a, .conversational-form a:active, .conversational-form a:visited {
    color: currentColor; }
  .conversational-form button, .conversational-form a {
    cursor: pointer; }
  @media (max-width: 1152px) {
    .conversational-form {
      font-size: 16px;
      line-height: 20px; } }
  .conversational-form .conversational-form-inner {
    padding: 0px 20px;
    position: absolute;
    width: 100%;
    min-height: 100%;
    max-height: 100%;
    bottom: 0px;
    height: auto;
    overflow: hidden;
    margin-bottom: auto;
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-end;
    align-items: baseline; }
    @media (max-width: 1152px) {
      .conversational-form .conversational-form-inner {
        padding: 0px 14px; } }
  .conversational-form--enable-animation .conversational-form {
    transition: opacity 0.1875s cubic-bezier(0.215, 0.61, 0.355, 1); }
  .conversational-form * {
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
    tap-highlight-color: rgba(255, 255, 255, 0); }

.conversational-form--show {
  opacity: 1; }

/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
cf-info {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  left: 0;
  top: 25%;
  height: auto;
  width: 100%;
  text-overflow: ellipsis;
  padding-right: 20px;
  margin-top: 12px;
  overflow: hidden;
  display: block;
  transform: translateY(-115%);
  color: #d3d3d1;
  opacity: 1;
  will-change: opacity;
  font-size: 12px; }
  cf-info.show {
    opacity: 1; }
    .conversational-form--enable-animation cf-info.show {
      transition: opacity 0.75s cubic-bezier(0.215, 0.61, 0.355, 1); }

/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
cf-input {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  margin-bottom: 20px;
  margin-top: 0px;
  flex: 0 0 auto;
  background: #2C2C2E; }
  @media (max-width: 1152px) {
    cf-input {
      margin-bottom: 14px; } }
  cf-input .inputWrapper {
    position: relative; }
  cf-input.animate-in input, cf-input.animate-in textarea {
    transition-delay: 0s, 0s, 0s, 0.4s, 0.4s;
    opacity: 1;
    transform: translateY(0px) rotateX(0deg); }
  cf-input.animate-in cf-input-button.cf-input-button {
    transition-delay: 0s, 0s 0.75s;
    transform: scale(1, 1); }
  cf-input input, cf-input textarea {
    resize: none;
    overflow: hidden;
    padding: calc((60px - 4px - 18px)/2) 60px calc((60px - 4px - 18px)/2) calc((60px - 2px - 18px)/2); }
  cf-input input, cf-input textarea {
    outline: none;
    -webkit-appearance: none;
    -webkit-touch-callout: auto !important;
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    user-select: auto !important;
    border-radius: 0px;
    border: none;
    -webkit-appearance: none;
    position: relative;
    z-index: 2;
    display: block;
    font-family: "Helvetica Neue", "Neue Helvetica W01", Helvetica, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    font-size: 18px;
    width: 100%;
    height: 60px;
    min-height: 60px;
    color: #464957;
    will-change: box-shadow, background, color, transform, opacity;
    background: white;
    box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(40px) rotateX(-40deg);
    transition: all 0.3125s !important; }
    cf-input input:-webkit-autofill, cf-input textarea:-webkit-autofill {
      background-color: white; }
    cf-input input:focus, cf-input input:active, cf-input textarea:focus, cf-input textarea:active {
      box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
    .conversational-form--enable-animation cf-input input, .conversational-form--enable-animation cf-input textarea {
      transition: box-shadow 0.75s cubic-bezier(0.215, 0.61, 0.355, 1), background 0.75s cubic-bezier(0.215, 0.61, 0.355, 1), color 0.75s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.375s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s, opacity 0.375s cubic-bezier(0.215, 0.61, 0.355, 1) 0s; }
    cf-input input:hover::-webkit-input-placeholder, cf-input textarea:hover::-webkit-input-placeholder {
      color: #020202; }
    cf-input input:hover::-moz-input-placeholder, cf-input textarea:hover::-moz-input-placeholder {
      color: #020202; }
    cf-input input:hover:-moz-input-placeholder, cf-input textarea:hover:-moz-input-placeholder {
      color: #020202; }
    cf-input input:hover:-ms-input-placeholder, cf-input textarea:hover:-ms-input-placeholder {
      color: #020202; }
    cf-input input::-webkit-input-placeholder, cf-input textarea::-webkit-input-placeholder {
      color: currentColor; }
    cf-input input::-moz-input-placeholder, cf-input textarea::-moz-input-placeholder {
      color: currentColor; }
    cf-input input:-moz-input-placeholder, cf-input textarea:-moz-input-placeholder {
      color: currentColor; }
    cf-input input:-ms-input-placeholder, cf-input textarea:-ms-input-placeholder {
      color: currentColor; }
    cf-input input[no-animations], cf-input textarea[no-animations] {
      transition: none !important; }
    cf-input input[rows='1'], cf-input textarea[rows='1'] {
      min-height: 60px !important; }
    cf-input input:not([rows="1"]), cf-input textarea:not([rows="1"]) {
      transition-delay: 0.9s !important; }
    cf-input input[rows="2"], cf-input textarea[rows="2"] {
      min-height: 80px !important; }
    cf-input input[rows="3"], cf-input textarea[rows="3"] {
      min-height: 100px !important; }
    cf-input input[rows="4"], cf-input textarea[rows="4"] {
      min-height: 120px !important; }
    cf-input input[rows="5"], cf-input textarea[rows="5"] {
      min-height: 140px !important; }
    cf-input input[rows="6"], cf-input textarea[rows="6"] {
      min-height: 160px !important; }
  cf-input.hide-input input, cf-input.hide-input textarea {
    display: none; }
  cf-input.hide-input cf-input-button {
    display: none; }
  cf-input[disabled="disabled"] {
    pointer-events: none; }
    cf-input[disabled="disabled"] input, cf-input[disabled="disabled"] textarea {
      background: rgba(229, 230, 234, 0.5); }
    cf-input[disabled="disabled"] .cf-input-button {
      background: rgba(229, 230, 234, 0.75); }
  cf-input cf-icon-audio-eq {
    display: block;
    border: 0px solid grey;
    border-color: #E5E6EA;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: 0;
    position: absolute;
    top: 0px;
    left: 0px; }
  cf-input[error] {
    pointer-events: none; }
    cf-input[error] input, cf-input[error] textarea {
      background: #ffebe9;
      color: #fe8d84; }
    cf-input[error] .cf-input-button {
      background: #ffebe9; }
      cf-input[error] .cf-input-button svg polygon {
        fill: #fe8d84; }
  cf-input[message] input, cf-input[message] textarea {
    background: #E5E6EA;
    color: #4a4a4a; }
  cf-input[message] .cf-input-button {
    background: #E5E6EA; }
    cf-input[message] .cf-input-button svg polygon {
      fill: #4a4a4a; }
  cf-input[tag-type="file"] cf-input-button.cf-input-button.loading:after {
    content: "";
    display: block;
    position: relative;
    left: calc(50% - (60px / 4));
    top: calc(50% - (60px / 4));
    width: 30px;
    height: 30px;
    border: 1px solid #b9bcbe;
    border-radius: 50%;
    border-left: 0;
    border-top: 0;
    animation: cf-spin 1s linear infinite;
    will-change: opacity; }
    .conversational-form--enable-animation cf-input[tag-type="file"] cf-input-button.cf-input-button.loading:after {
      transition: opacity 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }
  cf-input[tag-type="file"] cf-input-button.cf-input-button div.cf-icon-attachment {
    transform: rotateX(0deg);
    opacity: 1; }
  cf-input[tag-type="file"] cf-input-button.cf-input-button div.cf-icon-progress {
    transform: rotateX(-90deg);
    opacity: 0; }

cf-input-button.cf-input-button {
  width: 60px;
  height: 100%;
  background: #303030;
  position: absolute;
  overflow: hidden;
  right: 0;
  bottom: 0;
  z-index: 3;
  cursor: pointer;
  border-radius: 0;
  will-change: background, border;
  transform-origin: 50% 50%;
  transform: scale(0, 0);
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  border: none; }
  .conversational-form--enable-animation cf-input-button.cf-input-button {
    transition: background 0.375s cubic-bezier(0.215, 0.61, 0.355, 1), border 0.375s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.375s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s; }
  cf-input-button.cf-input-button .cf-input-icons.cf-microphone {
    transform: scale(0, 0);
    pointer-events: none; }
  cf-input-button.cf-input-button.microphone-interface .cf-input-icons {
    transform-origin: 50% 50%;
    transform: scale(1, 1) rotateX(0deg) translateZ(0px);
    transition: transform 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }
  cf-input-button.cf-input-button.microphone-interface .cf-input-icons:not(.cf-microphone) {
    pointer-events: none;
    transform: scale(0.25, 0.25) rotateX(90deg) translateZ(0px); }
  cf-input-button.cf-input-button.microphone-interface .cf-input-icons.cf-microphone {
    pointer-events: auto;
    transform: scale(1, 1) rotateX(0deg) translateZ(0px); }
  cf-input-button.cf-input-button.microphone-interface.loading:not(.typing) {
    pointer-events: none; }
    cf-input-button.cf-input-button.microphone-interface.loading:not(.typing) .cf-microphone div.cf-icon-audio {
      opacity: 1; }
  cf-input-button.cf-input-button.microphone-interface.typing .cf-input-icons:not(.cf-microphone) {
    pointer-events: auto;
    transform: scale(1, 1) rotateX(0deg) translateZ(0px); }
  cf-input-button.cf-input-button.microphone-interface.typing .cf-input-icons.cf-microphone {
    transform: scale(0.25, 0.25) rotateX(90deg) translateZ(0px);
    pointer-events: none; }
  cf-input-button.cf-input-button .cf-input-icons {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    width: 100%;
    height: 100%; }
    cf-input-button.cf-input-button .cf-input-icons > div {
      width: 100%;
      height: 100%;
      position: absolute;
      z-index: 1;
      background-repeat: no-repeat;
      background-position: 50% 50%;
      transform-origin: 50% 50%;
      will-change: transform, opacity; }
      .conversational-form--enable-animation cf-input-button.cf-input-button .cf-input-icons > div {
        transition: transform 0.375s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }
  cf-input-button.cf-input-button div.cf-icon-attachment {
    transform: rotateX(90deg);
    opacity: 0;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='12px' height='16px' viewBox='0 0 12 16' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg transform='translate%28-573.000000, -605.000000%29' stroke='%23E5E6EA'%3E%3Cg transform='translate%2884.000000, 136.000000%29'%3E%3Cg transform='translate%281.000000, 456.000000%29'%3E%3Cpath d='M499,23.1092437 L499,18.907563 C499,16.2016807 496.756849,14 494,14 C491.243151,14 489,16.2016807 489,18.907563 L489,24.5042017 C489,26.4369748 490.592466,28 492.561644,28 C494.530822,28 496.123288,26.4369748 496.123288,24.5042017 L496.123288,18.907563 C496.140411,17.7478992 495.181507,16.8067227 494,16.8067227 C492.818493,16.8067227 491.859589,17.7478992 491.859589,18.907563 L491.859589,23.1092437'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 18px 24px; }
  cf-input-button.cf-input-button div.cf-icon-progress {
    transform: rotateX(0deg);
    opacity: 1;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='30px' height='30px' viewBox='0 0 30 30' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg fill='%23E5E6EA'%3E%3Cpolygon transform='translate%2815.500000, 15.500000%29 rotate%2890.000000%29 translate%28-15.500000, -15.500000%29 ' points='22 14.6875 12.111875 14.6875 16.6496875 10.1496875 15.5 9 9 15.5 15.5 22 16.6496875 20.8503125 12.111875 16.3125 22 16.3125'%3E%3C/polygon%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 45px 45px; }
  cf-input-button.cf-input-button div.cf-icon-audio {
    transform: rotateX(0deg);
    opacity: 1;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 16.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0%29 --%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='512px' height='512px' fill='%23E5E6EA' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M256,320c37.712,0,68.571-30.924,68.571-68.714V100.714C324.571,62.924,293.712,32,256,32s-68.571,30.924-68.571,68.714 v150.572C187.429,289.076,218.288,320,256,320z M377.139,244.548c0,68.714-58.282,116.815-121.139,116.815 s-121.139-48.102-121.139-116.815H96c0,77.873,61.719,143.153,137.144,153.465V480h45.713v-81.987 C354.281,386.561,416,322.421,416,244.548H377.139z'/%3E%3C/g%3E%3C/svg%3E ");
    background-size: 39px 39px; }
  cf-input-button.cf-input-button:active {
    opacity: 0.2; }
  cf-input-button.cf-input-button:hover, cf-input-button.cf-input-button:focus {
    background: #E5E6EA;
    border: 0; }
    cf-input-button.cf-input-button:hover:after, cf-input-button.cf-input-button:focus:after {
      opacity: 0; }
    @media (min-width: 1152px) {
      cf-input-button.cf-input-button:hover .cf-icon-progress, cf-input-button.cf-input-button:focus .cf-icon-progress {
        animation: cf-arrow-up 0.75s cubic-bezier(0.645, 0.045, 0.355, 1); } }

/**
* Show submit button for groups when input is hidden
*/
cf-input[tag-type="file"] cf-input-button.cf-input-button,
cf-input[tag-type="group"] cf-input-button.cf-input-button,
cf-input[tag-type="select"] cf-input-button.cf-input-button {
  height: 60px; }

cf-input[tag-type="file"].hide-input cf-input-button,
cf-input[tag-type="group"].hide-input cf-input-button,
cf-input[tag-type="select"].hide-input cf-input-button {
  display: block;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto; }

cf-input[tag-type="file"].hide-input cf-input-control-elements,
cf-input[tag-type="group"].hide-input cf-input-control-elements,
cf-input[tag-type="select"].hide-input cf-input-control-elements {
  margin-bottom: 60px; }

cf-input[error=""].hide-input cf-input-button .cf-icon-progress {
  filter: saturate(0);
  animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }

@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0); }
  20%, 80% {
    transform: translate3d(1px, 0, 0); }
  30%, 50%, 70% {
    transform: translate3d(-2px, 0, 0); }
  40%, 60% {
    transform: translate3d(2px, 0, 0); } }

@keyframes cf-spin {
  0% {
    transform: rotate(0deg); }
  100% {
    transform: rotate(360deg); } }

@keyframes cf-arrow-up {
  0% {
    transform: translateY(0px); }
  40% {
    transform: translateY(-40px); }
  40.001% {
    transform: translateY(40px); }
  80% {
    transform: translateY(-5px); }
  90% {
    transform: translateY(2px); }
  100% {
    transform: translateY(0px); } }

/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
cf-input-control-elements.animate-in cf-list-button {
  opacity: 1; }

cf-input-control-elements.hide-nav-buttons cf-list-button {
  pointer-events: none; }
  cf-input-control-elements.hide-nav-buttons cf-list-button:after {
    opacity: 0; }

cf-list-button {
  display: block;
  position: absolute;
  z-index: 2;
  height: calc(100% - 16px);
  width: 38px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  will-change: opacity; }
  .conversational-form--enable-animation cf-list-button {
    transition: opacity 0.75s cubic-bezier(0.215, 0.61, 0.355, 1) 0.5s; }
  @media (min-width: 1152px) {
    cf-list-button:hover:nth-child(1) {
      background: linear-gradient(to left, rgba(44, 44, 46, 0) 0%, #2c2c2e 75%); }
      cf-list-button:hover:nth-child(1):after {
        animation: cf-arrow-left 0.75s cubic-bezier(0.645, 0.045, 0.355, 1); }
    cf-list-button:hover:nth-child(2) {
      background: linear-gradient(to right, rgba(44, 44, 46, 0) 0%, #2c2c2e 75%); }
      cf-list-button:hover:nth-child(2):after {
        animation: cf-arrow-right 0.75s cubic-bezier(0.645, 0.045, 0.355, 1); } }
  cf-list-button.cf-gradient:before {
    opacity: 1; }
  cf-list-button.active {
    pointer-events: auto; }
    cf-list-button.active:after {
      opacity: 1; }
  cf-list-button:active:after {
    visibility: hidden; }
  cf-list-button:nth-child(1) {
    left: 0px; }
    cf-list-button:nth-child(1):before {
      background: linear-gradient(to left, rgba(44, 44, 46, 0) 0%, #2c2c2e 100%); }
    cf-list-button:nth-child(1):after {
      background-image: url("data:image/svg+xml;charset=UTF-8,%3c?xml version='1.0' encoding='UTF-8' standalone='no'?%3e%3csvg viewBox='0 0 6 10' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg stroke='none' stroke-width='1' fill='%23D3D3D1' fill-rule='evenodd'%3e%3cg transform='translate%28-1230.000000, -567.000000%29' %3e%3cg transform='translate%28738.000000, 178.000000%29'%3e%3cg transform='translate%280.000000, 340.000000%29'%3e%3cg transform='translate%28466.000000, 0.000000%29'%3e%3cpolygon transform='translate%2829.000000, 54.000000%29 rotate%28-180.000000%29 translate%28-29.000000, -54.000000%29 ' points='26 50.1538462 27.125 49 32 54 27.125 59 26 57.8461538 29.75 54'%3e%3c/polygon%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e"); }
  cf-list-button:nth-child(2) {
    right: 0px; }
    cf-list-button:nth-child(2):before {
      background: linear-gradient(to right, rgba(44, 44, 46, 0) 0%, #2c2c2e 100%); }
    cf-list-button:nth-child(2):after {
      background-image: url("data:image/svg+xml;charset=UTF-8,%3c?xml version='1.0' encoding='UTF-8' standalone='no'?%3e%3csvg viewBox='0 0 6 10' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg stroke='none' stroke-width='1' fill='%23D3D3D1' fill-rule='evenodd'%3e%3cg transform='translate%28-1230.000000, -567.000000%29'%3e%3cg transform='translate%28738.000000, 178.000000%29'%3e%3cg transform='translate%280.000000, 340.000000%29'%3e%3cg transform='translate%28466.000000, 0.000000%29'%3e%3cpolygon points='26 50.1538462 27.125 49 32 54 27.125 59 26 57.8461538 29.75 54'%3e%3c/polygon%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e"); }
  cf-list-button:before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    will-change: opacity; }
    .conversational-form--enable-animation cf-list-button:before {
      transition: opacity 0.75s cubic-bezier(0.215, 0.61, 0.355, 1); }
  cf-list-button:after {
    content: "";
    display: block;
    width: 6px;
    height: 10px;
    position: absolute;
    background-size: 6px 10px;
    background-repeat: no-repeat;
    top: calc(50% - 5px);
    left: calc(50% - 3px);
    opacity: 0;
    will-change: opacity; }
    .conversational-form--enable-animation cf-list-button:after {
      transition: opacity 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }

@keyframes cf-arrow-right {
  0% {
    transform: translateX(0px);
    opacity: 1; }
  40% {
    transform: translateX(20px);
    opacity: 0; }
  40.001% {
    transform: translateX(-20px);
    opacity: 0; }
  80% {
    transform: translateX(4px);
    opacity: 1; }
  90% {
    transform: translateX(-2px);
    opacity: 1; }
  100% {
    transform: translateX(0px);
    opacity: 1; } }

@keyframes cf-arrow-left {
  0% {
    transform: translateX(0px);
    opacity: 1; }
  40% {
    transform: translateX(-20px);
    opacity: 0; }
  40.001% {
    transform: translateX(20px);
    opacity: 0; }
  80% {
    transform: translateX(-4px);
    opacity: 1; }
  90% {
    transform: translateX(2px);
    opacity: 1; }
  100% {
    transform: translateX(0px);
    opacity: 1; } }

.cf-progressBar {
  background-color: white;
  width: 100%;
  height: 3px;
  z-index: 999;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity .5s ease-in-out;
  will-change: opacity; }
  .cf-progressBar.show {
    opacity: 1; }
  .cf-progressBar .bar {
    width: 0;
    height: 100%;
    background-color: #303030;
    transition: width .3s ease-in-out;
    will-change: width; }

/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
cf-chat {
  display: block;
  width: 100%;
  height: auto;
  min-height: 100%;
  overflow: hidden;
  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-end;
  align-items: baseline;
  margin-bottom: -10px; }
  cf-chat scrollable {
    width: calc(100% + 40px);
    padding-right: 40px;
    max-height: 100%;
    min-height: 40px;
    flex-grow: 1;
    display: flex;
    flex-direction: column-reverse;
    /* 'column' for start, 'column-reverse' for end */
    overflow-y: scroll; }
    @supports (-ms-ime-align: auto) {
      cf-chat scrollable {
        overflow: hidden; } }
  cf-chat .scrollableInner {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    padding-bottom: 10px;
    padding-top: 40px;
    overflow: hidden; }
    cf-chat .scrollableInner.scroll {
      flex: 1 1 auto;
      height: 100%;
      overflow-y: scroll;
      margin-bottom: 20px; }
      @supports (-ms-ime-align: auto) {
        cf-chat .scrollableInner.scroll {
          margin-right: -16px; } }

/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
.conversational-form.done cf-chat-response {
  pointer-events: none; }

cf-chat-response {
  max-width: 90%;
  min-width: 120px;
  position: relative;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  padding-left: 62px;
  margin-top: 8px;
  color: #2f323b;
  margin-left: 0px;
  margin-right: auto;
  word-break: break-all;
  display: flex;
  flex-shrink: 0;
  flex-grow: 1;
  position: absolute;
  visibility: hidden;
  will-change: height;
  transition: height 0.3375s cubic-bezier(0.215, 0.61, 0.355, 1);
  padding-bottom: 12px; }
  @media (min-width: 1152px) {
    cf-chat-response {
      max-width: 70%; } }
  @media (max-width: 1152px) {
    cf-chat-response {
      padding-left: 47.71429px; } }
  cf-chat-response.show {
    position: relative;
    visibility: visible; }
  cf-chat-response.can-edit {
    cursor: pointer; }
    cf-chat-response.can-edit:hover text > p {
      background: #ced0d8; }
  cf-chat-response.user {
    justify-content: flex-end;
    margin-right: 0px;
    margin-left: auto;
    padding-left: 0;
    padding-right: calc(50px + 14px);
    color: white; }
    @media (max-width: 1152px) {
      cf-chat-response.user {
        padding-right: 47.71429px; } }
    cf-chat-response.user thumb {
      left: auto;
      right: 0px; }
    cf-chat-response.user text > p {
      background: #E5E6EA;
      border-radius: 24px 0px 24px 24px;
      margin-right: 0px;
      margin-left: auto; }
    cf-chat-response.user.peak-thumb thumb {
      transform: scale(1, 1) translateY(0px);
      opacity: 1; }
      .conversational-form--enable-animation cf-chat-response.user.peak-thumb thumb {
        transition-delay: 0.2s, 0.2s, 0.2s; }
  cf-chat-response.robot.peak-thumb thumb {
    transform: scale(1, 1) translateY(0px);
    opacity: 1; }
    .conversational-form--enable-animation cf-chat-response.robot.peak-thumb thumb {
      transition-delay: 0.2s, 0.2s, 0.2s; }
  cf-chat-response.disabled {
    pointer-events: none;
    color: #686d81; }
    cf-chat-response.disabled text {
      background: white; }
  cf-chat-response[thinking] text thinking {
    display: block; }
  cf-chat-response text {
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    display: inline-block;
    position: relative;
    min-height: 40px;
    height: auto;
    white-space: pre-wrap;
    word-break: normal; }
    cf-chat-response text > div {
      display: inline-block; }
    cf-chat-response text thinking span:nth-child(1) {
      animation-delay: 0.66667 s; }
    cf-chat-response text thinking span:nth-child(2) {
      animation-delay: 1.33333 s; }
    cf-chat-response text thinking span:nth-child(3) {
      animation-delay: 2 s; }
    cf-chat-response text strong {
      font-weight: 900; }
    cf-chat-response text > p {
      display: inline-block;
      margin: 0px;
      padding: 0px;
      background: #E5E6EA;
      padding: 14px 21px 14px 21px;
      border-radius: 0px 24px 24px 24px;
      transition: background 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }
      @media (max-width: 1152px) {
        cf-chat-response text > p {
          padding: 9px 17px 11px 17px; } }
      .conversational-form--enable-animation cf-chat-response text > p {
        will-change: transform,opacity;
        transform: scale(0, 0) translateY(30px);
        opacity: 0; }
      .conversational-form--enable-animation cf-chat-response text > p.show {
        animation: moveIn 0.2625s forwards 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }
      cf-chat-response text > p.hasImage {
        padding: 0;
        overflow: hidden;
        background: none; }
        cf-chat-response text > p.hasImage img {
          margin: 0;
          padding: 0; }
        cf-chat-response text > p.hasImage > span {
          display: block;
          padding: 5px 6px 6px 18px;
          background: #E5E6EA; }
      cf-chat-response text > p:not(:only-child) {
        border-radius: 0px 24px 24px 0px; }
        cf-chat-response text > p:not(:only-child):first-child {
          border-radius: 24px 24px 24px 0px; }
        cf-chat-response text > p:not(:only-child):last-child {
          border-radius: 0px 24px 24px 24px; }
        cf-chat-response text > p:not(:only-child):not(:first-child) {
          margin-top: 6px; }
      cf-chat-response text > p > img {
        max-width: 140px;
        padding-bottom: 8px;
        width: 100%;
        height: auto;
        display: block;
        margin-bottom: 6px; }
    cf-chat-response text:after {
      content: "";
      display: block;
      position: absolute;
      top: 50%;
      left: 30px;
      transform: translateY(-50%);
      padding-right: 30px; }
    cf-chat-response text thinking {
      position: relative;
      display: table;
      -webkit-user-select: none;
         -moz-user-select: none;
          -ms-user-select: none;
              user-select: none;
      display: none;
      transform-origin: 0% 50%;
      transform: scale(1.5); }
      cf-chat-response text thinking span:nth-child(1) {
        animation: dot-fade 1s linear 0.33333 s infinite; }
      cf-chat-response text thinking span:nth-child(2) {
        animation: dot-fade 1s linear 0.66667 s infinite; }
      cf-chat-response text thinking span:nth-child(3) {
        animation: dot-fade 1s linear 1 s infinite; }
    cf-chat-response text svg.cf-icon-file {
      width: 15px;
      height: auto;
      display: inline-block;
      margin-right: 11px; }
      cf-chat-response text svg.cf-icon-file g {
        fill: #E5E6EA; }
  cf-chat-response thumb {
    position: absolute;
    top: 0px;
    left: 0px;
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #E5E6EA;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    opacity: 0;
    overflow: hidden;
    transform-origin: 50% 50%;
    transform: scale(0.001, 0.001) translateY(50px);
    will-change: transform, opacity; }
    @media (max-width: 1152px) {
      cf-chat-response thumb {
        width: 39.68254px;
        height: 39.68254px; } }
    .conversational-form--enable-animation cf-chat-response thumb {
      transition: transform 0.2625s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }
    cf-chat-response thumb > span {
      display: block;
      line-height: 36px;
      text-align: center;
      font-weight: bold;
      font-size: 14.4px; }
      cf-chat-response thumb > span[length="1"] {
        font-size: 28.8px; }
      cf-chat-response thumb > span[length="3"] {
        font-size: 11.88px; }

@keyframes dot-fade {
  0% {
    opacity: 1; }
  15.1111% {
    opacity: 0; }
  33.333% {
    opacity: 1; }
  100% {
    opacity: 1; } }

@keyframes bounce {
  0% {
    transform: scale(1, 1);
    opacity: 1; }
  50% {
    transform: scale(1.05, 1.05);
    opacity: 0.85; }
  100% {
    transform: scale(1, 1);
    opacity: 1; } }

@keyframes moveIn {
  0% {
    transform: scale(1, 1) translateY(60px);
    opacity: 0; }
  100% {
    transform: scale(1, 1) translateY(0px);
    opacity: 1; } }

/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
cf-input-control-elements {
  width: auto;
  height: auto;
  overflow: hidden;
  display: block;
  position: relative;
  z-index: 0;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  visibility: hidden;
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px; }
  cf-input-control-elements .cf-button {
    margin-bottom: 10px;
    display: inline-block; }
    cf-input-control-elements .cf-button.hide {
      display: none; }
  cf-input-control-elements.resized {
    visibility: visible;
    height: auto; }
  cf-input-control-elements.one-row cf-list {
    height: auto; }
  cf-input-control-elements.one-row cf-list-button {
    opacity: 0; }
  cf-input-control-elements.two-row cf-list {
    white-space: normal;
    height: auto; }
  cf-input-control-elements.animate-in cf-list:last-of-type {
    min-height: 56px; }
  cf-input-control-elements.two-row.animate-in cf-list:last-of-type {
    min-height: 112px; }

cf-list, cf-list-button {
  will-change: height; }
  .conversational-form--enable-animation cf-list, .conversational-form--enable-animation cf-list-button {
    transition: height 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }

cf-input[tag-type="file"] cf-list  {
  cursor: default; }

cf-input[tag-type="file"] cf-input-control-elements {
  margin-bottom: 0; }

cf-list {
  display: block;
  height: auto;
  cursor: move;
  white-space: nowrap; }
  cf-list.disabled {
    pointer-events: none; }

/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
.cf-button {
  background: #2C2C2E;
  cursor: pointer;
  border: 1px solid #303030;
  border-radius: calc(24px * .88);
  color: #303030;
  line-height: 1;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  overflow: hidden;
  transform: translateZ(0px);
  font-size: 16px;
  transform-origin: 0% 100%;
  will-change: opacity, background;
  opacity: 0; }
  @media (max-width: 1152px) {
    .cf-button {
      font-size: 14px; } }
  .cf-button > div {
    position: relative;
    margin: 12px 22px; }
    @media (max-width: 1152px) {
      .cf-button > div {
        margin: 10px 22px; } }
  .cf-button.has-image {
    max-width: 160px; }
    @media (max-width: 1152px) {
      .cf-button.has-image {
        max-width: 132px; } }
    .cf-button.has-image > div {
      margin: 8px 22px 10px 22px; }
  .conversational-form--enable-animation .cf-button {
    transition: opacity 0s cubic-bezier(0.215, 0.61, 0.355, 1), background 0.75s cubic-bezier(0.215, 0.61, 0.355, 1); }
  .cf-button.animate-in {
    opacity: 1; }
    .conversational-form--enable-animation .cf-button.animate-in {
      transition-duration: 0.375s, 0.75s;
      transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1), cubic-bezier(0.215, 0.61, 0.355, 1); }
      .conversational-form--enable-animation .cf-button.animate-in:nth-child(even) {
        transition-delay: 0.05s, 0s; }
      .conversational-form--enable-animation .cf-button.animate-in:nth-child(odd) {
        transition-delay: 0.15s, 0s; }
    .cf-button.animate-in.animate-out {
      transform-origin: 75% 100%;
      opacity: 0; }
  .cf-button:not(:last-child) {
    margin-right: 10px; }
  .cf-button:hover, .cf-button:hover:not([checked="checked"]), .cf-button:focus, .cf-button:focus:not([checked="checked"]) {
    background: #303030;
    color: #E5E6EA; }
  .cf-button[selected="selected"]:not(:focus):not(:hover):not(.highlight), .cf-button[checked="checked"]:not(:focus):not(:hover):not(.highlight) {
    color: #E5E6EA;
    background: #303030; }
  .cf-button[disabled="disabled"] {
    pointer-events: none; }
    .cf-button[disabled="disabled"].animate-in {
      opacity: 0.5; }
  .cf-button:active > div {
    opacity: 0.2; }
  .cf-button .cf-image {
    width: 100%;
    height: auto;
    will-change: opacity;
    transition: opacity 0.75s cubic-bezier(0.215, 0.61, 0.355, 1);
    opacity: 0; }
    .cf-button .cf-image.loaded {
      opacity: 1; }

/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
.cf-button.cf-checkbox-button:hover cf-checkbox, .cf-button.cf-checkbox-button:focus cf-checkbox {
  background: #303030; }
  .cf-button.cf-checkbox-button:hover cf-checkbox:after, .cf-button.cf-checkbox-button:focus cf-checkbox:after {
    transform: scale(1, 1);
    top: 1px;
    left: 0px;
    width: 15px;
    height: 12px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13px' height='10px' viewBox='0 0 13 10' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e%3cg transform='translate%28-290.000000, -505.000000%29' fill='%23E5E6EA'%3e%3cg transform='translate%2884.000000, 136.000000%29'%3e%3cg transform='translate%281.000000, 216.000000%29'%3e%3cg transform='translate%28189.000000, 139.000000%29'%3e%3cpolygon points='17.5 18.5 16 20 20 24 29 15.5 27.5 14 20 21'%3e%3c/polygon%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e");
    background-size: 15px 12px;
    transform-origin: 50% 50%; }

.cf-button.cf-checkbox-button.no-text {
  padding: 18px 24px; }
  .cf-button.cf-checkbox-button.no-text cf-checkbox {
    margin-right: 0px;
    margin-left: 0px; }

.cf-button.cf-checkbox-button.has-image cf-checkbox {
  margin-left: 0px; }

.cf-button.cf-checkbox-button cf-checkbox {
  display: block;
  float: left;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid #E5E6EA;
  will-change: background;
  margin-right: 8px;
  margin-left: -10px;
  margin-top: 1px;
  position: relative; }
  .conversational-form--enable-animation .cf-button.cf-checkbox-button cf-checkbox {
    transition: background 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }
  .cf-button.cf-checkbox-button cf-checkbox:after {
    content: "";
    position: absolute;
    top: 1px;
    left: 0px;
    display: block;
    width: 15px;
    height: 12px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13px' height='10px' viewBox='0 0 13 10' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e%3cg transform='translate%28-290.000000, -505.000000%29' fill='%23E5E6EA'%3e%3cg transform='translate%2884.000000, 136.000000%29'%3e%3cg transform='translate%281.000000, 216.000000%29'%3e%3cg transform='translate%28189.000000, 139.000000%29'%3e%3cpolygon points='17.5 18.5 16 20 20 24 29 15.5 27.5 14 20 21'%3e%3c/polygon%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e");
    background-size: 15px 12px;
    background-repeat: no-repeat;
    transform-origin: 50% 50%;
    will-change: transform;
    transform: scale(0, 0); }
    .conversational-form--enable-animation .cf-button.cf-checkbox-button cf-checkbox:after {
      transition: transform 0.1875s cubic-bezier(0.215, 0.61, 0.355, 1); }

.cf-button.cf-checkbox-button[checked="checked"], .cf-button.cf-checkbox-button[selected="selected"] {
  background: #303030 !important;
  color: #E5E6EA !important; }
  .cf-button.cf-checkbox-button[checked="checked"] cf-checkbox, .cf-button.cf-checkbox-button[selected="selected"] cf-checkbox {
    background: rgba(229, 230, 234, 0);
    border: none; }
    .cf-button.cf-checkbox-button[checked="checked"] cf-checkbox:after, .cf-button.cf-checkbox-button[selected="selected"] cf-checkbox:after {
      transform: scale(1, 1); }
      .conversational-form--enable-animation .cf-button.cf-checkbox-button[checked="checked"] cf-checkbox:after, .conversational-form--enable-animation .cf-button.cf-checkbox-button[selected="selected"] cf-checkbox:after {
        transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }

/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
cf-options-list {
  display: block;
  width: auto; }

/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
cf-radio-button.cf-button:hover cf-radio, cf-radio-button.cf-button.highlight cf-radio, cf-radio-button.cf-button:focus cf-radio {
  background: #E5E6EA; }

cf-radio-button.cf-button.has-image cf-checkbox {
  margin-left: 0px; }

cf-radio-button.cf-button cf-radio {
  display: block;
  float: left;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: none;
  border: 1px solid #303030;
  will-change: background;
  margin-right: 8px;
  margin-left: -10px;
  margin-top: 2px;
  position: relative; }
  .conversational-form--enable-animation cf-radio-button.cf-button cf-radio {
    transition: background 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }

cf-radio-button.cf-button[checked="checked"] {
  background: #303030 !important;
  color: #E5E6EA !important; }
  cf-radio-button.cf-button[checked="checked"] cf-radio {
    background: #2C2C2E;
    border: 1px solid #2C2C2E;
    pointer-events: none; }

/*
    Globals
*/
/*
    Response
*/
/*
    Input
*/
cf-upload-file-ui {
  display: block;
  width: 100%;
  height: 60px;
  position: relative;
  top: 0px;
  color: #4a4a4a;
  opacity: 0;
  transform: translateY(20px) rotateX(30deg);
  will-change: opacity, transform; }
  .conversational-form--enable-animation cf-upload-file-ui {
    transition: opacity 0.375s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }
  cf-upload-file-ui.animate-in {
    opacity: 1;
    transform: translateY(0px) rotateX(0deg); }
    .conversational-form--enable-animation cf-upload-file-ui.animate-in {
      transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1), cubic-bezier(0.215, 0.61, 0.355, 1); }

cf-upload-file-text {
  display: block;
  float: left;
  width: auto;
  height: 100%;
  padding-right: 20px;
  padding-top: 17px;
  position: relative;
  color: currentColor;
  width: 50%;
  text-overflow: ellipsis;
  overflow: hidden; }
  cf-upload-file-text:before {
    content: "";
    display: inline-block;
    position: absolute;
    top: 17px;
    left: 23px;
    width: 10px;
    height: 14px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg viewBox='0 0 10 14' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e%3cg transform='translate(-756.000000, -549.000000)' fill='#E5E6EA'%3e%3cg transform='translate(736.000000, 127.000000)'%3e%3cg transform='translate(0.000000, 406.000000)'%3e%3cpolygon points='20 16 26.0030799 16 30 19.99994 30 30 20 30'%3e%3c/polygon%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 10px 14px; }

cf-upload-file-progress {
  display: block;
  height: 100%;
  overflow: hidden;
  position: relative;
  float: right;
  width: 50%; }
  cf-upload-file-progress:after {
    content: "";
    width: 100%;
    background: #252526;
    border-radius: 7px; }
  cf-upload-file-progress:after, cf-upload-file-progress cf-upload-file-progress-bar {
    display: block;
    height: 10px;
    position: absolute;
    top: 19px;
    z-index: 1; }
  cf-upload-file-progress cf-upload-file-progress-bar {
    width: 0%;
    will-change: width, border-radius;
    background: currentColor;
    z-index: 2;
    border-radius: 7px; }
    .conversational-form--enable-animation cf-upload-file-progress cf-upload-file-progress-bar {
      transition: width 0.15s linear, border-radius 0.375s cubic-bezier(0.215, 0.61, 0.355, 1); }
    cf-upload-file-progress cf-upload-file-progress-bar.loaded {
      border-radius: 7px 7px 7px 7px; }

cf-chat-response.robot text > p {
  background: #3A3A3C;
  color: #fff; }

cf-chat-response.user text > p {
  background: #E5E6EA;
  color: #303030; }

cf-chat-response thumb {
  background-color: inherit; }

.cf-button {
  border: 1px solid #e5e6ea;
  color: #E5E6EA; }
  .cf-button:hover, .cf-button:hover:not([checked="checked"]), .cf-button:focus, .cf-button:focus:not([checked="checked"]) {
    background: #E5E6EA;
    color: #303030; }
  .cf-button[selected="selected"]:not(:focus):not(:hover):not(.highlight), .cf-button[checked="checked"]:not(:focus):not(:hover):not(.highlight) {
    color: #303030;
    background: #E5E6EA; }
  .cf-button.cf-checkbox-button:hover, .cf-button.cf-checkbox-button.highlight, .cf-button.cf-checkbox-button:focus {
    background: #E5E6EA;
    color: #303030; }
    .cf-button.cf-checkbox-button:hover cf-checkbox, .cf-button.cf-checkbox-button.highlight cf-checkbox, .cf-button.cf-checkbox-button:focus cf-checkbox {
      background: #E5E6EA; }
      .cf-button.cf-checkbox-button:hover cf-checkbox:after, .cf-button.cf-checkbox-button.highlight cf-checkbox:after, .cf-button.cf-checkbox-button:focus cf-checkbox:after {
        top: 1px;
        left: 0px;
        width: 15px;
        height: 12px;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13px' height='10px' viewBox='0 0 13 10' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e%3cg transform='translate%28-290.000000, -505.000000%29' fill='%23303030'%3e%3cg transform='translate%2884.000000, 136.000000%29'%3e%3cg transform='translate%281.000000, 216.000000%29'%3e%3cg transform='translate%28189.000000, 139.000000%29'%3e%3cpolygon points='17.5 18.5 16 20 20 24 29 15.5 27.5 14 20 21'%3e%3c/polygon%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e"); }
  .cf-button.cf-checkbox-button cf-checkbox {
    border-color: #E5E6EA; }
  .cf-button.cf-checkbox-button[checked="checked"], .cf-button.cf-checkbox-button[selected="selected"] {
    background: #E5E6EA !important;
    color: #303030 !important; }
    .cf-button.cf-checkbox-button[checked="checked"] cf-checkbox:after, .cf-button.cf-checkbox-button[selected="selected"] cf-checkbox:after {
      top: 1px;
      left: 0px;
      width: 15px;
      height: 12px;
      background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='13px' height='10px' viewBox='0 0 13 10' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3e%3cg transform='translate%28-290.000000, -505.000000%29' fill='%23303030'%3e%3cg transform='translate%2884.000000, 136.000000%29'%3e%3cg transform='translate%281.000000, 216.000000%29'%3e%3cg transform='translate%28189.000000, 139.000000%29'%3e%3cpolygon points='17.5 18.5 16 20 20 24 29 15.5 27.5 14 20 21'%3e%3c/polygon%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e") !important; }

cf-radio-button.cf-button cf-radio {
  border: 1px solid #E5E6EA; }

cf-radio-button.cf-button:hover, cf-radio-button.cf-button.highlight, cf-radio-button.cf-button:focus {
  background: #E5E6EA !important;
  color: #303030 !important; }
  cf-radio-button.cf-button:hover cf-radio, cf-radio-button.cf-button.highlight cf-radio, cf-radio-button.cf-button:focus cf-radio {
    background: #303030; }

cf-radio-button.cf-button[checked="checked"] {
  background: #E5E6EA !important;
  color: #303030 !important; }

cf-input input, cf-input textarea {
  box-shadow: none;
  border-radius: 3px;
  background-color: #1C1C1E;
  color: #fff; }
  cf-input input:-ms-input-placeholder, cf-input textarea:-ms-input-placeholder {
    color: #777 !important; }
  cf-input input::-ms-input-placeholder, cf-input textarea::-ms-input-placeholder {
    color: #777 !important; }
  cf-input input::placeholder, cf-input textarea::placeholder {
    color: #777 !important; }
  cf-input input:focus, cf-input input:active, cf-input textarea:focus, cf-input textarea:active {
    box-shadow: none; }

cf-input-button {
  border-radius: 3px 5px 5px 3px;
  background: #3A3A3C !important; }

cf-chat-response.robot thumb {
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='100' cy='100' r='100' fill='%233A3A3C'/%3E%3Crect x='66' y='66' width='68' height='68' fill='%23E5E6EA'/%3E%3C/svg%3E%0A") !important; }

cf-chat-response.user thumb {
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='100' cy='100' r='100' fill='%23E5E6EA'/%3E%3Cpath d='M100 55L138.971 122.5H61.0289L100 55Z' fill='%233A3A3C'/%3E%3C/svg%3E%0A") !important; }

.cf-progressBar {
  background-color: #303030; }
  .cf-progressBar .bar {
    background-color: white; }


<|start_filename|>tests/input-radio.js<|end_filename|>
describe('Check input type=text', function() {
	var instance = window.cf.ConversationalForm.startTheConversation({
		"options": {
			formEl: document.createElement("form")
		},
		"tags": [
			{
				"tag": "fieldset",
				"id": "radios",
				"cf-input-placeholder": "...",
				"cf-questions": "A radio for every navel for every taste",
				"children":[
					{
						"tag": "input",
						"type": "radio",
						"checked": "checked",
						"value":"radio-wrong",
						"name": "radio-buttons-1",
						"cf-label": "radio-1"
					},
					{
						"tag": "input",
						"type": "radio",
						"name": "radio-buttons-1",
						"value":"radio-right",
						"cf-label": "radio-2"
					}
				]
			},
			{
				"tag": "input",
				"type": "text",
				"name": "second-tag",
				"id": "second-tag",
				"cf-questions": "Prefilled1&&with follow-up1&&with follow-up11||Prefilled2&&with follow-up2&&with follow-up22"
			},
			{
				"tag": "input",
				"type": "text",
				"name": "third-tag",
				"id": "third-tag",
				"cf-questions": "dummy tag"
			}
		]
	});

	it('Should be able to through all', function(done) {
		expect(instance.tags).not.toBeNull();
		expect(instance.tags.length).toBe(3);
		expect(instance.tags[0].type).toBe("group");
		expect(instance.tags[0].domElement).not.toBeNull();

		// could also tap into event system..
		// UserInputEvents.CONTROL_ELEMENTS_ADDED

		// test default values
		expect(instance.tags[0].elements[0].domElement.checked).toBe(true);
		expect(instance.tags[0].elements[1].domElement.checked).toBe(false);

		setTimeout(function(){
			// shift check values on check
			instance.userInput.controlElements.elements[0].onClick();
			instance.userInput.controlElements.elements[1].onClick();

			// submit values
			// instance.userInput.doSubmit();

			// check submitted values
			expect(instance.tags[0].elements[0].domElement.checked).toBe(false);
			expect(instance.tags[0].elements[1].domElement.checked).toBe(true);

			expect(instance.getFormData(true)["radio-buttons-1"][0]).toBe("radio-right");

			done();
		}, 500);
	});
});

<|start_filename|>landingpage/src/main.js<|end_filename|>
import { ConversationalForm, FlowEvents, EventDispatcher } from 'conversational-form';
import {
  TweenLite,
} from 'gsap/TweenMax';
import loadcss from 'loadcss';
import Tracking from './tracking';
import 'reset-css';
import './scss/main.scss';

const animTime = 0.8;
const themes = [
  'conversational-form-dark.min.css',
  'conversational-form.min.css',
  'conversational-form-purple.min.css',
  'conversational-form-irisblue.min.css',
  'conversational-form-red.min.css',
  'conversational-form-green.min.css',
];
let currentTheme = themes[0];

function preloadFormImages() {
  const images = [].slice.call(document.querySelectorAll('form *[cf-image]'));
  // eslint-disable-next-line no-return-assign
  images.map(el => (new Image()).src = el.getAttribute('cf-image'));
}

function changeTheme(themeName) {
  if (currentTheme === themeName) return;

  console.log('changeTheme', currentTheme, themeName);
  const stylesheets = [].slice.call(document.styleSheets);
  stylesheets.map((s, i) => {
    const filename = s.href.substring(s.href.lastIndexOf('/') + 1);
    // console.log('t', filename);
    if (
      document.styleSheets[i].disabled === false
      && filename.indexOf('conversational-form') > -1
    ) {
      console.log('disable theme', document.styleSheets[i].href);
      document.styleSheets[i].disabled = true;
    } else if (filename.indexOf(themeName) > -1) {
      document.styleSheets[i].disabled = false;
      currentTheme = themeName;
      console.log('enable theme', document.styleSheets[i].href);
    }

    return s;
  });
}

function loadThemes() {
  console.log('loadThemes');

  const totalThemes = themes.length;

  loadcss(themes.map(t => `./${t}`), () => {
    const stylesheets = [].slice.call(document.styleSheets);
    stylesheets.map((s, i) => {
      // console.log(i, s.href);
      const filename = s.href.substring(s.href.lastIndexOf('/') + 1);
      if (
        filename.indexOf('conversational-form') > -1
        && filename.indexOf(themes[0]) === -1
        && filename.indexOf('main.') === -1
      ) {
        document.styleSheets[i].disabled = true;
      }

      console.log('loaded', i);
      if (totalThemes === i) changeTheme(themes[0]);

      return s;
    });
  });
}

function animateIn() {
  const headerEl = document.querySelector('header');
  const headlineEl = document.querySelector('h1');
  const cfEl = document.querySelector('.cf');
  const aboutEl = document.querySelector('.about');

  if (
    window.innerHeight < 780
  ) {
    TweenLite.set(
      headlineEl,
      {
        css: {
          scale: 0.68,
          'margin-top': 60,
          'margin-bottom': 60,
        },
      },
    );
  }

  TweenLite.set(headerEl, { y: 10 });
  TweenLite.to(
    headerEl,
    animTime / 2,
    {
      opacity: 1,
      y: 0,
    },
  );

  TweenLite.set(headlineEl, { y: 20 });
  TweenLite.to(
    headlineEl,
    animTime,
    {
      opacity: 1,
      y: 0,
      // onComplete: scaleDownHeader(headlineEl),
      delay: animTime / 2,
    },
  );

  TweenLite.set(cfEl, { y: 40 });
  TweenLite.to(
    cfEl,
    animTime * 1.2,
    {
      opacity: 1,
      y: 0,
      delay: animTime,
    },
  );

  setTimeout(
    () => {
      window.ConversationalForm.start();
    },
    animTime * 0.6 * 1000,
  );

  TweenLite.to(
    aboutEl,
    animTime * 3,
    {
      opacity: 1,
      delay: animTime * 2,
    },
  );
}

function init() {
  loadThemes();
  preloadFormImages();
  Tracking.registerAllExternalLinks();

  const wrapperEl = document.querySelector('.wrapper');
  const formEl = document.querySelector('.form');
  const cfEl = document.querySelector('.cf');
  const dispatcher = new EventDispatcher();

  // We manually stop form execution if users bails on us
  dispatcher.addEventListener(FlowEvents.FLOW_UPDATE, (event) => {
    console.log(event);
    if (event.detail.tag.name === 'ending') {
      window.ConversationalForm.flowManager.stop();
      document.querySelector('#conversational-form').style['pointer-events'] = 'none';
    }
  }, false);

  const cfInstance = new ConversationalForm({
    formEl,
    context: cfEl,
    loadExternalStyleSheet: false,
    preventAutoFocus: true,
    preventAutoStart: true,
    eventDispatcher: dispatcher,
    submitCallback: () => {
      const formDataSerialized = cfInstance.getFormData(true);
      console.log('done', formDataSerialized);
      if (
        formDataSerialized.getstarted
        && formDataSerialized.getstarted.indexOf('no') === -1
      ) {
        cfInstance.addRobotChatResponse('Ok. Thank you for trying out Conversational Form.');
      }
    },
    flowStepCallback: (dto, success) => {
      Tracking.event('conversational form example', dto.tag.name, dto.tag.value);

      if (dto.tag.name === 'theme') changeTheme(dto.tag.value[0]);

      setTimeout(() => {
        if (
          dto.tag.name !== 'changeThemeAgain'
          || (
            dto.tag.name === 'changeThemeAgain'
            && dto.tag.value[0] !== 'yes'
          )
        ) {
          success();
        }

        if (
          dto.tag.name === 'changeThemeAgain'
          && dto.tag.value[0] === 'yes'
        ) {
          window.ConversationalForm.remapTagsAndStartFrom(3);
        }
      }, 0);
    },
  });

  TweenLite.to(
    wrapperEl,
    1,
    {
      opacity: 1,
      delay: animTime / 2,
      onComplete: animateIn,
    },
  );
}

document.addEventListener('DOMContentLoaded', init);


<|start_filename|>tests/input-textarea-multi-rows.js<|end_filename|>
describe('Test that rows attribute is set for textarea fields', function() {
	var html = " \
			<form id='markup-form'> \
				<textarea cf-label='Text label.' name='input-1' value='some text answer here' rows='4' /> \
				<input type='text' cf-label='name' name='input-2' /> \
				<input type='text' cf-label='name' name='input-3' /> \
				<input type='text' cf-label='name' name='input-4' /> \
				<input type='text' cf-label='name' name='input-5' /> \
			</form> \
	";

	var parser = new DOMParser()
	var doc = parser.parseFromString(html, "text/xml");

	document.body.appendChild(doc.getElementsByTagName("form")[0]);
	var formEl = document.getElementById("markup-form");

	var div = document.createElement("div");

	var instance = new window.cf.ConversationalForm.startTheConversation({
		formEl: formEl,
		context: div
	});

	it('Should set rows attribute to 4', function(done) {
		setTimeout(function() {
			expect(div.querySelector('textarea').getAttribute('rows')).toEqual('4');
      done();
    }, 2000);
	});

});


<|start_filename|>tests/userAndRobotImage.js<|end_filename|>
describe('Custom user and robot images', function() {
  var photo = 'https://space10-community.github.io/conversational-form/landingpage/photo2.jpg';
  
  var tags = [
    {
      "tag": "input",
      "type": "text",
      "name": "max-min-length",
      "minlength": 5,
      "maxlength": 15,
    }
  ];
  
  var instanceDefault = window.cf.ConversationalForm.startTheConversation({
    "options": {
      formEl: document.createElement("form"),
      "submitCallback": function(){},
    },
    "tags": tags
  });
  
  var instanceRobotImage = window.cf.ConversationalForm.startTheConversation({
    "options": {
      formEl: document.createElement("form"),
      "submitCallback": function(){},
      robotImage: photo,
      userImage: photo,
    },
    "tags": tags
  });

  var instanceDark = window.cf.ConversationalForm.startTheConversation({
    "options": {
      formEl: document.createElement("form"),
      "submitCallback": function(){},
      theme: 'dark'
    },
    "tags": tags
  });
  
  var instanceDarkRobotImage = window.cf.ConversationalForm.startTheConversation({
    "options": {
      formEl: document.createElement("form"),
      "submitCallback": function(){},
      robotImage: photo,
      userImage: photo,
      theme: 'dark'
    },
    "tags": tags
  });
  
  it('Theme should have a svg as value (default)', function() {
    expect(instanceDefault.dictionary.robotData['robot-image']).toContain('svg+xml');
    expect(instanceDefault.dictionary.data['user-image']).toContain('svg+xml');
  });
  
  it('Theme should have custom photo as robotImage', function() {
    expect(instanceRobotImage.dictionary.robotData['robot-image']).toEqual(photo);
    expect(instanceRobotImage.dictionary.data['user-image']).toEqual(photo);
  });

  it('Dark Theme should have a svg as value (default)', function() {
    expect(instanceDark.dictionary.robotData['robot-image']).toContain('svg+xml');
    expect(instanceDark.dictionary.data['user-image']).toContain('svg+xml');
  });
  
  it('Dark Theme should have custom photo as robotImage', function() {
    expect(instanceDarkRobotImage.dictionary.robotData['robot-image']).toEqual(photo);
    expect(instanceDarkRobotImage.dictionary.data['user-image']).toEqual(photo);
  });
  
  
});


<|start_filename|>tests/progressbar.js<|end_filename|>
describe('Test progressbar', function() {
	var html = " \
			<form id='markup-form-progressbar'> \
				<input type='text' cf-label='name' name='name' /> \
				<input type='text' cf-label='city' name='city' /> \
				<input type='text' cf-label='icecream' name='icecream' /> \
				<input type='text' cf-label='car' name='car' /> \
			</form> \
	";

	var parser = new DOMParser()
	var doc = parser.parseFromString(html, "text/xml");

	document.body.appendChild(doc.getElementsByTagName("form")[0]);
	var formEl = document.getElementById("markup-form-progressbar");

	var div = document.createElement("div");

	var instance = new window.cf.ConversationalForm.startTheConversation({
		formEl: formEl,
		context: div,
		showProgressBar: true
	});

	it('ProgressBar should be visible and be at 50%', function(done) {
		instance.remapTagsAndStartFrom(2);
		setTimeout(function() {
			expect(div.querySelector('.cf-progressBar').classList).toContain('show');
			expect(div.querySelector('.cf-progressBar .bar').style.width).toEqual('50%');
      done();
    }, 4500);
	});

});


<|start_filename|>landingpage/src/tracking.js<|end_filename|>
/**
 * Gtag helper class
 */
class Tracking {
  constructor() {
    this.enabled = false;
    const scriptSrc = document.querySelector('script[src*="gtag"]');
    // eslint-disable-next-line prefer-destructuring
    this.gaPropertyId = scriptSrc && scriptSrc.hasAttribute('src') ? scriptSrc.src.split('?id=')[1] : false;
  }

  hasGtag() {
    this.enabled = typeof window.gtag !== 'undefined';
    return this.enabled;
  }

  event(category, action, label, value) {
    if (!this.hasGtag()) return false;

    if (!this.gaPropertyId) {
      this.log('Missing dataLayer. Is gtag loaded?');
      return false;
    }

    window.gtag('event', this.gaPropertyId, {
      event_category: category,
      event_action: action,
      event_label: label,
      value,
    });

    return true;
  }

  pageview() {
    if (!this.hasGtag()) return false;

    if (!this.gaPropertyId) {
      this.log('Missing dataLayer. Is gtag loaded?');
      return false;
    }

    window.gtag('config', this.gaPropertyId, {
      page_title: document.title,
      page_path: `${window.location.pathname}${window.location.search}`,
    });

    return true;
  }

  registerAllExternalLinks() {
    if (typeof window === 'undefined') return;
    if (this.hasGtag()) {
      const a = document.querySelectorAll('a[href^="http"]:not([hastracking])');
      for (let i = 0; i < a.length; i += 1) {
        if (a[i].href !== '') {
          a[i].setAttribute('hastracking', 'true');
          a[i].onclick = (function ct(_this, href) {
            return function track() {
              _this.event('Ext. link', href);
            };
          }(this, a[i].href));
        }
      }
    }
  }

  log(message) {
    if (!this.debug) return;
    console.log(message);
  }
}

export default (new Tracking());


<|start_filename|>docs/1.0.0/js/documentation.js<|end_filename|>
document.addEventListener("DOMContentLoaded", function(){
	setTimeout(function(){
		if(typeof initExample === "function"){
			initExample();
		}
	}, 1000);

	window.addEventListener("hashchange", function() { scrollBy(0, -100) })
});


$(document).ready(function(){
    $("h1,h2,h3,h4,h5,h6").hover(function(){
		if( $(this).find("a").length > 0 ) return;
		$(this).append('<a class="anchorjs" href="#' + $(this).attr("id") + '" data-anchorjs-icon="#"></a>');
	}, function() {	
		$(this).find(".anchorjs").remove();
	})
});