{
  "title": "Демо: все типы вопросов Anketa",
  "description": "Импортируемый JSON со всеми поддерживаемыми типами вопросов и несколькими вариациями. Замените media paths на реальные файлы, если хотите прогонять heatmap и media blocks.",
  "version": 1,
  "settings": {
    "allow_back": true,
    "allow_repeat": true,
    "allow_resuming": true,
    "main_timeout_hours": 2,
    "screener_timeout_minutes": 5
  },
  "screener": {
    "questions": [
      {
        "id": "s_intro",
        "type": "info_block",
        "title": "Добро пожаловать в demo-опрос",
        "layout": "center",
        "description": "Этот файл показывает все основные типы вопросов, которые можно программировать в Anketa."
      },
      {
        "id": "s_age",
        "type": "single",
        "title": "Укажите возрастную группу",
        "required": true,
        "options": [
          { "value": "under_18", "text": "До 18", "terminate": true },
          { "value": "18_24", "text": "18-24" },
          { "value": "25_34", "text": "25-34" },
          { "value": "35_44", "text": "35-44" },
          { "value": "45_plus", "text": "45+", "pinned": true }
        ]
      },
      {
        "id": "s_usage",
        "type": "multiple_choice",
        "title": "Какие категории вы покупали за последние 30 дней?",
        "required": true,
        "shuffle": true,
        "min_selections": 1,
        "max_selections": 2,
        "pinned_options": ["other"],
        "options": [
          { "value": "food", "text": "Еда и напитки" },
          { "value": "beauty", "text": "Красота и уход" },
          { "value": "tech", "text": "Техника" },
          { "value": "none", "text": "Ничего из списка", "exclusive": true },
          { "value": "other", "text": "Другое", "open_ended": true, "pinned": true }
        ]
      },
      {
        "id": "s_frequency",
        "type": "scale",
        "title": "Как часто вы участвуете в опросах?",
        "required": true,
        "min": 1,
        "max": 5,
        "step": 1,
        "show_numbers": true,
        "highlight_fill": true,
        "tick_labels": {
          "1": "Очень редко",
          "3": "Иногда",
          "5": "Очень часто"
        }
      }
    ]
  },
  "main": {
    "questions": [
      {
        "id": "m_text_email",
        "type": "text",
        "title": "Укажите email для связи",
        "required": true,
        "min_length": 6,
        "pattern_type": "regex",
        "pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
        "placeholder": "name@example.com"
      },
      {
        "id": "m_text_phone",
        "type": "text",
        "title": "Укажите контактный телефон",
        "required": false,
        "pattern_type": "phone",
        "pattern": "phone",
        "placeholder": "+7 999 123-45-67"
      },
      {
        "id": "m_matrix_single",
        "type": "matrix",
        "title": "Оцените бренд по параметрам",
        "required": true,
        "response_type": "single",
        "shuffle": true,
        "pinned_options": ["quality"],
        "rows": [
          { "value": "quality", "text": "Качество" },
          { "value": "price", "text": "Цена" },
          { "value": "design", "text": "Дизайн" }
        ],
        "columns": [
          { "value": "1", "text": "Плохо" },
          { "value": "2", "text": "Средне" },
          { "value": "3", "text": "Хорошо" },
          { "value": "4", "text": "Отлично" }
        ]
      },
      {
        "id": "m_matrix_multi",
        "type": "matrix",
        "title": "Какие свойства подходят каждому бренду?",
        "required": true,
        "response_type": "multiple",
        "sequential": true,
        "shuffle_columns": true,
        "min_selections": 1,
        "max_selections": 2,
        "rows": [
          { "value": "brand_a", "text": "Brand A" },
          { "value": "brand_b", "text": "Brand B" }
        ],
        "columns": [
          { "value": "innovative", "text": "Инновационный" },
          { "value": "reliable", "text": "Надёжный" },
          { "value": "expensive", "text": "Дорогой" },
          { "value": "none", "text": "Ничего из перечисленного", "exclusive": true }
        ]
      },
      {
        "id": "m_scale_nps",
        "type": "scale",
        "title": "Насколько вероятно, что вы порекомендуете сервис?",
        "required": true,
        "min": 0,
        "max": 10,
        "step": 1,
        "default_value": 8,
        "show_numbers": true,
        "highlight_fill": true,
        "fill_from_zero": true,
        "disabled_values": [4],
        "timer": 2,
        "tick_labels": {
          "0": "Точно нет",
          "5": "Середина",
          "10": "Точно да"
        }
      },
      {
        "id": "m_ranking",
        "type": "ranking",
        "title": "Ранжируйте причины покупки",
        "required": true,
        "shuffle": true,
        "min_ranked": 2,
        "max_ranked": 3,
        "top_k": 3,
        "options": [
          { "value": "price", "text": "Цена" },
          { "value": "quality", "text": "Качество" },
          { "value": "speed", "text": "Скорость доставки" },
          { "value": "service", "text": "Сервис" }
        ]
      },
      {
        "id": "m_alloc_percent",
        "type": "allocation",
        "title": "Распределите 100% внимания между каналами",
        "required": true,
        "mode": "percent",
        "total_value": 100,
        "decimals": 0,
        "step": 5,
        "allow_zero": false,
        "min_per_option": 10,
        "max_per_option": 70,
        "options": [
          { "value": "tv", "text": "ТВ" },
          { "value": "digital", "text": "Digital" },
          { "value": "outdoor", "text": "Outdoor" }
        ]
      },
      {
        "id": "m_alloc_count",
        "type": "allocation",
        "title": "Распределите 10 покупок по категориям",
        "required": true,
        "mode": "count",
        "total_value": 10,
        "decimals": 0,
        "step": 1,
        "allow_zero": true,
        "min_per_option": 0,
        "max_per_option": 10,
        "options": [
          { "value": "snacks", "text": "Снеки" },
          { "value": "drinks", "text": "Напитки" },
          { "value": "desserts", "text": "Десерты" }
        ]
      },
      {
        "id": "m_info_media",
        "type": "info_block",
        "title": "Посмотрите на упаковку",
        "description": "Ниже показан пример информационного блока с изображением и кастомным фоном.",
        "image_url": "/image/demo-package.png",
        "background_color": "#f8fafc",
        "layout": "center",
        "fullscreen": false,
        "autoplay": false,
        "watch_to_end": false
      },
      {
        "id": "m_heatmap",
        "type": "heatmap",
        "title": "Отметьте, куда вы посмотрели в первую очередь",
        "text": "Поставьте от одной до трёх точек на изображении.",
        "image_url": "/image/demo-heatmap.png",
        "required": true,
        "min_selections": 1,
        "max_selections": 3,
        "timer": 1
      },
      {
        "id": "m_info_video",
        "type": "info_block",
        "title": "Видео перед финальным вопросом",
        "description": "Пример video-блока. В реальном проекте замените путь на существующий файл.",
        "video_url": "/video/demo-clip.mp4",
        "layout": "left",
        "fullscreen": false,
        "autoplay": true,
        "watch_to_end": true
      },
      {
        "id": "m_final_single",
        "type": "single",
        "title": "Готовы использовать этот demo как шаблон?",
        "required": true,
        "options": [
          { "value": "yes", "text": "Да, возьму за основу" },
          { "value": "parts", "text": "Использую только отдельные блоки" },
          { "value": "no", "text": "Нет, нужен другой сценарий" }
        ]
      }
    ]
  }
}
